Vipps
The shopper chooses Vipps and approves the payment in the app.
Vipps payments start with a payment session, like other payment methods. The shopper chooses Vipps on the checkout page and approves the payment in the Vipps app. Vipps follows an authorise and capture model, and supports:
- Authorise now, capture the full amount later
- Immediate capture
- Several partial captures (split shipment)
You can also start a Vipps payment from your own checkout. See Direct payments.
Authorise now, capture later
sequenceDiagram
autonumber
participant S as Shopper
participant M as Your server
participant A as Aera
participant V as Vipps
participant P as Shopper's phone
S->>M: Go to checkout
M->>A: Create payment session
A-->>M: pspReference, paymentSessionUrl
M-->>S: Redirect to paymentSessionUrl
S->>A: Choose Vipps
A-->>S: Redirect to the Vipps page
S->>V: Enter phone number
V-->>P: Push notification: approve payment
S->>P: Approve or reject
P->>V: Result
V-->>A: Payment result
A-->>S: Redirect to your success, cancel or error URL
A-->>M: Notification: CHECKOUT_SESSION_COMPLETED
M->>A: Get payment status
A-->>M: Status and operations
M->>A: Capture (full amount)
A-->>M: Capture result
1. Create the session.
Example request: Vipps only
{
"merchantData": {
"successRedirectUrl": "https://shop.example.com/success",
"cancelRedirectUrl": "https://shop.example.com/cancel",
"errorRedirectUrl": "https://shop.example.com/error",
"callbackUrl": "https://shop.example.com/aera/notifications"
},
"transactionData": {
"merchantReference": "12344333",
"immediateCapture": false,
"amountDetails": { "amount": 10000, "currency": "NOK" }
},
"paymentMethodInfo": {
"paymentMethodWhitelist": ["VIPPS"]
}
}paymentMethodWhitelist is optional. Leave it out to show every payment method in your agreement. With only VIPPS, the checkout page shows only Vipps.
2. Redirect the shopper to the paymentSessionUrl and wait for the notification.
3. Check the result when the notification comes:
Example notification
{
"eventType": "CHECKOUT_SESSION_COMPLETED",
"status": "0",
"pspReference": "01J9Z8X7W6V5T4S3R2Q1P0N9M8",
"merchantReference": "12344333",
"paymentMethod": "VIPPS",
"paymentScheme": "VIPPS"
}4. Capture. POST /v1/{pspReference}/capture with no body captures the full amount.
Immediate capture
Set immediateCapture to true. The status then shows both AUTHORIZATION and CAPTURE. If the capture fails, the payment is reversed.
Split shipment
Set splitShipment to true when you create the session. Then capture part of the amount, for example "amountDetails": { "amount": 5000, "currency": "NOK" }. You can capture more parts until the full amount is captured.
In an embedded checkout
Vipps MobilePay needs an app switch, so it can't complete inside an embedded form. Your page must send the shopper on. See Embedded checkout.
Before you can accept Vipps MobilePay
- You have a Vipps agreement, and Vipps is set up for your merchant account.
Updated 4 days ago