Passer au contenu principal
POST
/
v2
/
customer
/
{customer_uuid}
/
order
Create order by customer
curl --request POST \
  --url https://sandbox.gateway.sezzle.com/v2/customer/{customer_uuid}/order \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "intent": "AUTH",
  "reference_id": "annual_sub_123",
  "order_amount": {
    "amount_in_cents": 5000,
    "currency": "USD"
  }
}
'
{
  "uuid": "6c9db5d4-d09a-4224-860a-b5438ac32ca8",
  "links": [
    {
      "href": "https://gateway.sezzle.com/v2/order/6c9db5d4-d09a-4224-860a-b5438ac32ca8",
      "method": "GET",
      "rel": "self"
    },
    {
      "href": "https://gateway.sezzle.com/v2/order/6c9db5d4-d09a-4224-860a-b5438ac32ca8",
      "method": "PATCH",
      "rel": "self"
    },
    {
      "href": "https://gateway.sezzle.com/v2/order/6c9db5d4-d09a-4224-860a-b5438ac32ca8/release",
      "method": "POST",
      "rel": "release"
    },
    {
      "href": "https://gateway.sezzle.com/v2/order/6c9db5d4-d09a-4224-860a-b5438ac32ca8/capture",
      "method": "POST",
      "rel": "capture"
    },
    {
      "href": "https://gateway.sezzle.com/v2/order/6c9db5d4-d09a-4224-860a-b5438ac32ca8/refund",
      "method": "POST",
      "rel": "refund"
    }
  ],
  "intent": "AUTH",
  "reference_id": "annual_sub_123",
  "order_amount": {
    "amount_in_cents": 5000,
    "currency": "USD"
  },
  "authorization": {
    "authorization_amount": {
      "amount_in_cents": 5000,
      "currency": "USD"
    },
    "approved": true,
    "expiration": "2020-04-23T16:13:44Z"
  }
}
Il est extrêmement important de noter que cette API retournera un succès 200 si la demande de création d’une commande est réussie (c’est-à-dire sans erreurs) mais que le client n’a pas pu être approuvé pour la commande.Note: Si vous prévoyez de tokeniser un client dans le but de créer des commandes par un client, veuillez noter que ces commandes n’incluront aucune option de financement.

Autorisations

Authorization
string
header
requis

The authentication token generated from providing API Keys to Sezzle Gateway

En-têtes

Sezzle-Request-Id
string

Unique client-generated ID to enforce idempotency

Paramètres de chemin

customer_uuid
string
requis

The Customer UUID for which to create the order

Corps

application/json
intent
enum<string>
requis
  • Use CAPTURE if payment should be captured immediately upon shopper authorization
  • Use AUTH if there is any post-authorization validation needed prior to capture, such as inventory validation or regulatory requirements, or if merchant policy is to charge the payment method at time of shipment
    • Submit a capture request via the API or your Merchant Dashboard before the authorization expires.
    • The authorization expiration window can be set from 30 minutes up to 7 days in your Merchant Dashboard Settings.
  • If not specified, the value will default to CAPTURE
Options disponibles:
AUTH,
CAPTURE
reference_id
string
requis

The checkout or cart ID from the merchant, currently used for tracking only (must contain only alphanumeric characters, dashes (-), and underscores (_))

order_amount
object
requis

A Price object containing the total amount in cents of the order, which must be at least 100 which is $1.00. Please note your merchant configuration might have a higher minimum.

Réponse

Successful Operation

uuid
string

The unique identifier for this response

Available API links prefilled with UUID with accompanying method

intent
enum<string>
  • Use CAPTURE if payment should be captured immediately upon shopper authorization
  • Use AUTH if there is any post-authorization validation needed prior to capture, such as inventory validation or regulatory requirements, or if merchant policy is to charge the payment method at time of shipment
    • Submit a capture request via the API or your Merchant Dashboard before the authorization expires.
    • The authorization expiration window can be set from 30 minutes up to 7 days in your Merchant Dashboard Settings.
  • If not specified, the value will default to CAPTURE
Options disponibles:
AUTH,
CAPTURE
reference_id
string

The checkout or cart ID from the merchant, currently used for tracking only (must contain only alphanumeric characters, dashes (-), and underscores (_))

order_amount
object

A Price object containing the total amount in cents of the order, which must be at least 100 which is $1.00. Please note your merchant configuration might have a higher minimum.

authorization
object

The authorization details for the order