Refund a collection

Pays a paid collection back to the phone that paid it, in full (no body) or in part (`amount`). Refunds of one collection never add up to more than it paid; a refund still on its way counts. The money and the payout fee come from your wallet. `collection.refunded` fires when the payer has it. Needs the `collections` scope.

POST
/collections/{id}/refund

Pays a paid collection back to the phone that paid it, in full (no body) or in part (amount). Refunds of one collection never add up to more than it paid; a refund still on its way counts. The money and the payout fee come from your wallet. collection.refunded fires when the payer has it. Needs the collections scope.

Authorization

apiKey
AuthorizationBearer <token>

A Swichi Gateway payments key.

In: header

Path Parameters

id*string

Header Parameters

Idempotency-Key*string

A unique value you keep and send again when you retry (up to 255 characters).

Lengthlength <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/collections/string/refund" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "object": "refund",  "livemode": true,  "collection": "string",  "amount": 0,  "currency": "TZS",  "status": "pending",  "payout": "string",  "created_at": "2019-08-24T14:15:22Z"}