API Reference
Cancel payment
Cancel a payment that has not already been finalized.
Cancels a payment that is not already finalized (completed, expired, or cancelled). Takes txnid only. GraphQL-only — there is no REST wrapper in v2.
If the custodian has a callbackUrl, a cancellation webhook may be sent.
Endpoint
POST https://api.argonpay.app/graphql
Mutation
mutation CancelPayment($txnid: String!) { cancelPayment(txnid: $txnid) { code message transaction { txnid amount status network createdAt } }}Arguments
| Name | Type | Required | Description |
|---|---|---|---|
txnid | String! | Yes | Transaction ID to cancel |
Example variables
{ "txnid": "YOUR_TXNID"}Webhook preview
Preview callback payload
Argonpay POSTs JSON to your custodian callbackUrl when a payment completes, expires, or is cancelled. Adjust the fields below to see the exact body shape, then optionally send a test request to your endpoint.
