TanqoryDocs

tanqoryExtInvoicePaymentStart

  • Mutation
  • Storefront

Pays the invoice's amount due, with a card vault session through the payments account (sessionId, as cartPaymentUpdate's directPaymentMethod) or an option of paymentOptions (optionId; a gateway account's card option takes sessionId too when its gateway takes the card from the card vault, none when the gateway takes the card itself on its page or in its browser SDK, e.g. 2C2P, Omise, GB Prime Pay; a manual method pays a draft only). attemptToken makes it idempotent: the same token, or a payment already processing, waiting or done for this invoice, answers that attempt again. The answer is the same union as cartCompletionAttempt: Success (the draft's new order, or the order paid), Failed, Processing, or ActionRequired, finished with tanqoryExtCheckoutPaymentAction / tanqoryExtCheckoutPaymentActionComplete and polled with cartCompletionAttempt like a cart's attempt. A gateway sends the buyer back to https://<shop domain>/checkout/invoice/processing?attempt=<attempt id>.

Arguments

ArgumentTypeRequiredDefault
kindTanqoryExtInvoiceKind!Required
idID!Required
tokenString!Required
attemptTokenString!Required
paymentTanqoryExtInvoicePaymentInput!Required

Returns

TanqoryExtInvoicePaymentStartPayload!

FieldTypeDescription
resultCartCompletionAttemptResult
userErrors[CartUserError!]!

Example request

A starting point: required arguments as variables and a few fields of the result. Replace the placeholders.

Set STORE_ID and TANQORY_STOREFRONT_TOKEN in your environment first (Make your first API call).

curl
curl -X POST "https://$STORE_HOST/api/v1/stores/$STORE_ID/2026-10/graphql" \
  -H "X-Tanqory-Storefront-Access-Token: $TANQORY_STOREFRONT_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{"query":"mutation TanqoryExtInvoicePaymentStart($kind: TanqoryExtInvoiceKind!, $id: ID!, $token: String!, $attemptToken: String!, $payment: TanqoryExtInvoicePaymentInput!) {\n  tanqoryExtInvoicePaymentStart(kind: $kind, id: $id, token: $token, attemptToken: $attemptToken, payment: $payment) {\n    userErrors {\n      code\n      field\n      message\n    }\n  }\n}","variables":{"kind":"DRAFT_ORDER","id":"gid://tanqory/Type/id","token":"","attemptToken":"","payment":{"amount":{"amount":"","currencyCode":"USD"}}}}'

Built from commit c0b3fb3fdef7 · API version 2026-10