Skip to main content
If a payment session contains only Vipps or MobilePay, you can skip opening the Dintero Checkout and instead open the payment method’s hosted payment page directly.
Testing hosted payments in the sandbox environment is only possible with the direct vipps integration or dintero_psp.vipps, so some testing will have to be done with real payments.

Creating a hosted payment session

Set configuration.channel=hosted for payment sessions that contain a single payment method. Request
{
  "url": {
    "return_url": "http://merchant.com/handle_payment/ORDER123/return",
    "callback_url": "http://merchant.com/handle_payment/ORDER123/callback"
  },
  "order": {
    "amount": "500",
    "currency": "NOK",
    "merchant_reference": "ORDER123"
  },
  "configuration": {
    "channel": "hosted",
    "dintero_psp": {
      "vipps": {
        "enabled": true
      }
    }
  }
}
Response
{
  "id": "P12345678.55Q4CC1WuVJdgCssZfrf5a",
  "url": "https://pay.vipps.no/dwo-api-application/v1/deeplink/vippsgateway?v=2&token={vipps_token}"
}
Open the url in the end users devices to complete the payment.
Do not embed the hosted url when opening it, so that the hosted page can act as a universal link and launch the Vipps or MobilePay app. Hosted payments are not compatible with embedding via the frontend Dintero.Checkout.Web.SDK.

Payment finished or cancelled

After the user finishes or cancels the payment, they are returned to the return_url. Dintero appends the following query parameters:
NameDescriptionAlways present
transaction_idThe transaction ID for the paymentNo
session_idThe payment session IDNo
errorError code identifying the causeNo
merchant_referenceThe merchant referenceYes

Fallback to the Dintero Checkout

If a session specifies configuration.channel=hosted but its payment method does not support hosted payments, or the session contains more than one payment method, the url returned on session creation opens the Dintero Checkout instead, where the user can complete their payment. The url will also fall back to Dintero Checkout for Checkout Express sessions, so the end user can submit their shipping and billing information and select a shipping option before payment.

Handling dangling browser tabs on mobile

On mobile devices, the hosted payment acts as a universal link and tries to open the payment directly in the payment method’s native app (e.g. Vipps or MobilePay). If the app is not installed, the browser navigates to the hosted payment page instead. When a payment app is opened via a universal link, the page the user was visiting remains open in the browser. After the payment completes, the return_url opens in a new browser tab, leaving the original page open as a dangling pending-payment page. To handle this, we recommend one or both of the following:
  • Update the UI before redirecting. Before opening the hosted payment link, change the payment page to show messaging that the user is being redirected to complete payment.
  • Re-check status on focus. Add code that runs when the tab regains focus to check the payment session status. If the user returns to the dangling page, you can then update it to show that the payment completed, or prompt them to try again.
Last modified on June 24, 2026