For the complete documentation index, see llms.txt. This page is also available as Markdown.

Cancel a Payment Request

This reference describes the server-side API used to cancel a payment request. Use this endpoint to terminate a transaction that has not yet been finalized.

Endpoint

Method: POST

Environment
Base URL

Sandbox

https://sandbox.codapayments.com/airtime/api/restful/v2.0/Payment/Cancel

Production

https://airtime.codapayments.com/airtime/api/restful/v2.0/Payment/Cancel

Request Body

The request body must be sent in JSON format and include the following parameters:

Parameter
Type
Required
Description

cancelPaymentRequest.apiKey

string

Yes

Your Coda API key for authentication.

cancelPaymentRequest.projectId

string

Yes

The unique identifier for your project.

cancelPaymentRequest.txnId

string

Yes

The transaction ID associated with the payment to be captured.

Example Request

{
  "cancelPaymentRequest": {
    "apiKey": "your_api_key_here",
    "projectId": "your_project_id",
    "txnId": "123456789"
  }
}

Response

A successful request returns a confirmation that the capture request has been acknowledged.

Example Response

Last updated

Was this helpful?