Skip to main content

Payment through company app

The customer pays the taxi company from their app when ordering the taxi and selects to pay with Vipps MobilePay. The amount is reserved until the final amount is known, at which time the payment is captured.

This flow combines multiple products to illustrate the recommended online payment flow.


Step 1. Initiate a payment request

When the customer is ready to pay, initiate a payment request.

The payment request amount should be large enough to cover the cost of the journey. Do not include the receipt yet, since a receipt is immutable and the true amount is not known yet.

This amount will be reserved on the customer's account, and the unused amount will be released when the journey is finished.

Detailed example

To create this payment, you first send a create payment request.

Since the customer is selecting this from an app on their phone, you don't need their phone number. This payment command can do an app-switch and open their app with the payment request. Specify "userFlow": "WEB_REDIRECT" to redirect user to the app.

Specify "customerInteraction": "CUSTOMER_PRESENT".

Here is an example HTTP POST:


"amount": {
"value": 31400,
"currency": "NOK"
"paymentMethod": {
"type": "WALLET"
"customerInteraction": "CUSTOMER_PRESENT",
"reference": 2486791679658155992,
"userFlow": "WEB_REDIRECT",
"returnUrl": "",
"paymentDescription": "Travel from Oslo central station to Storo"

Step 2. The customer authorizes the payment

The payment request will appear in the customer's Vipps or MobilePay app, where they can select to pay or cancel.

To get confirmation that payment was approved, monitor your webhooks.

What are webhooks?

When changes happen to your payment request, events are triggered (for example: Authorized, Terminated, Aborted, Cancelled, Expired, and many more).

You can register to receive these events, which is useful for programming an appropriate and quick response.

The webhook will send a message to your web server at the URL you specify.

See the Webhooks API guide for more details.

Once the payment is approved, update the status in your system.

Step 3. Confirm the order

Upon authorization, the Vipps or MobilePay app should automatically redirect the customer to your app. Confirm that the order has been successful in your app.

Step 4. Capture the amount due

After the drive is complete, calculate how much the customer owes and do a partial capture.

Check the status of the captured payment.

Detailed example


With body:

"modificationAmount": {
"value": 29900,
"currency": "NOK"

Step 5. Cancel remaining amount

Release the remaining amount from the reservation with a cancel.


Step 6. Attach a receipt

Attach a receipt with the amount paid.

Detailed example

Here is an example HTTP POST:


For paymentType, use eCom for eCom or ePayment payments. For orderId, use the chargeId of the charge.


"orderLines": [
"name": "trip",
"id": "line_item_1",
"totalAmount": 29900,
"totalAmountExcludingTax": 22425,
"totalTaxAmount": 7475,
"taxPercentage": 25,
"productUrl": "",
"bottomLine": {
"currency": "NOK",
"posId": "taxi_122",

Sequence diagram

Help us improve our documentation

Did you find what you were looking for?