Refunds
Refund a settled collection back to the payer. You identify the collection by its provider_event_id, request the refund, and Swappr returns the funds to the original payer. Your wallet is debited the full original amount when the refund settles.
Available for GBP and EUR collections.
How a refund works
A refund is the reverse of a collection: the money you collected goes back to whoever paid it. You do not supply the payer’s bank details, Swappr already knows where the collection came from and returns it to that source.
Two things are worth designing around:
- You reference the collection, not a payer. The only identifier you send is
provider_event_id, the value delivered asproviderEventIdon thewallet_fundedwebhook you received when the collection credited your wallet. Store that id when you receive the webhook and you have everything you need to refund later. - One refund per collection. A collection can be refunded once. A second attempt returns
409, so a retry after a dropped response tells you the refund already exists rather than making a new one.
Before you refund
- Enable the capability on your key. The API key must carry the refunds capability, enable Refunds on the key under API keys. A key without it gets
403 forbidden_refund_create. This is a property of the key itself, so it keeps working regardless of later changes to the team member who created it. - The collection must belong to you. A
provider_event_idfor a collection in another account, or in the other environment, returns the same404as one that does not exist. Idempotency-Keyis required. Send a unique value per logical refund. Because only one refund is possible per collection, a repeat of the same refund returns409 refund_already_exists.
POSTRefund a collection
Refund a settled collection back to the payer.
The collection to refund, the providerEventId from its wallet_funded webhook.
Why the refund is being made. Stored for your records. Up to 250 characters.
Your own reference, echoed back on the refund object. Up to 100 characters.
Response fields
| Field | Type | Notes |
|---|---|---|
object | string | Always refund. |
id | string | The refund id. Use it to retrieve the refund later. |
status | string | pending | processing | successful | failed. processing on creation; successful once the funds are returned. |
provider_event_id | string | The collection this refund is for. |
amount_minor | string | null | The full original collection amount being refunded, in minor units. |
currency | string | GBP or EUR. |
reference | string | null | Your reference, exactly as you sent it. null if you sent none. |
reason | string | null | The reason you supplied. |
created_at | string | ISO 8601. |
updated_at | string | ISO 8601. |
Errors
| Code | HTTP | Cause |
|---|---|---|
idempotency_key_required | 400 | The Idempotency-Key header was absent. |
invalid_field | 400 | provider_event_id was not supplied, or reason / reference is too long. |
invalid_json / invalid_body | 400 | The body is not a JSON object. |
forbidden_refund_create | 403 | The API key is not enabled for refunds. |
refund_collection_not_found | 404 | No collection matching provider_event_id is visible to this key. |
refund_already_exists | 409 | This collection has already been refunded. |
refund_not_allowed | 422 | The collection cannot be refunded (e.g. outside the refund window, not settled, or already returned). The message explains why. |
curl -X POST 'https://api.swappr.me/api/v1/refunds' \
-H "Authorization: Bearer sk_live_..." \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"provider_event_id": "evt_abc123",
"reason": "Duplicate payment",
"reference": "RFND-4021"
}'{
"object": "refund",
"id": "clx9r3q0000xyz789ghi012",
"status": "processing",
"provider_event_id": "evt_abc123",
"amount_minor": "150000",
"currency": "GBP",
"reference": "RFND-4021",
"reason": "Duplicate payment",
"created_at": "2026-08-14T10:15:00.000Z",
"updated_at": "2026-08-14T10:15:00.000Z"
}GETRetrieve a refund
Fetch one refund by id to check its status. Reading needs no capability beyond authentication. A refund belonging to another account, or to the other environment, returns the same 404 as one that does not exist.
The refund id.
Errors
| Code | HTTP | Cause |
|---|---|---|
refund_not_found | 404 | No refund with that id is visible to this key. |
curl 'https://api.swappr.me/api/v1/refunds/clx9r3q0000xyz789ghi012' \
-H "Authorization: Bearer sk_live_..."{
"object": "refund",
"id": "clx9r3q0000xyz789ghi012",
"status": "successful",
"provider_event_id": "evt_abc123",
"amount_minor": "150000",
"currency": "GBP",
"reference": "RFND-4021",
"reason": "Duplicate payment",
"created_at": "2026-08-14T10:15:00.000Z",
"updated_at": "2026-08-14T10:47:00.000Z"
}