Skip to main content
POST
Refund a paid purchase

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

Object ID (UUID)

Body

application/json
amount
integer

Amount to refund in minor units of the purchase's currency - e.g. 100 for RM 1.00. Should not be more than Purchase.refundable_amount.

Optional; if not provided, a full refund will be executed. See the description for Purchase.refund_availability field.

Response

OK

A record of a performed financial transaction. Can be generated e.g. as a result of refund operation.

type
string

Object type identifier

id
string<uuid>
created_on
integer<int64>

Object creation time

Example:

1619740800

updated_on
integer<int64>

Object last modification time

Example:

1619740800

client
object

Contains details about the client of a purchase or payment - the remote payer/fund recipient party.

payment
object

Details of an executed transaction. Read-only for Purchases and Payouts. For an unpaid Purchase, this object will be null.

transaction_data
object | null

Payment method-specific, read-only, internal transaction data. Will contain information about all the transaction attempts, if available.

The object type and id this object is related to, if any. E.g. refund Payments are related to a specific Purchase, so this object will contain type: purchase and id: <purchase's id>.

reference_generated
string

If an explicit invoice reference wasn't provided, this autogenerated value will be used as a reference instead.

reference
string

Invoice reference.

Maximum string length: 128
account_id
string<uuid>

ID of an account this Payment is associated with.

company_id
string<uuid>
is_test
boolean

Indicates this is a test object, created using test API keys or using the merchant portal while in test mode.

user_id
string<uuid> | null

ID of user who has created this object in the merchant portal, if applicable.

brand_id
string<uuid>

ID of the brand this Payment is associated with.