Slope Orders API
The Orders API from Slope — 11 operation(s) for orders.
The Orders API from Slope — 11 operation(s) for orders.
openapi: 3.0.0
info:
title: Slope v4 Auth Orders API
description: 'Slope v4 API - embedded credit and B2B buy-now-pay-later (BNPL) infrastructure: customers, orders/checkout, adjustments (refunds), repayments, payout accounts, prescreens, transactions, and sandbox simulation.'
version: 1.0.0
contact:
name: Slope Developer Support
url: https://developers.slopepay.com/
email: support@slopepay.com
servers:
- url: https://api.slopepay.com
description: production
- url: https://api.sandbox.slopepay.com
description: sandbox
tags:
- name: Orders
paths:
/v4/orders:
post:
description: Creates a new order for checkout. Returns both a code for Slope.JS widget and full URL for redirect flow
parameters:
- name: Slope-Access-Token
in: header
description: The access token returned from exchanging the short lived authorizationCode /v4/auth/token endpoint.
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrderV4RequestDto'
responses:
'201':
description: The created order. Returns either a standard order or a composable order depending on the uiType.
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/OrderEntityV4ResponseDto'
- $ref: '#/components/schemas/ComposableOrderV4ResponseDto'
examples:
standardOrder:
summary: Standard created order
value:
id: ord_123
externalId: ext_order_123
customerId: cust_123
number: '00000001'
checkoutCode: ABC123
checkoutUrl: https://checkout.slope.so/ABC123
total: 55000
merchantFee: 0
customerFee: 0
customerFeePercentage: null
totalWithFees: 55000
amountCanceledPrincipal: 0
amountCanceledFee: 0
amountRefundedPrincipal: 0
amountRefundedFee: 0
status: approved
finalizedAt: null
openedAt: null
currency: usd
selectedTermName: null
selectedTermDays: null
selectedPaymentType: null
metadata: null
paymentSchedule: []
composableOrder:
summary: Composable order (when uiType is "composable")
value:
id: ord_123
externalId: ext_order_123
total: 55000
currency: usd
selectedQuoteId: quote_123
quotes:
- id: quote_123
name: Net 30
totalWithFees: 105000
financingFeePct: 2.5
financingFeeTotal: 2500
originalTotalWithFees: 105000
originalFinancingFeeTotal: 2500
originalFinancingFeePct: 2.5
durationInDays: 30
customerFeePercentage: 0
schedule:
- amount: 55000
date: '2024-02-15'
iframeUrls:
checkbox: https://checkout.slope.so/composable/checkbox.html?orderCode=ABC123&secret=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...
expiresAt: '2024-01-15T11:00:00Z'
'400':
description: Bad Request - Invalid request format or validation errors
content:
application/json:
schema:
type: object
properties:
statusCode:
type: integer
description: HTTP status code
example: 400
code:
type: string
description: Unique error code identifying the specific error type
message:
type: string
description: Human-readable error message explaining what went wrong
required:
- statusCode
- code
- message
additionalProperties: false
examples:
customerNoPreferredPaymentMethod:
summary: Customer no preferred payment method
value:
statusCode: 400
customer:
externalId: ''
customerMerchants: []
code: customer-no-preferred-payment-method
message: Please add or update your repayment method on your Slope Portal in order to use Pay Later for Business. For assistance, contact <mailto:support@slopepay.com|support@slopepay.com>.
invalidPaymentMethod:
summary: Invalid payment method
value:
statusCode: 400
code: invalid-payment-method
message: Please add or update your repayment method on your Slope Portal in order to use Pay Later for Business. For assistance, contact support@slopepay.com.
orderTotalNegative:
summary: Order total negative
value:
statusCode: 400
code: order-total-negative
message: Order total cannot be negative
orderItemsRequired:
summary: Order items required
value:
statusCode: 400
code: order-items-required
message: No order items provided
orderItemsTotalMismatch:
summary: Order items total mismatch
value:
statusCode: 400
code: order-items-total-mismatch
message: Order items total of 100 does not match order total of 200
orderItemDiscountValidation:
summary: Order item discount validation error
value:
statusCode: 400
code: order-item-discount-validation-error
message: Discount cannot be a negative amount. Please check the quantity and unit price for example discounted item name
orderItemPriceValidation:
summary: Order item price validation error
value:
statusCode: 400
code: order-item-price-validation-error
message: Price does not equal quantity * unit price for example item name
'409':
description: Conflict - Request conflicts with current state of the resource
content:
application/json:
schema:
type: object
properties:
statusCode:
type: integer
description: HTTP status code
example: 409
code:
type: string
description: Unique error code identifying the specific error type
message:
type: string
description: Human-readable error message explaining what went wrong
required:
- statusCode
- code
- message
additionalProperties: false
examples:
orderExternalIdConflict:
summary: Order external ID conflict
value:
statusCode: 409
order:
id: ord_example_id
checkoutCode: null
checkoutUrl: null
customerFeePercentage: null
selectedTermName: null
selectedTermDays: null
selectedPaymentType: null
paymentSchedule: []
apr: null
code: order_external_id_conflict
message: A different order ord_example_id with the same external ID already exists ext_order_123.
'422':
description: Unprocessable Entity - Request validation failed
content:
application/json:
schema:
type: object
properties:
statusCode:
type: integer
description: HTTP status code
example: 422
code:
type: string
description: Unique error code identifying the specific error type
message:
type: string
description: Human-readable error message explaining what went wrong
required:
- statusCode
- code
- message
additionalProperties: false
examples:
customerNotFound:
summary: Customer not found
value:
statusCode: 422
code: order-customer-not-found
message: Customer not found or does not belong to merchant
customerMissingPrequalification:
summary: Customer missing prequalification
value:
statusCode: 422
code: missing-customer-prequalification
message: The customer must go through the preapproval flow before creating an order.
customerIneligible:
summary: Customer ineligible
value:
statusCode: 422
code: customer-ineligible
message: The customer is ineligible for Buy Now, Pay Later.
customerAccountNotAvailable:
summary: Customer account not available
value:
statusCode: 422
code: customer-account-not-available
message: Your Slope line is currently unavailable due to an abnormal account status; please check your Slope Portal for pending account actions or contact <mailto:support@slopepay.com|support@slopepay.com> for assistance.
accessTokenMismatch:
summary: Access token mismatch
value:
statusCode: 422
code: order-access-token-mismatch
message: Slope-Access-Token does not match customerId parameter
merchantUnauthorized:
summary: Merchant unauthorized
value:
statusCode: 422
code: order-merchant-unauthorized
message: The merchant is not authorized to access this customer.
orderExternalIdCustomerConflict:
summary: Order external ID customer conflict
value:
statusCode: 422
code: order-external-id-customer-conflict
message: The order was found by externalId but belongs to a different customer. Ensure the externalId and access token belong to the same customer.
noQuotesAvailable:
summary: No quotes available
value:
statusCode: 422
code: order-no-quotes-available
message: No available quotes found on refresh
orderNoOffers:
summary: Order no offers
value:
statusCode: 422
code: order-offers-none
message: The order is not approved for any Pay Later offers.
orderMinimumRejected:
summary: Order minimum rejected
value:
statusCode: 422
code: orders-total-min
message: Order total 100 did not meet order minimum
orderMaxRejected:
summary: Order max rejected
value:
statusCode: 422
code: orders-total-max
message: Order total 1000000000 exceeds order maximum
orderLocalityRejected:
summary: Order locality rejected
value:
statusCode: 422
code: locality-rejected
message: 'Error creating order for customer cust_123 with total 100: Unable to offer a loan for the specified terms in jurisdiction'
orderEvalRejected:
summary: Order evaluation rejected
value:
statusCode: 422
code: order-eval-rejected
message: Order evaluation was rejected
orderPayeeRequired:
summary: Order payee required
value:
statusCode: 422
code: order-payee-required
message: Order payee name and province is required on all order items
'500':
description: Internal Server Error - An unexpected error occurred
content:
application/json:
schema:
type: object
properties:
statusCode:
type: integer
description: HTTP status code
example: 500
code:
type: string
description: Unique error code identifying the specific error type
message:
type: string
description: Human-readable error message explaining what went wrong
required:
- statusCode
- code
- message
additionalProperties: false
examples: {}
security:
- apiKey: []
summary: Create an order
tags:
- Orders
operationId: createOrder
get:
description: Lists all orders using pagination.
parameters:
- name: status
required: false
in: query
description: When specified, only orders with the given status are returned.
schema:
enum:
- pending
- approved
- submitted
- opening
- open
- finalizing
- finalized
- unpaid
- partiallyPaid
- complete
- defaulted
- rejected
- canceled
- refunded
- repayment
type: string
- name: customerId
required: false
in: query
description: When specified, only orders with the given Slope assigned Customer ID or partner assigned Customer ID are returned.
schema:
type: string
- name: limit
required: false
in: query
description: The maximum number of objects to list.
schema:
type: integer
minimum: 0
maximum: 50
- name: orderBy
required: false
in: query
description: The object attribute(s) to sort by.
schema:
type: array
items:
type: string
enum:
- createdAt
- id
- name: order
required: false
in: query
description: The direction to sort by, one of `asc` or `desc`.
schema:
enum:
- asc
- desc
type: string
- name: beforeCursor
required: false
in: query
description: The cursor used to fetch the previous page of objects.
schema:
type: string
- name: afterCursor
required: false
in: query
description: The cursor used to fetch the next page of objects.
schema:
type: string
responses:
'200':
description: The paginated list of orders.
content:
application/json:
schema:
properties:
metadata:
$ref: '#/components/schemas/PageMetaDto'
data:
type: array
items:
$ref: '#/components/schemas/OrderEntityV4ResponseDto'
security:
- apiKey: []
summary: List orders
tags:
- Orders
operationId: listOrders
/v4/orders/{id}:
get:
description: Gets an order by ID.
parameters:
- name: id
required: true
in: path
description: The Slope order ID or the partner external order ID
schema:
type: string
responses:
'200':
description: The current order.
content:
application/json:
schema:
$ref: '#/components/schemas/OrderEntityV4ResponseDto'
examples:
finalized:
summary: Finalized order
value:
id: ord_123
externalId: ext_order_123
customerId: cust_123
number: '00000001'
checkoutCode: null
checkoutUrl: null
total: 1000000
totalFinalized: 1000000
merchantFee: 0
customerFee: 25000
customerFeePercentage: 2.5
totalWithFees: 1025000
amountCanceledPrincipal: 0
amountCanceledFee: 0
amountRefundedPrincipal: 0
amountRefundedFee: 0
status: finalized
finalizedAt: '2024-01-15T10:30:00.000Z'
openedAt: '2024-01-15T10:00:00.000Z'
currency: usd
selectedTermName: Net 30
selectedTermDays: 30
selectedPaymentType: ach
metadata: null
paymentSchedule:
- amount: 1025000
date: '2024-02-14'
amountOutstanding: 1025000
apr: 30
'404':
description: Not Found - The requested resource was not found
content:
application/json:
schema:
type: object
properties:
statusCode:
type: integer
description: HTTP status code
example: 404
code:
type: string
description: Unique error code identifying the specific error type
message:
type: string
description: Human-readable error message explaining what went wrong
required:
- statusCode
- code
- message
additionalProperties: false
examples:
orderNotFound:
summary: Order not found
value:
statusCode: 404
code: order-not-found
message: Order not found
'500':
description: Internal Server Error - An unexpected error occurred
content:
application/json:
schema:
type: object
properties:
statusCode:
type: integer
description: HTTP status code
example: 500
code:
type: string
description: Unique error code identifying the specific error type
message:
type: string
description: Human-readable error message explaining what went wrong
required:
- statusCode
- code
- message
additionalProperties: false
examples: {}
security:
- apiKey: []
summary: Get an order
tags:
- Orders
operationId: getOrder
/v4/orders/{id}/cancel:
post:
description: An API to cancel an order. This is not allowed once order is finalized. You may also cancel on merchant dashboard.
parameters:
- name: id
required: true
in: path
description: The Slope order ID or the partner external order ID
schema:
type: string
responses:
'200':
description: The canceled order
content:
application/json:
schema:
$ref: '#/components/schemas/OrderEntityV4ResponseDto'
examples:
canceled:
summary: Canceled order
value:
id: ord_123
externalId: ext_order_123
customerId: cust_123
number: '00000001'
checkoutCode: null
checkoutUrl: null
total: 55000
merchantFee: 0
customerFee: 0
customerFeePercentage: null
totalWithFees: 0
amountCanceledPrincipal: 55000
amountCanceledFee: 0
amountRefundedPrincipal: 0
amountRefundedFee: 0
status: canceled
finalizedAt: null
openedAt: null
currency: usd
selectedTermName: null
selectedTermDays: null
selectedPaymentType: null
metadata: null
paymentSchedule: []
'404':
description: Not Found - The requested resource was not found
content:
application/json:
schema:
type: object
properties:
statusCode:
type: integer
description: HTTP status code
example: 404
code:
type: string
description: Unique error code identifying the specific error type
message:
type: string
description: Human-readable error message explaining what went wrong
required:
- statusCode
- code
- message
additionalProperties: false
examples:
orderNotFound:
summary: Order not found
value:
statusCode: 404
code: order-not-found
message: Order not found
'422':
description: Unprocessable Entity - Request validation failed
content:
application/json:
schema:
type: object
properties:
statusCode:
type: integer
description: HTTP status code
example: 422
code:
type: string
description: Unique error code identifying the specific error type
message:
type: string
description: Human-readable error message explaining what went wrong
required:
- statusCode
- code
- message
additionalProperties: false
examples:
orderCannotBeCanceled:
summary: Order cannot be canceled
value:
statusCode: 422
code: order-cannot-be-canceled
message: Order with status finalized cannot be canceled. Finalized orders cannot be canceled. To update finalized orders, use the adjustments endpoint.
orderCancelVirtualCardNotAllowed:
summary: Virtual card order cannot be canceled
value:
statusCode: 422
code: order-cancel-virtual-card-not-allowed
message: Orders using a virtual card cannot be canceled when in open status
'500':
description: Internal Server Error - An unexpected error occurred
content:
application/json:
schema:
type: object
properties:
statusCode:
type: integer
description: HTTP status code
example: 500
code:
type: string
description: Unique error code identifying the specific error type
message:
type: string
description: Human-readable error message explaining what went wrong
required:
- statusCode
- code
- message
additionalProperties: false
examples: {}
security:
- apiKey: []
summary: Cancel an order
tags:
- Orders
operationId: cancelOrder
/v4/orders/{id}/finalize:
post:
description: Moves an order from the "open" state to the "finalized" state.
parameters:
- name: id
required: true
in: path
description: The Slope order ID or the partner external order ID
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/FinalizeOrderV4RequestDto'
responses:
'200':
description: The finalized order.
content:
application/json:
schema:
$ref: '#/components/schemas/FinalizeOrderV4ResponseDto'
examples:
finalized:
summary: Finalized order
value:
id: ord_123
externalId: ext_order_123
customerId: cust_123
number: '00000001'
checkoutCode: null
checkoutUrl: null
total: 1000000
totalFinalized: 1000000
merchantFee: 0
customerFee: 25000
customerFeePercentage: 2.5
totalWithFees: 1025000
amountCanceledPrincipal: 0
amountCanceledFee: 0
amountRefundedPrincipal: 0
amountRefundedFee: 0
status: finalized
finalizedAt: '2024-01-15T10:30:00.000Z'
openedAt: '2024-01-15T10:00:00.000Z'
currency: usd
selectedTermName: Net 30
selectedTermDays: 30
selectedPaymentType: ach
metadata: null
paymentSchedule:
- amount: 1025000
date: '2024-02-14'
amountOutstanding: 1025000
apr: 30
finalizing:
summary: Order in finalizing status
value:
id: ord_456
externalId: ext_order_456
customerId: cust_456
number: '00000002'
checkoutCode: null
checkoutUrl: null
total: 750000
totalFinalized: 300000
merchantFee: 0
customerFee: 18750
customerFeePercentage: 2.5
totalWithFees: 768750
amountCanceledPrincipal: 0
amountCanceledFee: 0
amountRefundedPrincipal: 0
amountRefundedFee: 0
status: finalizing
finalizedAt: null
openedAt: '2024-01-15T10:00:00.000Z'
currency: usd
selectedTermName: Net 30
selectedTermDays: 30
selectedPaymentType: ach
metadata: null
paymentSchedule: []
transactionId: le_123abc456def
'400':
description: Bad Request - Invalid request format or validation errors
content:
application/json:
schema:
type: object
properties:
statusCode:
type: integer
description: HTTP status code
example: 400
code:
type: string
description: Unique error code identifying the specific error type
message:
type: string
description: Human-readable error message explaining what went wrong
required:
- statusCode
- code
- message
additionalProperties: false
examples:
orderNotOpen:
summary: Order not open
value:
statusCode: 400
order:
id: ord_example_not_open
status: approved
code: order-not-open
message: The order does not have an open status and cannot be finalized.
orderAlreadyFinalized:
summary: Order already finalized
value:
statusCode: 400
order:
id: ord_example_finalized
status: finalized
code: order-already-finalized
message: The order is already finalized.
orderFinalizePending:
summary: Order finalize pending
value:
statusCode: 400
order:
id: ord_example_finalizing
status: finalizing
code: order-finalize-pending
message: The order is being finalized.
invalidPaymentMethod:
summary: Invalid payment method
value:
statusCode: 400
code: invalid-payment-method
message: The payment method is missing or invalid.
invalidPaymentTerms:
summary: Invalid payment terms
value:
statusCode: 400
code: invalid-payment-terms
message: The payment terms are missing or invalid.
invalidTermsAcceptanceStartDate:
summary: Invalid terms acceptance start date
value:
statusCode: 400
code: invalid-terms-acceptance-date
message: The customer's terms acceptance date is missing or invalid.
'404':
description: Not Found - The requested resource was not found
content:
application/json:
schema:
type: object
properties:
statusCode:
type: integer
description: HTTP status code
example: 404
code:
type: string
description: Unique error code identifying the specific error type
message:
type: string
description: Human-readable error message explaining what wen
# --- truncated at 32 KB (97 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/slope/refs/heads/main/openapi/slope-orders-api-openapi.yml