v1

latestOpenAPI 3.0.0UNLICENSED2026-07-26178479713.7 KB
payment

checkout_sid_pay_post

For Express Checkout sessions, the order.shipping_address must be set on the session, and a _order.items.shipping_option item is required if the session has either an express.shipping_address_callback_url or the session has at least one option in express.shipping_options.

post/accounts/{aid}/payments/sessions/{session_id}/pay

Headers

If-Unmodified-Sincestring

Optional header. The put request is discarded and a 412 is returned if the header does not match the updated_at property or the version of the session.

Request body

OR
OR
OR
OR
OR
OR
OR
OR
OR
OR
OR
OR
OR
OR
OR

Example request

{
  "billing_address": {
    "first_name": "John",
    "last_name": "Doe",
    "co_address": "Land Lord",
    "postal_code": "0349",
    "postal_place": "Oslo",
    "country": "NO"
  },
  "shipping_address": {
    "first_name": "John",
    "last_name": "Doe",
    "co_address": "Land Lord",
    "postal_code": "0349",
    "postal_place": "Oslo",
    "country": "NO"
  }
}

Response

response from payment

successboolean required

the payment was accepted

redirect_urlstring

redirect url to complete payment, will not be included if the payment failed with Rejected error as payment can be completed by choosing alternative payment option.

poll_urlstring

poll_url to check the status of the payment. Will be included if the payment is dependent on 3rd party apps, such as Swish.

approval_urlstring

approval_url to complete the payment in a different app from the one showing the checkout, eg. an app link for the Swish M-Commerce flow. Should be used in conjunction with the poll_url to check the status of the payment.

qr_codestring

A base 64 encoded image of the QR code can be displayed while the checkout frontend is polling for the payment status. Eg. used as a fallback for the Swish M-Commerce flow if we are unable to open the approval_url on the end users device we can display the QR code and the user can scan it using a different device that has the app used for payment installed.

By default the image has a size of 600 x 600 pixels.

errorstring

Example response

{
  "actions": [
    {
      "source": "DINTERO",
      "code": "200"
    }
  ],
  "qr_code": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABzklEQVR42mNkAAYy...",
  "error": "Rejected",
  "error_details": [
    {
      "code": "wrong_ssn"
    }
  ]
}