Freestanding card payments
The ePayment API supports freestanding card payments, where any user can pay with a card without using the app. This lets merchants accept payments from customers in countries where the Vipps or MobilePay app is not yet available.
See FAQ: Card payments for more general information.
Create a freestanding card payment
Remember to have a fresh access token, see
Setup and Authorize.
Then, call the Create Payment endpoint with paymentMethod.type = "CARD"
.
To initiate a freestanding card payment, the
POST:/epayment/v1/payments
request must specify paymentMethod.type = "CARD"
.
curl -X POST https://apitest.vipps.no/epayment/v1/payments \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR-ACCESS-TOKEN" \
-H "Ocp-Apim-Subscription-Key: YOUR-SUBSCRIPTION-KEY" \
-H "Merchant-Serial-Number: YOUR-MSN" \
-H 'Idempotency-Key: YOUR-IDEMPOTENCY-KEY' \
-H "Vipps-System-Name: acme" \
-H "Vipps-System-Version: 3.1.2" \
-H "Vipps-System-Plugin-Name: acme-webshop" \
-H "Vipps-System-Plugin-Version: 4.5.6" \
-d '{
"amount": {
"currency": "NOK",
"value": 49900
},
"paymentMethod": {
"type": "CARD"
},
"reference": "acme-shop-123-order123abc",
"returnUrl": "https://example.com/redirect?reference=acme-shop-123-order123abc",
"userFlow": "WEB_REDIRECT",
"paymentDescription": "Two pairs of socks"
}'
Complete the payment
The response for the request above will contain a redirectUrl
pointing to the web page with a form
where the user enters the payment card details.
The card entry page currently is not currently available in the test environment.
After confirming the payment in the app, the user is redirected back to the merchant’s store, where the order confirmation is shown.