Refund a succeeded Wave payment in full
POST
/v1/payments/{id}/refunds
const url = 'http://localhost:4000/v1/payments/example/refunds';const options = { method: 'POST', headers: {'idempotency-key': 'example', Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:4000/v1/payments/example/refunds \ --header 'Authorization: Bearer <token>' \ --header 'idempotency-key: example'Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”id
required
string
Header Parameters
Section titled “Header Parameters”idempotency-key
required
Required retry-safe key; reuse it only for the same operation and request body
string
Required retry-safe key; reuse it only for the same operation and request body
Responses
Section titled “ Responses ”Full refund
Media typeapplication/json
object
id
required
string
object
required
string
payment_id
required
string
amount
required
integer
currency
required
string
status
required
string
fee_refunded
required
integer
created_at
required
string
Example
{ "object": "refund", "currency": "XOF", "status": "pending"}Validation error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Authentication error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Not found
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Insufficient funds or unsupported provider
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Rate limited; see Retry-After response header
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Provider or ledger outcome requires retry/review
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}