Selects one of the cart's payment methods, freezing the contract it resolves to on the cart's items so subsequent reads and the checkout use the contract's prices. The payment method must be usable. Adding, configuring or removing an item clears the selection again.
Responses
-
The payment method was selected for the cart.
-
The request parameters are missing or invalid.
-
Client authentication failed.
-
Missing one or more required scopes.
-
The specified cart or payment method was not found.
-
The payment method is not usable for the cart, the cart has an ongoing or completed checkout, or the cart is currently being modified.
-
An unexpected error occurred.
POST
/2026-4/carts/{cartId}/payment-method
curl \
--request POST 'https://api.pace.cloud/cart/2026-4/carts/9239a6a6-de5b-4ccc-ba58-40ede174a5a0/payment-method' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"paymentMethodId": "f90731f2-3628-4194-a628-6a36b7058405"
}'
Request examples
{
"paymentMethodId": "f90731f2-3628-4194-a628-6a36b7058405"
}
Response examples (200)
{
"data": {
"checkout": {
"cancelledAt": "2023-05-15T14:30:00.000Z",
"completedAt": "2023-05-15T15:00:00.000Z",
"failedAt": "2023-05-15T14:30:00.000Z",
"failureCode": "INSUFFICIENT_FUNDS",
"id": "f1e2d3c4-b5a6-4789-9c0d-1e2f3a4b5c6d",
"startedAt": "2023-05-15T14:00:00.000Z",
"status": "PROCESSING"
},
"clientId": "pace-drive-app",
"createdAt": "2023-05-15T14:00:00.000Z",
"expiresAt": "2023-05-16T14:30:00.000Z",
"id": "ae1b58ef-ba5c-4240-b130-51fcf067d40d",
"paymentMethodId": "ecbec75f-7ca4-4017-a485-6a4836de5d25",
"poiId": "96a939ea-28d4-4228-b45c-192904ba91d7",
"status": "OPEN",
"summary": {
"currency": "EUR",
"priceExcludingVAT": "61.26",
"priceIncludingVAT": "72.90",
"vatAmount": "11.64"
},
"updatedAt": "2023-05-15T14:15:00.000Z",
"userId": "e9166a60-1f92-4a5d-a192-c2f6b662e9d9"
}
}