CollectionsHosted PaymentsRefunds

Create a Hosted Refund

POST
/v1/hosted-refunds

Authorization

authorization
AuthorizationBearer <token>

Set Your Secret API Key

In: header

Header Parameters

Idempotency-Key?string

A unique value, eg. a UUID.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

amount?number

A positive integer value in the specified currency's smallest unit. e.g. $10 would be represented as 1000 (cents).

Range1 <= value <= 20000000
currency?string

Three-letter ISO 4217 currency code in full uppercase. Must be a supported currency.

Match^SGD$
hostedPaymentId*string

ID of the hosted payment to refund.

Length0 <= length <= 64
referenceId?string

A string to reference (e.g. your refund ID, etc.) which can be used to reconcile the hosted refund with your own systems. This cannot exceed 255 characters.

Length0 <= length <= 255

Response Body

*/*

curl -X POST "https://example.com/v1/hosted-refunds" \  -H "Content-Type: application/json" \  -d '{    "hostedPaymentId": "string"  }'
{  "amount": 0,  "createdAt": "string",  "currency": "string",  "hostedPaymentId": "string",  "id": "string",  "referenceId": "string",  "status": "string",  "updatedAt": "string"}