Get refund by ID
Retrieves a refund with all details including ledger info.
Retrieves a refund with all details including ledger info.
Authorization
api-key API key for merchant integrations. Send as Authorization: Bearer <your key>.
In: header
Path Parameters
Refund ID
Response Body
curl -X GET "https://example.com/refunds/string"Create a refund POST
Creates a full or partial refund for a successful charge. Target: provide EXACTLY ONE of `chargeId` or `paymentIntentId`. When `paymentIntentId` is supplied the server resolves it to the unique succeeded charge under that intent; the request is rejected if the intent has zero or multiple succeeded charges. Features: - Full or partial refunds - Ledger reversal (double-entry bookkeeping) - Balance updates (debits available funds) - Updates charge.amountRefunded - Updates paymentIntent.amountRefunded Refunds: - Hit available balance immediately (no hold period) - Create negative balance transactions - Reverse the original charge's ledger entries - Platform keeps fees (business decision)
Balance Transaction
A Balance Transaction records every movement of money in or out of your xpay balance: successful charges, refunds, payouts, processing fees, and adjustments. Each Balance Transaction links back to its `source` (the Charge, Refund, or Payout that produced it) and breaks down `gross`, `fee`, and `net` amounts. Use Balance Transactions to reconcile what was paid into your account against what was settled to your bank.