API Reference

Cancel payment

Cancel a payment that has not already been finalized.

POSThttps://api.argonpay.app/graphqlcancelPayment

Cancels a payment that is not already finalized (completed, expired, or cancelled). Takes txnid only.

Endpoint

POST https://api.argonpay.app/graphql

Mutation

GraphQL
mutation CancelPayment($txnid: String!) {
cancelPayment(txnid: $txnid) {
code
message
transaction {
txnid
amount
status
network
createdAt
}
}
}

Arguments

NameTypeRequiredDescription
txnidString!YesTransaction ID to cancel

Example variables

JSON
{
"txnid": "YOUR_TXNID"
}

REST equivalent

See REST cancel payment (POST /cancel-payment).