Create a refund. Pass exactly one of charge or payment_id: use charge for a normal payment refund, where it identifies the normal payment to refund; use payment_id for a subscription refund, where it identifies the payment generated by the subscription invoice. Newly created refunds currently enter the processing state.
Documentation Index
Fetch the complete documentation index at: https://docs.stablepayfi.ai/llms.txt
Use this file to discover all available pages before exploring further.
Bearer API Key, for example Bearer sk_live_xxx.
Unix timestamp in seconds. Must be within 5 minutes of server time.
Replay-protection nonce, 16-64 characters. Use a fresh UUID per request.
Lowercase hex HMAC-SHA256 of {timestamp}.{nonce}.{requestBody} signed with the merchant API Secret. For GET requests, requestBody is an empty string.
Unix timestamp in seconds. Must be within 5 minutes of server time.
Replay-protection nonce, 16-64 characters. Use a fresh UUID per request.
16 - 64Lowercase hex HMAC-SHA256 of {timestamp}.{nonce}.{requestBody} signed with the merchant API Secret. For GET requests, requestBody is an empty string.
Pass exactly one of charge or payment_id; do not send both fields.
Exactly one of charge or payment_id is required. Use charge for normal payment refunds and payment_id for subscription refunds.
Use for normal payment refunds. Pass the normal payment ID to refund.
Merchant-defined unique refund ID used as the idempotency key.
Refund amount in minor units. Must be greater than 0.
x >= 1Refund currency. The current request binding allows USDT or USDC.
USDT, USDC Use for subscription refunds. Pass the payment ID generated by the subscription invoice.
Refund reason.
requested_by_customer, duplicate, fraudulent, expired_uncaptured Refund description.
Optional on-chain refund destination address.
Optional on-chain refund destination address ID; only values greater than 0 are used.
Merchant metadata.
Refund created.
Refund object returned after creation.
Merchant-supplied refund ID.
Payment identifier returned for subscription refund scenarios.
Merchant order ID, returned for normal payment refunds.
Refund amount in minor units.
Refund currency.
USDT, USDC Refund status. Newly created refunds usually return processing in the current implementation.
pending, processing, completed, failed, canceled Refund reason.
requested_by_customer, duplicate, fraudulent, expired_uncaptured Refund description.
Refund creation time, Unix seconds.
Merchant metadata.
Invoice ID returned for subscription refunds.
Subscription ID returned for subscription refunds.