4. Refunds

Is there a problem and need to cancel the purchase for your customer? No problems!

The Refund is the return of payment to the consumer. Through this API you can make refunds and see the details of a particular refund.

Attributes

Name

Description

Type

id

Code (Wirecard Id) Refund identifier

string(16),
response

status

Refunds statuses. Possible values: REQUESTED, COMPLETED, FAILED.

string,
response

amount

Refund values. In cents . Ex: R$10,32 must be informed 1032. Required only if you wish to make a partial refund.

structured

├─fees

Refund fees

integer(12),
response

├─currency

Currency used in the order. Possible values: BRL.

string,
response

└─total

Total amount refunded. In cents . Ex: R$10,32 must be informed 1032. **

integer(12),
response

type

Refund type. Possible values: FULL, PARTIAL.

string,
response

refundingInstrument

The payment method used in reimbursement.

structured,
mandatory

├─method

Payment methods. Possible values: CREDIT_CARD, BANK_ACCOUNT, MOIP_ACCOUNT.

string,
mandatory

├─creditCard

Credit card used in a refund.

object

├ ├─number

Credit card number. (Must be within the PCI scope to send this field unencrypted)

string(19)

├ ├─expirationMonth

Credit card expiration month. (Must be within the PCI scope to send this field unencrypted)

integer(2)

├ ├─expirationYear

Credit card expiration year. (Must be within the PCI scope to send this field unencrypted)

integer(4)

├ ├─cvc

Credit card security code. (Must be within the PCI scope to send this field unencrypted)

integer

├ ├─brand

Credit card brand. Possible values: VISA, MASTERCARD, AMEX, DINERS, ELO, HIPER, HIPERCARD.

string,
response

├ ├─first6

First 6 digits of credit card.

string,
response

├ ├─last4

Last 4 digits of credit card.

string,
response

├ ├─holder

Credit card holder.

structured,
mandatory

├ ├ ├─fullname

Credit card holder name.

string(90),
mandatory

├ ├ ├─birthDate

Credit card holder birthday.

date(YYYY-MM-DD), mandatory

├ ├ ├─taxDocument

Holder identity document.

structured,
mandatory

├ ├ ├ ├─type

Document type. possible value: CPF.

string(3),
mandatory

├ ├ ├ └─number

Document identity number.

string(11),
mandatory

├ ├ ├─ phone

Customer phone

structured,
mandatory

├ ├ ├ ├─countryCode

Phone DDI (international code). Possible value: 55.

integer(2),
mandatory

├ ├ ├ ├─areaCode

Phone DDD (local code).

integer(2),
mandatory

├ ├ └ └─ number

Phone number.

integer(9),
mandatory

├ ├─billingAddress

Credit card holder billing address.

object,

├ ├ ├─street

Street.

string(140),

├ ├ ├─streetNumber

Number.

string(10),

├ ├ ├─complement

Complement.

string(140),

├ ├ ├─district

District.

string(45),

├ ├ ├─city

City.

string(32),

├ ├ ├─state

State.

string(32),

├ ├ ├─country

Country in ISO-alpha3, example BRA.

string(3),

├ └ └─zipCode

Billing address zip code.

string(8),

├─moipAccount

Wirecard account used on refund.

object

├ ├─id

Account id.

string,
response

├─bankAccount

Banking account used on refund.

object

├ ├─type

Account type. Possible values: CHECKING , SAVING.

string,
mandatory

├ ├─bankNumber

Bank number. FEBRABAN Bank code number..

string,
mandatory

├ ├─agencyNumber

Agency number.

integer,
mandatory

├ ├─agencyCheckNumber

Agency check number.

integer,
mandatory

├ ├─accountNumber

Account number.

integer,
mandatory

├ ├─ accountCheckNumber

Account check number.

integer,
mandatory

├ ├─holder

Bank account holder.

structured,
mandatory

├ ├ ├─fullname

Bank account holder name.

string,
mandatory

├ ├ ├─taxDocument

bank account holder's identity document.

structured,
mandatory

├ ├ ├─type

Identity document type. Possible values: CPF, CNPJ.

string,
mandatory

└ └ └─number

Identity document number.

integer,
mandatory

events

Refunds events.

structured

├─createdAt

Refund creation date.

integer(12),
response

└─type

Refund events type. Possible values: REFUND.REQUESTED, REFUND.WAITING, REFUND.FAILED, REFUND.COMPLETED.

string,
response

createdAt

Resource creation date.

datetime,
response

_links

Resource links structure Hypermedia (HATEOAS).

structured,
response

├─self

Reference to the resource.

structured

├ └─href

Resource hyperlink.

link

├─order

Order reference.

structured,
response

├ ├─title

Order identifier.

string

├ └─href

Order hyperlink.

link

├─payment

Payment reference.

structured,
response

├ ├─title

Payment identifier.

string

└ └─href

Payment hyperlink.

link

👍

TIP

If you want to search for refunded orders you can use our Search Filters. Here is an example of endpoint to find refunds:

GET
https://sandbox.moip.com.br/v2/orders?filters=status::in(REVERTED)

🚧

IMPORTANT

1. The refund can only be made to the bank account of the same payment holder.

2. The payment can only be refunded on the credit card in the period less than 180 days after the authorization of the payment.

3. The payment made by credit card must have refunded via credit card.