curl --request POST \
--url https://api.farthing.ai/v1/checkouts/{id}/actions/{actionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "submit",
"values": {
"Size": "M",
"Color": "Black"
}
}
'
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"target": {
"url": "<string>",
"kind": "direct_url",
"request": "<string>",
"merchantContext": "<string>",
"allowedDomains": [
"<string>"
],
"countryCode": "<string>"
},
"constraints": {
"maxCost": {
"amount": "42.10",
"currency": "USD"
}
},
"metadata": {},
"progressItems": [
{
"kind": "step",
"label": "<string>",
"data": {},
"at": "2023-11-07T05:31:56Z",
"sequence": 123
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"subject": "user_a91f",
"buyerProfileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"browser": {
"embedTokenUrl": "/v1/checkouts/1f2e3d4c-5b6a-4790-8123-abcdef012345/embed-token",
"permissions": [
"read"
]
},
"pendingUserAction": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>",
"responseSchema": {},
"expiresAt": "2023-11-07T05:31:56Z",
"key": "variant",
"detectedTotal": {
"amount": "42.10",
"currency": "USD"
}
},
"failure": {
"reason": "max_cost_exceeded"
},
"receipt": {
"total": {
"amount": "42.10",
"currency": "USD"
},
"merchantOrderId": "<string>",
"evidence": {}
}
}
Checkouts
Answer or decline a user action
Submit the values described by the action’s responseSchema, or decline to abandon the purchase. Declining is a first-class outcome, not an error path: the run stops immediately and the checkout fails with user_cancelled.
The response is the full checkout, re-serialized, with pendingUserAction gone.
Values for card, credentials and otp actions are fully redacted in the audit record and the raw copy goes to a transient, delete-on-read store consumed by the one step that types it.
Requires the checkouts.write scope.
POST
/
v1
/
checkouts
/
{id}
/
actions
/
{actionId}
curl --request POST \
--url https://api.farthing.ai/v1/checkouts/{id}/actions/{actionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "submit",
"values": {
"Size": "M",
"Color": "Black"
}
}
'
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"target": {
"url": "<string>",
"kind": "direct_url",
"request": "<string>",
"merchantContext": "<string>",
"allowedDomains": [
"<string>"
],
"countryCode": "<string>"
},
"constraints": {
"maxCost": {
"amount": "42.10",
"currency": "USD"
}
},
"metadata": {},
"progressItems": [
{
"kind": "step",
"label": "<string>",
"data": {},
"at": "2023-11-07T05:31:56Z",
"sequence": 123
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"subject": "user_a91f",
"buyerProfileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"browser": {
"embedTokenUrl": "/v1/checkouts/1f2e3d4c-5b6a-4790-8123-abcdef012345/embed-token",
"permissions": [
"read"
]
},
"pendingUserAction": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>",
"responseSchema": {},
"expiresAt": "2023-11-07T05:31:56Z",
"key": "variant",
"detectedTotal": {
"amount": "42.10",
"currency": "USD"
}
},
"failure": {
"reason": "max_cost_exceeded"
},
"receipt": {
"total": {
"amount": "42.10",
"currency": "USD"
},
"merchantOrderId": "<string>",
"evidence": {}
}
}
Authorizations
Path Parameters
Body
application/json
Response
Resolved. The full checkout, without pendingUserAction.
The whole state of one run. This is what you poll.