Skip to main content

Metadata support

The ePayment API comes with support for merchants to send metadata as part of the payment request that will be stored as-is and returned as part of GetPaymentResponse of GET:/epayment/v1/payments/{reference}. This feature makes enables merchants to supplement payment with additional data that will make their integration towards other systems easier.

Create a payment with metadata

Remember to have a fresh access token, see Set up and Authorize. Then, call the POST:/epayment/v1/payments with metadata.

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": {
"value": 1234,
"currency": "NOK"
},
"paymentMethod": {
"type": "WALLET"
},
"reference": 21203831704360461822,
"userFlow": "WEB_REDIRECT",
"returnUrl": "https://example.com/redirect?reference=21203831704360461822",
"paymentDescription": "Purchase of socks",
"metadata" : {
"key1" : "value1",
"key2" : 12345
}
}'

Help us improve our documentation

Did you find what you were looking for?