1. Getting Started
Casharc
Merchant
  • Merchant
  • Getting Started
    • Introduction
    • Authentication
    • Quickstart
  • Core Concepts
    • Statuses
    • Reason 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
  • Webhook
    • Verifying webhooks
    • On Status Change
  1. Getting Started

Quickstart

This guide walks you through creating your first payment and checking its status. You'll
need your API keys.

1. Create a payment#

Send a POST request to /payments with the amount, currency, and your own reference.
Use the Idempotency-Key header so a retried request never creates a duplicate payment.

2. Read the response#

The payment is returned immediately with a status of processing:
{
  "data": {
    "id": "txn_1Cczau8Uw6swxDdMSxFv1u",
    "type": "payment",
    "requested": {
      "amount": "1000.00",
      "currency": "XTS"
    },
    "initialized": {
      "amount": "1000.00",
      "currency": "XTS"
    },
    "processed": {
      "amount": "0.00",
      "currency": "XTS"
    },
    "refunded": {
      "amount": "0.00",
      "currency": "XTS"
    },
    "requisite": {
      "type": "card",
      "card": "4242 4242 4242 4242",
      "holder": "Test User",
      "bank": "Test Bank"
    },
    "status": "processing",
    "expires_at": "2026-07-07T13:34:56Z",
    "created_at": "2026-07-07T12:34:56Z",
    "finalized_at": null
  }
}
Store the returned id — you'll use it to track the payment.

3. Check the status#

The payment settles asynchronously. Retrieve it by id to see its current status:
When the payment reaches a terminal status such as paid, it's settled:
{
  "data": {
    "id": "txn_1Cczau8Uw6swxDdMSxFv1u",
    "type": "payment",
    "requested": {
      "amount": "1000.00",
      "currency": "XTS"
    },
    "initialized": {
      "amount": "1000.00",
      "currency": "XTS"
    },
    "processed": {
      "amount": "1000.00",
      "currency": "XTS"
    },
    "refunded": {
      "amount": "0.00",
      "currency": "XTS"
    },
    "requisite": {
      "type": "card",
      "card": "4242 4242 4242 4242",
      "holder": "Test User",
      "bank": "Test Bank"
    },
    "status": "paid",
    "expires_at": "2026-07-07T13:34:56Z",
    "created_at": "2026-07-07T12:34:56Z",
    "finalized_at": "2026-07-07T12:47:03Z"
  }
}
Previous
Authentication
Next
Statuses
Built with