Order details
The ePayment API allows you to attach order details directly to a payment at the time of creation. This serves as proof of purchase for returns, provides an electronic copy for expense tracking, or offers a convenient alternative when a paper printer isnβt available.
Customers can view these order details in their Vipps or MobilePay
app:
- Immediately after completing in-store purchases
- During long-living payments, when applicable
- In their order history, accessible at any time
Flowsβ
There are two ways to include receipt details in a payment:
- Create a payment with order lines - Add detailed descriptions of the purchase directly in the payment request.
- Create a payment with a receipt URL - Include a link to the receipt in the payment request.
Create a payment with order linesβ
When you include order lines in the payment, the customer's experience looks like this:
- Vipps
- MobilePay
To create a payment with order lines:
- Call
POST:/epayment/v1/payments
. - Set
paymentMethod
type = "WALLET"
. - Include the
receipt
property in your payload.
This makes sure the receipt details are shown to the customer in the app.
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 '{
"amount":{
"currency":"NOK",
"value":100000
},
"paymentMethod":{
"type":"WALLET"
},
"reference":"acme-shop-123-order123abc",
"userFlow":"PUSH_MESSAGE",
"paymentDescription":"Two pairs of socks",
"receipt":{
"orderLines":[
{
"name":"Royal Feline Hairball",
"id":"line_item_1",
"totalAmount":100000,
"totalAmountExcludingTax":80000,
"totalTaxAmount":20000,
"taxRate": 2500,
"productUrl":"https://example.no/shop/katt/12345",
},
{
"name":"Home Delivery",
"id":"delivery",
"totalAmount":0,
"totalAmountExcludingTax":0,
"totalTaxAmount":0,
"isShipping":true
}
],
"bottomLine":{
"currency":"NOK",
"posId":"vipps_pos_122",
"receiptNumber":"0527013501"
}
}
}'
Create a payment with a receipt URLβ
When you include the receipt URL in the payment, the customer's experience looks like this:
- Vipps
- MobilePay
Receipt URL Behavior
- iPhone: Setting the
receiptUrl
will open a webpage or a multipage PDF inside the app. - Android: The behavior of
receiptUrl
varies based on the device. Some devices behave like iPhones, opening a webpage or a PDF directly. Others may open the default app for viewing PDFs. Since Android devices are diverse, behavior can differ widely.
To create a payment with order lines:
- Call
POST:/epayment/v1/payments
. - Set
paymentMethod
type = "WALLET"
. - Include the
receiptUrl
property in your payload (e.g.,"receiptUrl":"https://example.com/link/to/my.pdf"
).
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 '{
"amount":{
"currency":"NOK",
"value":100000
},
"paymentMethod":{
"type":"WALLET"
},
"reference":"acme-shop-123-order123abc",
"userFlow":"PUSH_MESSAGE",
"paymentDescription":"Two pairs of socks",
"receiptUrl":"https://example.com/link/to/my.pdf"
}'
Viewing the order detailsβ
Customers can easily access their receipts at any time through the Vipps or MobilePay
app.
By navigating to Activities and selecting the purchase, they can view payment details along with any order details provided.
This guarantees a seamless and convenient way for customers to retrieve their receipts whenever needed.
- Vipps
- MobilePay
More order management featuresβ
You can add categories and images to payments using the Order Management API.