1. Payments
Casharc
Merchant
  • Merchant
  • Getting Started
    • Introduction
    • Authentication
    • Quickstart
  • Core Concepts
    • Statuses
    • Reason Codes
  • Payments
    • Create Payment
      POST
    • List Payments
      GET
    • Retrieve Payment
      GET
    • Cancel Payment
      POST
    • Refund Payment
      POST
  • Payouts
    • Create Payout
      POST
    • List Payouts
      GET
    • Retrieve Payout
      GET
    • Cancel Payout
      POST
  • Appeals
    • Create Appeal
      POST
    • List Appeals
      GET
    • Retrieve Appeal
      GET
    • Cancel Appeal
      POST
  • Balance
    • Retrieve Balance
      GET
  • Webhook
    • On Status Change
  1. Payments

Cancel Payment

POST
/payments/{paymentId}/cancel

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Path Params

Responses

🟢200
application/json
Bodyapplication/json

🟠401
🟠404
🟠422
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/payments//cancel' \
--header 'Authorization: Bearer <token>'
Response Response Example
200 - Example 1
{
    "data": {
        "id": "string",
        "type": "string",
        "requested": {
            "amount": "string",
            "currency": "string"
        },
        "initialized": {
            "amount": "string",
            "currency": "string"
        },
        "processed": {
            "amount": "string",
            "currency": "string"
        },
        "refunded": {
            "amount": "string",
            "currency": "string"
        },
        "requisite": {
            "type": "string",
            "card_number": "string",
            "card_holder": "string",
            "bank": "string"
        },
        "status": "string",
        "expires_at": "string",
        "created_at": "string",
        "updated_at": "string",
        "metadata": {}
    }
}
Previous
Retrieve Payment
Next
Refund Payment
Built with