Skip to main content

Refund

https://api-sandbox.epag.io/refund

To request a refund for a transaction, please note that partial refunds are possible only if the payment method permits.

Refunds should be issued in the same currency used for the original payment. At present, only transactions made in BRL are eligible for refunds.

The permissible time frame for refund requests is as follows from the date of payment:

Payment methodTime limit
PIX90 days
Creadit Card6 months
BOLETONo limit

Request Fields:

  • payment_token: (required/string): Token to identify the payment.
  • amount: (optional/float): Amount to be refunded. Must be equal or inferior to the customer amount. If absent, the total amount will be used.
  • notification_url: (optional/string): URL to post callbacks to the payment's refunds.
  • pix_key: (required*/string): Unique identifier linked to a bank account. Can be: Tax ID number (CPF/CNPJ), Email address, Mobile telephone number, EVP (A randomly-generated UUID number). Required only if payment's method is equal to BOLETO.
  • bank_code: (required/number): The code of the institution to which the payment is directed. Required only if payment's method is equal to OXXO, PAYNET or SPEI.
  • clabe: (required/string): CLABE customer interbank. Required only if payment's method is equal to OXXO, PAYNET or SPEI.

Responde Fields:

  • refund_id: The refund id.
  • payment_token: The refunded payment id.
  • created_at: Refund creation date.
  • refund_status: The refund status. Possible values: REQUESTED, PROCESSING, COMPLETED, FAILED.
  • refresh_token: Updated auth token for next calls.
AUTHORIZATIONAPI Key
KeyX-Auth-Token
ValueMY_ACCESS_TOKEN
Body raw (json)
{
"payment_token": "MY_PAYMENT_TOKEN",
"amount": 123.45,
"type": "CHECKING",
"bank_number": "237",
"agency_number": "12345",
"agency_check_digit": "3",
"account_number": "123456",
"account_check_digit": "4",
"bank_code": 123456,
"clabe": "646180179900004256"
}

Example Request

Example Request

200 - Credit/Debit Card
  curl --location 'https://api-sandbox.epag.io/refund' \
--header 'X-Auth-Token: MY_ACCESS_TOKEN' \
--data '{
"payment_token": "MY_PAYMENT_TOKEN",
"amount": 123.45
}'

Example Response

Header
  Content-Type: application/json
Body
  {
"refund_id": 1,
"payment_token": "42afe884-f047-4452-a3db-65a7de76a9c5",
"created_at": "2019-03-10 12:24:33.657",
"refund_status": "PROCESSING",
"refresh_token": "MY_ACCESS_TOKEN"
}