VippsMobilePayEPayments

The APIs to manage ePayments for VippsMobilePay WALLET using QR codes.
You can use these APIs to : -

      - create a new payment,
      - query a payment details,
      - query latest payment state from payment events logs,
      - capture a payment (Note: You can only capture a payment when its status is Authorized by the user),
      - cancel a payment,
      - refund a payment.

This implementation of VippsMobilePay WALLET ePayment has two type User checkout flow.
  • Checkout paymnent is initiated on the device
    For payments initiated on a device other than the user's phone, the user gets a push message that opens the payment in the app.
    The merchant must have received the phone number from the customer with their consent for sending a payment request to the user's phone via Vipps or MobilePay app

    Simply initiate the payment where the userFlow parameter is set to PUSHMESSAGE.

    Basically what is needed, is as follows

        - create a new payment (api/vipps/payment/create) set UserFlow = PUSHMESSAGE,
        - check/poll to get payment details and check the payment status (api/vipps/payment/details). If the payment is Authorized, that's where you can capture the payment,
        - capture a payment (api/vipps/payment/capture) (Note: You can only capture a payment when its status is Authorized),
  • Checkout has customer facing screens

    Simply initiate the payment where the userFlow parameter is set to QR. Then, the response will contain a link to a dynamic QR code, which the checkout then downloads and shows on their customer facing screen. The user scans the QR and completes the payment flow.

    Basically what is needed, is as follows

        - create a new payment (api/vipps/payment/create) set UserFlow = QR, you will receive the payment result object with QR code URL that the user can scan,
        - check/poll to get payment details and check the payment status (api/vipps/payment/details). If the payment is Authorized, that's where you can capture the payment,
        - capture a payment (api/vipps/payment/capture) (Note: You can only capture a payment when its status is Authorized),

The payment flow that is recommended is the first one (PUSH_MESSAGE Flow).

APIDescription
GET api/vipps/epayment/create?paymentReference={paymentReference}&amount={amount}&terminalId={terminalId}&currencyCode={currencyCode}&paymentUserFlow={paymentUserFlow}&customerPhoneNumber={customerPhoneNumber}&paymentDescription={paymentDescription}&accessToken={accessToken}&bioCode={bioCode}

Create a payment by based on a terminalId.
Upon calling this API, It will read the merchant information, terminal information from Integra and create payment.

POST api/vipps/epayment/create

Create a new payment based on the terminalId using POST method.
Upon calling this API, It will read the merchant information, terminal information from Integra and create payment.

GET api/vipps/epayment/details?paymentId={paymentId}&terminalId={terminalId}&accessToken={accessToken}&bioCode={bioCode}

Query the payment details.

GET api/vipps/epayment/state?paymentId={paymentId}&terminalId={terminalId}&accessToken={accessToken}&bioCode={bioCode}

Query the latest payment state from payment event logs.

GET api/vipps/epayment/eventslogs?paymentId={paymentId}&terminalId={terminalId}&accessToken={accessToken}&bioCode={bioCode}

Query the payment event logs.

GET api/vipps/epayment/capture?terminalId={terminalId}&paymentId={paymentId}&amount={amount}&currencyCode={currencyCode}&accessToken={accessToken}&bioCode={bioCode}

Capture a payment.
NOTE: You can only capture a payment once the user has Authorized it

GET api/vipps/epayment/refund?terminalId={terminalId}&paymentId={paymentId}&amount={amount}&currencyCode={currencyCode}&accessToken={accessToken}&bioCode={bioCode}

Refund a payment. It is possible to refund partial amount

GET api/vipps/epayment/cancel?terminalId={terminalId}&paymentId={paymentId}&amount={amount}&currencyCode={currencyCode}&accessToken={accessToken}&bioCode={bioCode}

Cancel a payment.


VippsMobilePayAccessTokenManagement

The APIs to manage point of sales (pos).
You can request to create an access token. The access token is valid only for 24 hours
If you would like to reset the access token, you will need to provide the old access token.

APIDescription
GET api/vipps/manage/token?bioCode={bioCode}&oldAccessToken={oldAccessToken}

Creates an accessToken to be used to access VippsMobilePay ePayment API. The access token is valid for 24 hours in production
If you want to reset the access token, you need to provide the oldaccesstoken

POST api/vipps/manage/token

Creates a merchant AccessToken using a POST REQUEST The access token is valid for 24 hours in production
If you want to reset the access token, you need to provide the oldaccesstoken