createPaymentCheckout
Requires a customer (portal or buyer app) session.
Start an online payment checkout. Creates an AWAITING_PAYMENT order (or reuses an existing one on retry) and returns the hosted checkout URL.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation CreatePaymentCheckout($input: CreatePaymentCheckoutInput!) {
createPaymentCheckout(input: $input) {
orderNumber
checkoutUrl
expiresAt
orderId
transactionId
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation CreatePaymentCheckout($input: CreatePaymentCheckoutInput!) {\n createPaymentCheckout(input: $input) {\n orderNumber\n checkoutUrl\n expiresAt\n orderId\n transactionId\n }\n}",
"variables": {
"input": {
"idempotencyKey": "string",
"returnUrl": "string"
}
}
}
EOF
Variables:
{
"input": {
"idempotencyKey": "string",
"returnUrl": "string"
}
}
Response:
{
"data": {
"createPaymentCheckout": {
"orderNumber": "string",
"checkoutUrl": "string",
"expiresAt": "2025-01-15T00:00:00Z",
"orderId": "id",
"transactionId": "id"
}
}
}
createPaymentCheckout(
input: CreatePaymentCheckoutInput!
): MobilePaymentCheckout!
Arguments
createPaymentCheckout.input ● CreatePaymentCheckoutInput! non-null input
The details of the payment checkout to create.
Type
MobilePaymentCheckout object
Result of createPaymentCheckout: the hosted checkout URL + order context.