PaybytokenDocs
Refunds
API reference · Refunds

Refunds

Return all or part of a captured payment through its original funds-movement method.

A Refund belongs to one successful or captured Payment Intent. Omit amount to refund the remaining refundable amount, or provide a decimal string for a partial refund.

POST /api/v1/refunds

curl https://api-prod.paybytoken.io/api/v1/refunds \
  -X POST \
  -H "Authorization: Bearer $PAYBYTOKEN_SECRET_KEY" \
  -H "Idempotency-Key: order:1234:refund:1" \
  -H "Content-Type: application/json" \
  -d '{
    "payment_intent": "pay_123",
    "amount": "4.00",
    "reason": "requested_by_customer",
    "metadata": { "case_id": "case_42" }
  }'

Retrieve the result with GET /api/v1/refunds/:refundId.

refund_method is inherited from the payment: customer_balance, paybytoken_pay, or crypto_transfer. Balance refunds return to the original customer balance. Crypto-transfer refunds follow the platform's original-sender safety policy; the API does not accept an arbitrary refund destination. A pending response is not final—consume refund.* webhooks and make your order reversal idempotent.

API Workbench

Full Explorer

Open in new tab