v1

latestOpenAPI 3.1.02026-07-245361280.3 KB

Make a refund

This service allows you to create and read refunds of an existing payment.

post/refunds

Request body

payment_idstring required

The payment ID.</br></br>Length: 50.

notification_urlstring

If a refund is pending, the refund confirmation is sent asynchronously to this URL.</br></br>Length: 500.

custom_merchant_namestring

Custom merchant's name. Recommended if you need to define a different name to show on a payout link request. It's included in the email subject sent to the user as well.</br></br>Length: 100.

amountnumber float

The refund amount, always in local currency. If no amount is specified, the total payment amount will be refunded by default. Required if currency is present.<br>This is mandatory for refunds with splits.</br></br>Length: 16,2. Example 9999999999999999.99

currencystring

Currency of the Amount. Required if amount is present.</br></br>Length: 3.

descriptionstring

Description of the refund.</br></br>Length: 200.

order_refund_idstring

ID given by the merchant in their system.<br><br>Length: 125.

beneficiary_namestring

User's first name. Recommended if the type of the payment is TICKET or BANK_TRANSFER.</br></br>Length: 50.

beneficiary_lastnamestring

User's last name. Recommended if the type of the payment is TICKET or BANK_TRANSFER.</br></br>Length: 50.

bankstring

User's bank name. Recommended if the type of the payment is TICKET or BANK_TRANSFER.</br></br>Length: 40.

bank_codestring

User's bank code. Recommended if the type of the payment is TICKET or BANK_TRANSFER.</br></br>Length: 45.

bank_accountstring

User's bank account number. Recommended if the type of the payment is TICKET or BANK_TRANSFER.</br></br>Length: 45.

bank_account_typestring

Type of bank account. C: for Current accounts; S: for Savings accounts; I: International accounts. Recommended if the type of the payment is TICKET or BANK_TRANSFER.</br></br>Length: 40.

bank_branchstring

User's bank branch code. Recommended if the type of the payment is TICKET or BANK_TRANSFER.</br></br>Length: 45.

bank_branch_namestring

User's bank branch name. Recommended if the type of the payment is TICKET or BANK_TRANSFER.</br></br>Length: 40.

document_typestring

User's document type. Recommended if the type of the payment is TICKET or BANK_TRANSFER.</br></br>Length: 10.

document_idstring

User's document id. Recommended if the type of the payment is TICKET or BANK_TRANSFER.</br></br>Length: 40.

phonestring

User's phone. Recommended if the type of the payment is TICKET or BANK_TRANSFER.</br></br>Length: 20.

emailstring

User's email. Recommended if the type of the payment is TICKET or BANK_TRANSFER.</br></br>Length: 100.

addressstring

User's address. Recommended if the type of the payment is TICKET or BANK_TRANSFER.</br></br>Length: 200.

citystring

User's city. Recommended if the type of the payment is TICKET or BANK_TRANSFER.</br></br>Length: 100.

Response

200

idstring
payment_idstring
order_refund_idstring
statusstring
currencystring
created_datestring
amountnumber
status_codeinteger
status_detailstring
notification_urlstring
amount_refundednumber

Example response

{
  "id": "REF42342",
  "payment_id": "PAY4334346343",
  "order_refund_id": "GG1234567890",
  "status": "SUCCESS",
  "currency": "BRL",
  "created_date": "2018-09-06T22:03:03.000+0000",
  "amount": 803.04,
  "status_code": 200,
  "status_detail": "The refund was paid",
  "notification_url": "http://some.url",
  "amount_refunded": 803.04
}