Orders

Create a Scalapay order. The endpoint returns a token required to capture the payment and a checkoutUrl that redirects the customer to Scalapay Checkout, where the payment is authorized.

post/v2/orders

Request

Headers

Idempotency-Keystring

Idempotency key used for retrying requests. Can be used for retrying failed requests.

Request body

merchantReferencestring

Merchant reference for tracking the order in your system.

type'' | 'online' | 'offline' | 'link'

Type of order. Use online for online orders, offline for offline orders, and link for orders sent by SMS. When using link, include the extensions field.

product'' | 'pay-in-3' | 'pay-in-4' | 'later' | 'pay-now-standalone'

Product type. Could be empty. Use pay-in-3 for pay in 3, pay-in-4 for pay in 4, and later for pay later. Use pay-now-standalone for a single immediate payment through the standalone Scalapay checkout, available when the product is enabled on your merchant account.

orderExpiryMillisecondsinteger

Length of time (in milliseconds) that the order is valid. The maximum value is determined by your Scalapay contract. To extend it, contact Scalapay support.

Example request

{
  "type": "online",
  "frequency": {
    "number": 1,
    "frequencyType": "monthly"
  },
  "orderExpiryMilliseconds": 2400000,
  "extensions": {
    "industry": {
      "travel": {
        "startDate": "2024-01-01",
        "endDate": "2024-10-01"
      }
    },
    "type": {
      "link": {
        "notification": {
          "phoneCountryCode": "+39",
          "phoneNumber": "3470000000",
          "preferredLanguage": "italiano",
          "emailAddress": "test@scalapay.com",
          "channels": [
            "email",
            "sms"
          ]
        }
      }
    }
  }
}

Response

Successful order creation

tokenstring required

The order token used to capture the payment.

expiresstring

Expiry timestamp of the order.

checkoutUrlstring

URL that redirects the customer to Scalapay Checkout. For pay-now-standalone orders the URL points to the standalone checkout, https://portal.scalapay.com/checkout/standalone/{token}.

Changes