Refund charge
Quick Reference
/api/v1/bank/wallet/charge/{charge_uuid}/refund/{wallet_uuid}/Bearer TokenRefund a chargeWhy refunds matter
| Without refunds | With refunds |
|---|---|
| Unhappy customers file chargebacks ($25+ dispute fee each) | You return funds proactively before a dispute is filed |
| Chargeback ratio rises above 1% — card networks flag your account | Refund ratio doesn't count against your chargeback threshold |
| Customer trust erodes after a bad experience | Fast refunds turn a negative into a "they made it right" moment |
| Accounting shows overstated revenue | Refunded amounts adjust revenue reporting automatically |
| Support tickets pile up with "where's my money?" | Refund status is trackable via Get Charge and webhooks |
Refund flow
Authentication
Requires Bearer token. See Authentication.
Path parameters
Both UUIDs go in the URL path, not in the request body or query string:
| Field | Type | Required | Description |
|---|---|---|---|
charge_uuid | string (UUID) | Yes | Charge to refund |
wallet_uuid | string (UUID) | Yes | Wallet that owns the charge |
Optional body fields
| Field | Type | Required | Description |
|---|---|---|---|
amount | number | No | Partial refund amount. Omit for full refund |
reason | string | No | Refund reason for reconciliation and reporting |
Unlike most A55 endpoints, the refund endpoint takes charge_uuid and wallet_uuid in the URL path:
POST /api/v1/bank/wallet/charge/{charge_uuid}/refund/{wallet_uuid}/
Code examples
Full refund
- cURL
- Python
- JavaScript
curl -s -X POST "https://core-manager.a55.tech/api/v1/bank/wallet/charge/51dcca6e-7310-4b73-a94c-90835408f2ff/refund/f47ac10b-58cc-4372-a567-0e02b2c3d479/" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
import requests
import os
token = os.environ["A55_API_TOKEN"]
base = os.environ.get("A55_API_BASE_URL", "https://core-manager.a55.tech")
charge_uuid = "51dcca6e-7310-4b73-a94c-90835408f2ff"
wallet_uuid = "f47ac10b-58cc-4372-a567-0e02b2c3d479"
refund = requests.post(
f"{base}/api/v1/bank/wallet/charge/{charge_uuid}/refund/{wallet_uuid}/",
headers={"Authorization": f"Bearer {token}", "Content-Type": "application/json"},
).json()
print(f"Refund: {refund['charge_uuid']} — Status: {refund['status']}")
const token = process.env.A55_API_TOKEN;
const base = process.env.A55_API_BASE_URL || "https://core-manager.a55.tech";
const chargeUuid = "51dcca6e-7310-4b73-a94c-90835408f2ff";
const walletUuid = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
const refund = await fetch(
`${base}/api/v1/bank/wallet/charge/${chargeUuid}/refund/${walletUuid}/`,
{
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
}
).then((r) => r.json());
console.log(`Refund: ${refund.charge_uuid} — Status: ${refund.status}`);
Partial refund
- cURL
- Python
- JavaScript
curl -s -X POST "https://core-manager.a55.tech/api/v1/bank/wallet/charge/51dcca6e-7310-4b73-a94c-90835408f2ff/refund/f47ac10b-58cc-4372-a567-0e02b2c3d479/" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"amount": 50.25,
"reason": "Customer returned 1 of 3 items"
}'
partial_refund = requests.post(
f"{base}/api/v1/bank/wallet/charge/{charge_uuid}/refund/{wallet_uuid}/",
json={
"amount": 50.25,
"reason": "Customer returned 1 of 3 items",
},
headers={"Authorization": f"Bearer {token}", "Content-Type": "application/json"},
).json()
print(f"Partial refund: {partial_refund['status']}")
const partialRefund = await fetch(
`${base}/api/v1/bank/wallet/charge/${chargeUuid}/refund/${walletUuid}/`,
{
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
amount: 50.25,
reason: "Customer returned 1 of 3 items",
}),
}
).then((r) => r.json());
console.log(`Partial refund: ${partialRefund.status}`);
Response fields
| Field | Type | Description |
|---|---|---|
charge_uuid | string | Refunded charge identifier |
wallet_uuid | string | Wallet that owned the charge |
status | string | refunded on success |
message | object | Additional details or empty object on success |
Complete response example
Full refund
{
"charge_uuid": "51dcca6e-7310-4b73-a94c-90835408f2ff",
"wallet_uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"status": "refunded",
"message": {}
}
Partial refund
{
"charge_uuid": "51dcca6e-7310-4b73-a94c-90835408f2ff",
"wallet_uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"status": "refunded",
"message": {}
}
Error responses
| Status | Code | Description | Resolution |
|---|---|---|---|
| 400 | errors.wallet.not_found | Wallet UUID does not exist | Verify wallet_uuid in the URL path |
| 400 | REFUND_NOT_ALLOWED | Charge is not in a refundable state | Only confirmed or paid charges can be refunded. Check charge status with Get charge |
| 401 | unauthorized | Invalid or expired Bearer token | Refresh your access token via Cognito |
| 404 | CHARGE_NOT_FOUND | Charge not found | Verify charge_uuid in the URL path |
| 422 | amount_exceeds_captured | Partial refund amount exceeds captured amount | Refund amount must be ≤ the captured amount |
If a payment was made in installments, a full refund returns all installments in full. You cannot refund a single installment. For partial returns on installment payments, use a partial refund with a specific amount.
Processing a refund costs you nothing beyond the reversed payment. A chargeback costs you the payment amount plus a dispute fee ($25–$100 depending on the card network). Always refund proactively when a legitimate complaint arrives.
Refunds take 5–10 business days to appear on the payer's statement, depending on the card issuer. Inform your customers about this timeline to reduce "where's my refund?" support tickets.