Edit on GitHub

Create Subscriber

The create subscriber API call will return a link to a payment page, where the customer can enter their payment details (i.e. subscribe). When the customer has subscribed you will be able to retrieve a subscriber ID through the Synchronization API.

Request Headers

The request endpoint is: https://api.scanpay.dk/v1/new.

HTTP/1.1 headers Description
Authorization: Basic MTE1MzpZSFpJVUdRdzZOa0NJWWEzbUc2Q1djZ1NobmwxM3h1STdPREZVWXVNeTBqNzkwUTZUaHdCRWp4ZldGWHdKWjBX
HTTP Basic authentication. This HTTP header is required. Read more.

Request Fields

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

JSON fields Description
"orderid": "395" A unique ID that you choose. Never reuse IDs or your synchronization may behave in unexpected ways.
"successurl": "http://blixen.dk/success" Redirect to this URL after succesful payment. If omitted we will show a generic success message.
"subscriber": {
"ref": "user301"
}
This object tells us that you want to create a subscriber. The object is required, but you can leave it empty:
  • ref: A reference to the subscriber in your system.
"billing": {
    "name": "Øjvind Jakobsen",
    "company": "Karen Blixen Museet ApS",
    "vatin": "DK14915508",
    "gln": "5790002195341",
    "email": "øjvind@blixen.dk",
    "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": "thomas@dinesen.dk",
    "phone": "0045 45571057",
    "address": [
        "Att. Thomas Fasti Dinesen",
        "Rungsted Strandvej 111"
    ],
    "city": "Rungsted Kyst",
    "zip": "2960",
    "state": "",
    "country": "DK"
}

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).
"language": "da" Preferred language for the payment window. We fallback to the Accept-Language header.
"lifetime": "2d 12h 30m" Set payment link lifetime in days (d), hours (h) or minutes (m). Default is "1h" and max is "30d"