Creates a checkout attempt for a cart using the payment method currently selected on it. Select one via POST /carts/{cartId}/payment-method first; retrying with a different payment method means selecting that method and creating another checkout.
Body
Required
-
The redirect URLs the client is sent to when completing the checkout's interactive actions (e.g. 3-D Secure). All three are required together when provided.
-
The unique identifier of the cart to check out.
-
The metadata to pass to the payment service during payment authorization.
Additional properties are allowed.
Responses
-
The checkout has been successfully created.
-
The request parameters are missing or invalid, or the cart has no payment method selected.
-
Client authentication failed.
-
Missing one or more required scopes.
-
The specified cart was not found.
-
The cart already has a checkout in progress, has already completed a checkout, is being modified concurrently, or has reached its checkout attempt limit.
-
An unexpected error occurred.
curl \
--request POST 'https://api.pace.cloud/cart/2026-4/checkouts' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"actions": {
"cancelRedirectUrl": "https://example.com/actions/cancel",
"failureRedirectUrl": "https://example.com/actions/failure",
"successRedirectUrl": "https://example.com/actions/success"
},
"cartId": "ae1b58ef-ba5c-4240-b130-51fcf067d40d",
"metadata": {}
}'
{
"actions": {
"cancelRedirectUrl": "https://example.com/actions/cancel",
"failureRedirectUrl": "https://example.com/actions/failure",
"successRedirectUrl": "https://example.com/actions/success"
},
"cartId": "ae1b58ef-ba5c-4240-b130-51fcf067d40d",
"metadata": {}
}
{
"data": {
"actions": {
"cartItemId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"default": "7495345",
"description": "The car mileage is required to complete the cart checkout.",
"format": "TEXT",
"label": "Car Mileage",
"maximum": "100.00",
"minimum": "10.00",
"name": "CAR_MILEAGE",
"optional": false,
"pattern": "^[0-9]+$",
"type": "INPUT"
},
"actionsUrl": "https://example.com/checkout/actions",
"cancelledAt": "2023-05-15T14:30:00.000Z",
"cartId": "ae1b58ef-ba5c-4240-b130-51fcf067d40d",
"completedAt": "2023-05-15T14:05:00.000Z",
"failedAt": "2023-05-15T14:00:05.000Z",
"failureCode": "INSUFFICIENT_FUNDS",
"id": "f1e2d3c4-b5a6-4789-9c0d-1e2f3a4b5c6d",
"items": [
{
"cancelledAt": "2023-05-15T14:03:00.000Z",
"cartItemId": "9b21c7e4-5d3a-4f8b-a1c6-7e2d9f4b0a53",
"completedAt": "2023-05-15T14:05:00.000Z",
"failedAt": "2023-05-15T14:04:00.000Z",
"failureCode": "UNKNOWN",
"id": "3f8a1c2d-4e5b-4a6c-8d7e-9f0a1b2c3d4e",
"startedAt": "2023-05-15T14:00:02.000Z",
"status": "COMPLETED"
}
],
"payment": {
"authorizedAmount": "45.00",
"authorizedAt": "2023-05-15T14:00:05.000Z",
"cancelledAt": "2023-05-15T14:30:00.000Z",
"capturedAmount": "45.00",
"capturedAt": "2023-05-15T14:05:00.000Z",
"currency": "EUR",
"failedAt": "2023-05-15T14:00:05.000Z",
"failureCode": "INSUFFICIENT_FUNDS",
"status": "AUTHORIZED",
"transactionId": "9c2f1e7a-3b4d-4f8a-9c1e-2d6b8a0f5e3c"
},
"paymentMethodId": "ecbec75f-7ca4-4017-a485-6a4836de5d25",
"retryable": false,
"settlement": {
"completedAt": "2023-05-15T14:10:00.000Z",
"failedAt": "2023-05-15T14:09:30.000Z",
"startedAt": "2023-05-15T14:09:00.000Z",
"status": "PENDING"
},
"startedAt": "2023-05-15T14:00:00.000Z",
"status": "PROCESSING"
}
}