Vipps paymentsPrivate preview
Learn how to accept Vipps, a common payment method in Norway.
Vipps is a single-use card wallet payment method used in Norway. It allows customers to authenticate and approve payments using a companion smartphone application.
Customers pay with Vipps by redirecting from your website, authorising the payment, then returning to your website where you get immediate notification about whether the payment succeeded or failed.
Set up StripeServer-side
Use our official libraries for access to the Stripe API from your application:
Create a PaymentIntentServer-side
A PaymentIntent is an object that represents your intent to collect a payment from a customer and tracks the lifecycle of the payment process through each stage. First, create a PaymentIntent
on your server and specify the amount to collect and the nok
currency, because Vipps only supports nok
. If you already have an integration using the Payment Intents API, add vipps
to the list of payment method types for your PaymentIntent
.
Response
{ "id": "pi_12345", "amount": 1099, "currency": "nok", "payment_method": "pm_12345", "payment_method_types": [ "vipps" ], "payment_method_options": { "vipps": { "reference": "ORDER_123", }, }, "status": "requires_confirmation" }
Note
You can set the order reference to display to your customer in the Vipps application. This defaults to the Payment Intent id
.
Confirm the PaymentIntentServer-side
Use the PaymentIntent id from step 2 to confirm the PaymentIntent. This declares that the customer intends to pay with the specified PaymentMethod. After the PaymentIntent is confirmed, it initiates a payment. The return_url indicates where Stripe redirects the user after they complete the payment.
Response
{ "id": "pi_12345", "amount": 1099, "currency": "nok", "payment_method": "pm_12345", "next_action": { "redirect_to_url": { "return_url": "https://example.com/checkout/complete", "url": "https://pm-redirects.stripe.com/authorize/acct_123/pa_nonce_abc" }, "type": "redirect_to_url" }, "payment_method_types": [ "vipps" ], "payment_method_options": { "vipps": { "reference": "ORDER_123", }, }, "status": "requires_action" }
To authorise the payment, redirect your customer to the URL in the next_action[redirect_to_url][url] field.
On a desktop, the URL opens a Vipps landing page where the customer can enter their phone number, which identifies their Vipps account. They can then use the Vipps smartphone app to proceed with payment authorisation.
On mobile devices, the URL opens the Vipps application directly (if present) or it opens the Vipps landing page, similar to the desktop process.
Note
Your customer has 5 minutes to open the redirect URL provided, after which the payment fails and the Payment Intent transitions to
requires_
.payment_ method After your customer follows the redirect URL, they have 5 minutes to authorise the payment in the app. If the underlying card charge fails, the payment is failed and the Payment Intent transitions to
requires_
.payment_ method
Fulfill the orderServer-side
Use a method such as webhooks to handle order fulfilment. When a customer completes payment, the PaymentIntent
’s status transitions to succeeded
and sends the payment_intent.succeeded webhook event. If a customer doesn’t pay, the PaymentIntent
sends the payment_intent.payment_failed webhook event and returns to a status of requires_
.