Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.stellartools.dev/llms.txt

Use this file to discover all available pages before exploring further.

A refund sends the original payment amount back to the customer’s Stellar wallet. Refunds are processed on-chain and reflect a succeeded or failed status once the transaction settles.

The refund object

id
string
Unique identifier. Prefixed with rf_.
object
string
Always "refund".
payment_id
string
The payment being refunded.
customer_id
string
The customer receiving the refund.
amount
string
Amount refunded, e.g. "50 XLM".
status
string
pending, succeeded, or failed.
reason
string
Optional reason for the refund.
receiver_wallet_address
string
Stellar public key the refund was sent to.
metadata
object
Arbitrary key-value data.
created_at
string
ISO 8601 timestamp.

Create a refund

POST /refunds Refunds the full amount of a payment to the customer’s wallet on file. Pass wallet_address to override the destination.
curl https://api.stellartools.dev/refunds \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "payment_id": "pay_01jx...",
    "reason": "Customer request"
  }'

Body

payment_id
string
required
ID of the payment to refund.
reason
string
Reason for the refund.
wallet_address
string
Override the refund destination. Defaults to the wallet that made the original payment.
metadata
object
Arbitrary key-value data.