v1

latestOpenAPI 3.0.12026-07-2419554.1 KB
Orders

Create order

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

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'

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.

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.

All 19 operations