1. Payments
Casharc
Merchant
  • Merchant
  • Getting Started
    • Introduction
    • Authentication
    • Quickstart
  • Core Concepts
    • Statuses
    • Status Codes
  • Guides
    • Idempotency
    • Metadata
  • Payments
    • Create Payment
      POST
    • List Payments
      GET
    • Retrieve Payment
      GET
    • Confirm Payment
      POST
    • 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
  • Files
    • Upload File
  • Webhook
    • Overview
    • Event Types
    • Verifying
    • Payment Event
    • Payout Event
    • Appeal Event
  1. Payments

Refund Payment

POST
/payments/{id}/refund

Request

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

Header Params

Body Params application/json

Examples

Responses

🟢200
application/json
Bodyapplication/json

🟠400
🟠401
🟠403
🟠404
🟠409
🟠422
Request Request Example
Shell
JavaScript
Java
Swift
curl --location '/payments/txn_2n1TLgiZFvF7DZuL/refund' \
--header 'Idempotency-Key: 88539edd-6f8c-47c5-91a9-10834cd9ed38' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "amount": "1000.00",
    "currency": "XTS"
}'
Response Response Example
200 - Example
{
    "data": {
        "id": "txn_2n1TLgiZFvF7DZuL",
        "type": "payment",
        "requested": {
            "amount": "1000.00",
            "currency": "XTS"
        },
        "initialized": {
            "amount": "1000.00",
            "currency": "XTS"
        },
        "processed": {
            "amount": "1000.00",
            "currency": "XTS"
        },
        "refunded": {
            "amount": "1000.00",
            "currency": "XTS"
        },
        "requisite": {
            "type": "card",
            "card": "4242424242424242",
            "holder": "Test User",
            "bank": "Test Bank"
        },
        "payment_url": "https://pay.casharc.pro/txn_2n1TLgiZFvF7DZuL?token=…",
        "status": "refunded",
        "status_code": "refunded",
        "created_at": "2026-01-01T00:21:56Z",
        "expires_at": "2026-01-01T00:22:56Z",
        "finalized_at": "2026-01-01T00:34:12Z",
        "metadata": {}
    }
}
Previous
Cancel Payment
Next
Create Payout
Built with