Order Lifecycle
After receiving a payment confirmation webhook, use the Croissant Retailer API to manage the order through its lifecycle — fulfillment, cancellation, and returns.
Base URLs
| Environment | Base URL |
|---|---|
| Production | https://api.retailer.croissant.com/v0 |
| Sandbox | https://api.retailer.sbx.croissant.com/v0 |
Authentication
All API requests require a Bearer token. Obtain one using your client credentials:
# Example: obtain a token
curl -X POST https://api.retailer.sbx.croissant.com/v0/token \
-H "Content-Type: application/json" \
-d '{"clientId": "your-client-id", "clientSecret": "your-client-secret"}'Order Flow
payment.confirmed webhook → create order in your systemPOST /carts to register the order with CroissantPOST /carts/:id/fulfill to mark as fulfilledPOST /carts/:id/cancel insteadEndpoints
Create Order
Register an order with Croissant. This should be called after you receive the payment confirmed webhook and create the order in your system.
Get Order
Retrieve order details including buyback pricing information.
Fulfill Order
Mark an order as fulfilled when it has been shipped or delivered. This triggers settlement processing.
# Example: fulfill an order
curl -X POST https://api.retailer.sbx.croissant.com/v0/carts/550e8400-e29b-41d4-a716-446655440000/fulfill \
-H "Authorization: Bearer eyJhbGciOiJSUzI1NiIs..."Cancel Order
Cancel an order. This voids the Croissant Pay session and releases any card hold.
Returns & Refunds
To be updated.
Error Handling
The API returns standard HTTP status codes with a JSON error body:
| Status | Meaning |
|---|---|
200 / 201 | Success |
400 | Bad request — check the request body |
401 | Unauthorized — missing or invalid token |
403 | Forbidden — insufficient scopes |
404 | Not found — invalid order ID |
422 | Unprocessable — validation error |
500 | Server error — retry with backoff |
// Error response format
{
"message": "Cart not found"
}Questions? Contact partnerships@croissant.com or reach out to your partnership manager. For a high-level overview, return to the Introduction.