added

Create Order API

Release Date 31 May 2022

Overview

Update of the Scalapay Create Order API call with the addition of fields to also enter new Scalapay products (Pay in 4, Pay Later).
The merchant can set the new fields: frequency, type and products in the Create Order API call

What's changed

Change of Create Order API call v2/orders
New fields added: frequency, type and products

Parameters

Path

AttributeTypeDescription
order detailsarrayOrder Details Object

Order Details Object

AttributeTypeDescriptionRequiredNew Field
itemsarrayOrder items list. See ItemYES
billingAddressBilling informationsNO
consumerConsumerConsumer informationsYES
merchantMerchantMerchant urls informationsYES
shippingAddressShipping informationsYES
discountsarrayDiscount list. See DiscountNO
taxAmountAmountTotal tax amountNO
totalAmountAmountTotal order amountYES
shippingAmountAmountTotal shipping amountNO
merchantReferencestringUnique reference that identifies merchant orderNO
typestringAccepted values: online or offline NONew
productstringWhich Scalapay product is being called
Accepted values: pay-in-3 , pay-in-4 , later
NONew
frequencyFrequencyNumber of installments NONew

Example payload

{  
    "totalAmount": {  
        "amount": "100.00",
        "currency": "EUR"
    },
    "consumer": {  
        "phoneNumber": "0400000001",
        "givenNames": "Test",
        "surname": "Test",
        "email": "[email protected]"
    },
    "billing": {  
        "name": "Testr",
        "line1": "Via Test, 58",
        "suburb": "Milano",
        "postcode": "20135",
        "countryCode": "IT",
        "phoneNumber": "0400000000"
    },
    "shipping": {  
        "name": "Test",
        "line1": "Via Test, 58",
        "suburb": "Milano",
        "postcode": "20135",
        "countryCode": "IT",
        "phoneNumber": "0400000000"
    },
    "items":[  
         {
             "name": "32",
             "category": "clothes",
             "subcategory": ["shirt", "long-sleeve"],
             "brand": "TopChoice",
             "gtin": "123458791330",
             "sku": "12341234",
             "quantity": 1,
             "price": {
                 "amount": "10.00",
                 "currency": "EUR"
             }
         },
         {
             "name": "Jeans",
             "category": "clothes",
             "subcategory": ["pants", "jeans"],
             "brand": "TopChoice",
             "gtin": "123458722222",
             "sku": "12341235",
             "quantity": 1,
             "price": {
                 "amount": "20.00",
                 "currency": "EUR"
             }
         }
    ],
    "discounts": [
        {
            "displayName": "10% Off",
            "amount": {
                "amount": "103.00",
                "currency": "EUR"
            }
        }
    ],
    "merchant": {
        "redirectConfirmUrl": "https://scalapay.com",
        "redirectCancelUrl": "https://scalapay.com"
    },
    "merchantReference": "merchantOrder-1234",
     "taxAmount": {  
        "amount": "3.70",
        "currency": "EUR"
     },
     "shippingAmount": {  
         "amount": "10.00",
         "currency": "EUR"
    },
    "orderExpiryMilliseconds": 6000000,
    "channel": "scalapay.com",
    "type":"online",
    "product":"pay-in-3",
    "frequency":{
        "number": 1,
        "frequencyType":"monthly"
    }
  }
{  
    "totalAmount": {  
        "amount": "100.00",
        "currency": "EUR"
    },
    "consumer": {  
        "phoneNumber": "0400000001",
        "givenNames": "Test",
        "surname": "Test",
        "email": "[email protected]"
    },
    "billing": {  
        "name": "Test",
        "line1": "Test",
        "suburb": "Milano",
        "postcode": "20135",
        "countryCode": "IT",
        "phoneNumber": "0400000000"
    },
    "shipping": {  
        "name": "Test",
        "line1": "Test",
        "suburb": "Milano",
        "postcode": "20135",
        "countryCode": "IT",
        "phoneNumber": "0400000000"
    },
    "items":[  
         {
             "name": "32",
             "category": "clothes",
             "subcategory": ["shirt", "long-sleeve"],
             "brand": "TopChoice",
             "gtin": "123458791330",
             "sku": "12341234",
             "quantity": 1,
             "price": {
                 "amount": "10.00",
                 "currency": "EUR"
             }
         },
         {
             "name": "Jeans",
             "category": "clothes",
             "subcategory": ["pants", "jeans"],
             "brand": "TopChoice",
             "gtin": "123458722222",
             "sku": "12341235",
             "quantity": 1,
             "price": {
                 "amount": "20.00",
                 "currency": "EUR"
             }
         }
    ],
    "discounts": [
        {
            "displayName": "10% Off",
            "amount": {
                "amount": "103.00",
                "currency": "EUR"
            }
        }
    ],
    "merchant": {
        "redirectConfirmUrl": "https://scalapay.com",
        "redirectCancelUrl": "https://scalapay.com"
    },
    "merchantReference": "merchantOrder-1234",
     "taxAmount": {  
        "amount": "3.70",
        "currency": "EUR"
     },
     "shippingAmount": {  
         "amount": "10.00",
         "currency": "EUR"
    },
    "orderExpiryMilliseconds": 6000000,
    "channel": "scalapay.com",
        "type":"online",
    "product":"pay-in-4",
    "frequency":{
        "number": 1,
        "frequencyType":"monthly"
    }
  }
{  
    "totalAmount": {  
        "amount": "100.00",
        "currency": "EUR"
    },
    "consumer": {  
        "phoneNumber": "0400000001",
        "givenNames": "Test",
        "surname": "Test",
        "email": "[email protected]"
    },
    "billing": {  
        "name": "Test",
        "line1": "Via Test, 58",
        "suburb": "Milano",
        "postcode": "20135",
        "countryCode": "IT",
        "phoneNumber": "0400000000"
    },
    "shipping": {  
        "name": "Tesr",
        "line1": "Via Test, 58",
        "suburb": "Milano",
        "postcode": "20135",
        "countryCode": "IT",
        "phoneNumber": "0400000000"
    },
    "items":[  
         {
             "name": "32",
             "category": "clothes",
             "subcategory": ["shirt", "long-sleeve"],
             "brand": "TopChoice",
             "gtin": "123458791330",
             "sku": "12341234",
             "quantity": 1,
             "price": {
                 "amount": "10.00",
                 "currency": "EUR"
             }
         },
         {
             "name": "Jeans",
             "category": "clothes",
             "subcategory": ["pants", "jeans"],
             "brand": "TopChoice",
             "gtin": "123458722222",
             "sku": "12341235",
             "quantity": 1,
             "price": {
                 "amount": "20.00",
                 "currency": "EUR"
             }
         }
    ],
    "discounts": [
        {
            "displayName": "10% Off",
            "amount": {
                "amount": "103.00",
                "currency": "EUR"
            }
        }
    ],
    "merchant": {
        "redirectConfirmUrl": "https://scalapay.com",
        "redirectCancelUrl": "https://scalapay.com"
    },
    "merchantReference": "merchantOrder-1234",
     "taxAmount": {  
        "amount": "3.70",
        "currency": "EUR"
     },
     "shippingAmount": {  
         "amount": "10.00",
         "currency": "EUR"
    },
    "orderExpiryMilliseconds": 6000000,
    "channel": "scalapay.com",
        "type":"online",
    "product":"later",
    "frequency":{
        "number": 14,
        "frequencyType":"daily"
    }
  }

Successful Response (200)

AttributeTypeDescription
tokenstringScalapay order unique token.
expiresdatetimeDate and time of the order to expire in ISO 8601 format.
checkoutUrlstringRedirect Url to the Scalapay checkout.

Example Response

{
    "token": "WSG16DYX62BX",
    "expires": "2022-09-08T15:58:28.000Z",
    "checkoutUrl": "https://portal.integration.scalapay.com/checkout/WSG16DYX62BX"
}