Docs » Payment Link Edit on GitHub

Payment Link

Use this API to generate payment links. This API is designed to be fault-tolerant and forgiving. Here is some pseudocode to show how simple it is:

Authorization: Basic MTE1MzpZSFpJVUdRdzZOa0NJWWEzbUc2Q1djZ1NobmwxM3h1STdPREZVWXVNeTBqNzkwUTZUaHdCRWp4ZldGWHdKWjBX
    "items": [
            "total": "159.90 DKK"

This is the absolute minimum you can send to create a payment link. The more information you include the better we can protect your business against fraud.

Request Headers

The request endpoint is:

HTTP/1.1 headersDescription
HTTP Basic authentication. Read more.
The IPv4 or IPv6 address of the customer.

Request Fields

All request fields are listed below. All fields are optional.

JSON fieldsDescription
A unique ID that you choose. Never reuse IDs or your synchronization may behave in unexpected ways.
Redirect to this URL after succesful payment. If omitted we will show a generic success message.
An array with items.
  • name: The name of the item.
  • quantity: The number of items (integer).
  • total: The line total (i.e. unit-price x quantity) with an ISO 4217 currency code.
  • sku: A SKU for this particular product.
In this example the grand total is 13397.9986 DKK. Most acquires only support 2 digits after the decimal point. If this is the case we will truncate to 13397.99.
Customer billing and shipping address.
  • name: The full name.
  • company: Legal company name.
  • vatin: EU VAT identification number.
  • gln: Global Location Number or European Article Numbering (EAN-number).
  • email: E-mail address.
  • phone: Phone number with country prefix.
  • address: An address array where each element is a new line.
  • zip: Postal code.
  • city: City.
  • state: State or region.
  • country: Two-letter country code (ISO 3166-1).
Preferred language for the payment window. We fallback to the Accept-Language header.
Automatically capture the payment. Default is false.
Set payment link lifetime in days (d), hours (h) or minutes (m). Default is "1h" and max is "30d"

Response Fields

Successful responses have a 200 HTTP status code with the following JSON field:

JSON fieldDescription
The returned payment link.


Redirect customers to MobilePay Online by appending a ?go=mobilepay query string to the payment link. This will only work if MobilePay is enabled (here) and if your acquirer supports MobilePay.


Here are a few examples. We recommend that you take a look at our official client libraries.

curl \
  -u 'Your scanpay API key' \
  --data-binary '{
      "orderid": "a766409",
      "language": "da",
      "successurl": "",
      "items": [
              "name": "Pink Floyd: The Dark Side Of The Moon",
              "quantity": 2,
              "total": "199.98 DKK",
              "sku": "fadf23"
              "name": "巨人宏偉的帽子",
              "quantity": 2,
              "total": "199.98 DKK",
              "sku": "124"
      "billing": {
          "name": "Øjvind Jakobsen",
          "company": "Karen Blixen Museet ApS",
          "vatin": "DK14915508",
          "gln": "5790002195341",
          "email": "ø",
          "phone": "+45 45571057",
          "address": ["Rungsted Strandvej 111"],
          "city": "Rungsted Kyst",
          "zip": "2960",
          "state": "Hovedstaden",
          "country": "DK"
      "shipping": {
          "name": "Thomas Fasti Dinesen",
          "company": "Karen Blixen Museet ApS",
          "email": "",
          "phone": "0045 45571057",
          "address": [
              "Att. Thomas Fasti Dinesen",
              "Rungsted Strandvej 111"
          "city": "Rungsted Kyst",
          "zip": "2960",
          "state": "",
          "country": "DK"