v1

latestOpenAPI 3.0.02026-07-244074117.0 KB
Orders

Create an order

Creates a new order for checkout. Returns both a code for Slope.JS widget and full URL for redirect flow

post/v4/orders

Headers

Slope-Access-Tokenstring required

The access token returned from exchanging the short lived authorizationCode /v4/auth/token endpoint.

Request body

totalnumber required

Total amount of the order, in cents. Must be greater than 0

currency'mxn' | 'usd' required
externalIdstring required

The external ID of the order, used for merchant reference. Must be unique.

customerIdstring

Optional: The Slope customer ID for this order. If set, only this Slope customer will be able to access the order.

contactBusinessNamestring

The customer business name

contactEmailstring

The customer email address

contactFirstNamestring

The customer first name

contactLastNamestring

The customer last name

contactDesiredLimitstring

The desired funding limit for the customer, in cents.

contactPhonestring

The customer phone number in E.164 format.

taxIdstring

The Federal EIN / Tax ID of this business. Must be 9 digits.

payoutAccountIdstring

If provided, overrides the default payout account for this order

payeeExternalIdstring

The external ID of the payee receiving the payout for this order

payeeNamestring

The name of the payee receiving the payout for this order

resumeUrlstring

(Optional) The URL to redirect the user if an order is approved offline. Relevant only if an order transitions from "pending" to "approved" status.

cancelUrlstring

(Optional) The URL to redirect to if the user cancels the checkout. Relevant for redirect flow only

successUrlstring

(Optional) The URL to redirect to if the user completes the checkout. Relevant for redirect flow only

metadataobject

Any additional metadata to attach to the order. This takes in a object

uiType'composable'

Example request

{
  "billingAddress": {
    "line1": "123 Main St",
    "city": "San Francisco",
    "country": "US",
    "state": "CA",
    "postalCode": "94107"
  }
}

Response

The created order. Returns either a standard order or a composable order depending on the uiType.

OR

Example response

{
  "paymentSchedule": [
    {
      "date": "2024-01-01"
    }
  ],
  "quotes": [
    {
      "payments": [
        {
          "number": 1,
          "date": "2024-02-15T00:00:00Z",
          "principal": 95000,
          "customerFee": 500,
          "amount": 105000,
          "financingFee": 2500
        }
      ]
    }
  ]
}