Accept freestanding cards
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.
- Vipps
- MobilePay
To initiate a freestanding card payment, call the create payment endpoint,
POST:/epayment/v1/payments
.
Specify paymentMethod.type = "CARD"
.
For example:
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 '{
"paymentMethod": {
"type": "CARD"
},
"amount": {
"currency": "NOK",
"value": 49900
},
"reference": "acme-shop-123-order123abc",
"returnUrl": "https://example.com/redirect?reference=acme-shop-123-order123abc",
"userFlow": "WEB_REDIRECT",
"paymentDescription": "Online purchase of sportswear",
"receiptUrl":"https://example.com/link/to/my.pdf"
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 opens, where they enter their card details.
After confirming the payment in the app, the user is redirected back to the merchant's store, where the order confirmation is shown.
The card entry page currently is not currently available in the test environment.