How ePayment works in the store
Enable your customers to pay easily and quickly from their own phone, without the need to touch the terminal. Offer contactless payment to your customers by integrating the ePayment API into your POS system.
It is also possible to use our simpler solution, Open amount, but then the amount must be entered manually at checkout, and there will be some follow-up with accounting and settlement.
Details
1. Add products to sell
Add the products that the customer wants to buy in the POS system.
- Vipps
- MobilePay
2. Enter the customer's phone number
When the customer is ready to pay, choose Pay with Vipps/MobilePay. Enter the customer's phone number.
3. Create a payment request
Create a payment request with: POST:/epayment/v1/payments
.
They will get the confirmation screen in their app.
Per regulations, specify "customerInteraction": "CUSTOMER_PRESENT"
.
Detailed example for payment request
Set userFlow
to PUSH_MESSAGE
. This will send a push directly to the customer.
Attach the receipt simultaneously.
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": {
"value": 49800,
"currency": "NOK"
},
"paymentMethod": {
"type": "WALLET"
},
"customer": {
"phoneNumber": 4712345678
},
"receipt":{
"orderLines": [
{
"name": "Orange hoodie",
"id": "hoodie1234",
"totalAmount": 29900,
"totalAmountExcludingTax": 23920,
"totalTaxAmount": 5980,
"taxRate": 2500,
},
{
"name": "White T-shirt",
"id": "tshirt1234",
"totalAmount": 19900,
"totalAmountExcludingTax": 15920,
"totalTaxAmount": 3980,
"taxRate": 2500,
},
],
"bottomLine": {
"currency": "NOK",
"posId": "Butikken-23412",
"receiptNumber": "0527013501"
},
},
"reference": 2486791679658155992,
"userFlow": "PUSH_MESSAGE",
"returnUrl": "http://example.com/redirect?reference=2486791679658155992",
"paymentDescription": "Payment to Butikken",
"customerInteraction": "CUSTOMER_PRESENT"
}'
4. The customer confirms payment in the app
The customer confirms the payment in their Vipps or MobilePay
app.
The ePayment API automatically reserves the payment and provides a receipt of the successful payment.
- Vipps
- MobilePay
To determine that the user has authorized the payment, poll with the
GET:/epayment/v1/payments/{reference}
request. See the guidelines for polling.
Alternatively, you can register for a webhook
to alert you when your payment is authorized.
5. Register the payment
Register the payment in your POS system.
6. Capture the payment
Capture the order through the ePayment API. The payment will be transferred to your account. This may take 2 or 3 days, depending on the bank.
Next steps
See Recommended flows: In-store payments for an example of this flow with a scanner.