Refund API

Attribute

Name Type Description
object string

The string refund.

id object_id

A REFUND_ID matching /rfnd(_test)?_[1-9a-z]+/.

location string

Path to retrieve the refund.

amount integer

The amount in the smallest subunits of the currency used. So for thb (Thai Baht) you'll need to pass the amount in satangs. #Maxmum and Minimum amount by supported currencies

currency string

The currency as its lower-cased international 3-letter code, defined by the ISO 4217 standard. #Supported Currencies

voided boolean

The boolean flag to indicate that the refund has been successfully voided or not.

charge object_id

The charge to which this refund belongs to.

transaction object_id

The TRANSACTION_ID of that refund.

created datetime

Creation date of the refund in ISO 8601 format.

Example

  • Json Response

List all refunds

- GET https://api.omise.co/refunds

Returns a list of refund objects.

Return all refunds that belongs to your account since the beginning of time. You can learn more about lists in the pagination documentation.

Query Parameter

Name Type Description
offset integer

(optional, default: 0) The offset of the first record returned. I.e.: How many records to skip from the beginning.

limit integer

(optional, default: 20, maximum: 100) The maximum amount of records returned.

from datetime

(optional, default: 1970-01-01T00:00:00Z, format: ISO 8601) The UTC date and time limiting the beginning of returned records. E.g.: 2014-10-20T00:00:00Z

to datetime

(optional, default: current UTC Datetime, format: ISO 8601) The UTC date and time limiting the end of returned records. E.g.: 2015-01-20T00:00:00Z

order string

(optional, default: chronological) The order of the list returned. I.e.: chronological (from earliest to latest), reverse_chronological (from latest to earliest).

Example

  • List all refunds

List all refunds of a particular charge

- GET https://api.omise.co/charges/CHARGE_ID/refunds

Returns a list of refund objects.

Return all refund that belongs to the charge. You can learn more about lists in the pagination documentation.

Query Parameter

Name Type Description
offset integer

(optional, default: 0) The offset of the first record returned. I.e.: How many records to skip from the beginning.

limit integer

(optional, default: 20, maximum: 100) The maximum amount of records returned.

from datetime

(optional, default: 1970-01-01T00:00:00Z, format: ISO 8601) The UTC date and time limiting the beginning of returned records. E.g.: 2014-10-20T00:00:00Z

to datetime

(optional, default: current UTC Datetime, format: ISO 8601) The UTC date and time limiting the end of returned records. E.g.: 2015-01-20T00:00:00Z

order string

(optional, default: chronological) The order of the list returned. I.e.: chronological (from earliest to latest), reverse_chronological (from latest to earliest).

Example

  • List all refunds of a particular charge

Create a refund

- POST https://api.omise.co/charges/CHARGE_ID/refunds

Returns a new refund object.

Request Parameter

Name Type Description
amount integer

The amount in the smallest subunits of the currency used. So for thb (Thai Baht) you'll need to pass the amount in satangs. #Maxmum and Minimum amount by supported currencies

void boolean

(optional, default: false) The boolean flag to only process void and suppress the normal refund if unsuccessfully void.

Example

  • Create a refund

Retrieve a refund

- GET https://api.omise.co/charges/CHARGE_ID/refunds/REFUND_ID

Returns an existing refund object.

Example

  • Retrieve a refund