Migrating from V3 API

Purpose

The purpose of a new V4 API is to support global Slope customer accounts, which allows for customers to apply once for pre-approval amounts and use a single account across any Slope merchant. Historically with the V3 API, the customer object was created by merchants thus creating duplicate accounts for buyers.

This early mock screenshot shows the start of checkout experience, first requiring a user to login or sign up

This early mock screenshot shows the start of checkout experience, first requiring a user to login or sign up

Product enhancements

By eliminating the responsibility of customer management from merchants, developer API setup is simplified and additional product improvements are gained:

  1. Increased sales by leveraging a larger addressable market of users with a pre-existing Slope account
  2. Improved security & fraud protection with required authentication from Slope during checkout
  3. More accurate & up to date customer information directly from Slope's customer data set

V4 API changes

We've designed the new API to be nearly identical to V3 API to ease the transition. Most endpoints will look the same as before. At a high level, you'll only be calling the /v4/orders endpoint during checkout.

POST /v4/orders to create a new order. Note the customer field is now gone.

{
   "amount": 12345,
   "currency": "usd",
   "externalId": "your_reference_id"
   // ... other fields similar to v3/orders API
}

This endpoint will return a JSON body response like this

{
  "checkoutUrl": "https://checkout.slope.so/pay?code=1234",
  "checkoutCode": "XXX",
  "id": "ord_123",
  "number": "12345678",
  // ... other fields
}

Depending on your front-end implementation, you will use the checkoutCode for the Slope.js modal OR redirect the user to the checkoutUrl for the low-code redirect flow.

Notable changes from V3 API

  1. There won't be any /v4/customers POST endpoints. GET endpoints will be available but only return customers that have linked an order to your merchant.
  2. The customerId field will remain NULL until after an order is open status.
  3. The standalone pre_qualify flow will be replaced by redirecting users to pay.slope.so to sign up and get their limits.
  4. The Slope.js SDK now pre-loads an iframe in the background upon page-load. This provides a smooth user experience as the modal pop ups immediately.

Improved developer experience

  1. There won't be a need to make a separate call to POST /v3/orders/intent as the the checkoutCode will be returned automatically during order creation. Because authentication sessions are now handled by Slope, the checkoutCode will no longer expire.
  2. Simple GET filter query params will be supported like /v4/orders?status=open and /v4/customers?phone=14151234567