5. Payments

Payment is the financial transaction that occurs between the Client and the Receiver (you!), Either through a credit card, a bank slip, or by another means of payment. This API allows the creation, consultation, and payment listing.

Atributos:

Nome

Descrição

Tipo

id

Payment identifier code.

string(16),
response

status

Payment statuses. Possible values: CREATED, WAITING, IN_ANALYSIS, PRE_AUTHORIZED, AUTHORIZED, CANCELLED, REFUNDED, REVERSED, SETTLED.

string,
response

amount

Order amount.

structured,
response

├─refunds

The total amount of payment refunds. In cents . Ex: R$10.32 will be informed 1032.

integer(12),
response

├─fees

The total amount of payment fees. In cents . Ex: R$10.32 will be informed 1032.

integer(12),
response

├─liquid

Net payment amount. In cents . Ex: R$10.32 will be informed 1032.

integer(12),
response

├─currency

Currency used for payment. Possible values: BRL.

string,
response

└─total

Total payment amount. In cents . Ex: R$10.32 will be informed 1032

integer(12),
response

installmentCount

Installments number. Minimum 1 e Maximum 12.

integer(2)

delayCapture

Whether payment must be pre-authorized for later capture. Valid only for payments by credit card.

boolean

statementDescriptor

Identification of your store on the buyer's credit card statement.

string(13)

fundingInstrument

Payment method structure.

structured

├─method

Payment method. Possible values: CREDIT_CARD, BOLETO, ONLINE_BANK_DEBIT, WALLET.

string

├─creditCard

Credit card data.

object,
mandatory
Required for the Protected Sale program.

├ ├─hash

Encrypted credit card data. IMPORTANT : you must encrypt the card data credit card before submitting to Wirecard if your site does not have a PCI certificate.

string

├ ├─number

Credit card number.
Requires PCI certification.

string(19),
mandatory
Required for the Protected Sale program.

├ ├─expirationMonth

Credit card expiration month.
Requires PCI certification.

integer(2),
mandatory
Required for the Protected Sale program.

├ ├─expirationYear

Credit card expiration year.
Requires PCI certification.

integer(4),
mandatory
Required for the Protected Sale program.

├ ├─cvc

Credit card CVC.
Requires PCI certification.

integer (4),
mandatory
Required for the Protected Sale program.

├ ├─id

Credit card Wirecard code.

string(16),
response

├ ├─brand

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

string,
response

├ ├─first6

Credit card first 6 digits.

string,
response

├ ├─last4

Credit card last 4 digits.

string,
response

├ ├─holder

Credit card holder.

structured,
Mandatory

├ ├ ├─store

Determines when creating a payment whether the credit card used should be saved to 1Click2Buy (default: true).

boolean

├ ├ ├─fullname

Holder name.

string(90),
mandatory
Required for the Protected Sale program.

├ ├ └─birthDate

Holder birthdate.

date(YYYY-MM-DD),
mandatory
Required for the Protected Sale program.

├ ├─phone

Holder phone.

structured

├ ├ ├─countryCode

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

integer(2)

├ ├ ├─areaCode

Phone DDD (Local code).

integer(2)

├ ├ └─number

Phone number.

integer(9)

├ ├─taxDocument

Identity document.

structured,
mandatory
Required for the Protected Sale program.

├ ├ ├─type

Document type. Possible value: CPF.

string(3),
mandatory
Required for the Protected Sale program.

├ ├ └─number

Document number.

string(11),
mandatory
Required for the Protected Sale program.

├ └─billingAddress

Holder billing address.

object

├ ├─street

Street name.

string(140)

├ ├─streetNumber

Number.

string(10)

├ ├─complement

Complement.

string(140)

├ ├─district

District.

string(45)

├ ├─city

City.

string(32)

├ ├─state

State. 2 letter abbreviation.

string(2)

├ ├─country

Country. 3 letter abbreviation. Example: BRA.

string(3)

├ └─zipCode

Zipcode.

string(8)

├─boleto

Bank slip data.

structured

├ ├─lineCode

Bank slip digitizable line.

string

├ ├─expirationDate

Bank slip expiration date.

date,
Mandatory

├ ├─instructionLines

Bank slip instructions.

structured

├ ├ ├─first

Bank slip first instruction.

string

├ ├ ├─second

Bank slip second instruction.

string

├ ├ └─third

Bank slip third instruction.

string

├ └─logoUri

Link to define a logo to the bank slip.

string

├─onlineBankDebit

Bank transfer data.

object

├ ├─bankNumber

Bank number. Possible value: 341.
See list of Banking institutions.

string,
Mandatory

├ ├─bankName

Bank name.

string,
response

├ ├─expirationDate

Debit expiration date.

date,
Mandatory

└ └─returnUri

Redirect URL. Not yet available in this version of the API.

link,
Mandatory

fees

Payment fees.

structured list,
response

├─type

Fee type. Possible values: TRANSACTION, PRE_PAYMENT.

string

└─amount

Fee amount. In cents: R$10.32, will be informed 1032.

integer(12)

events

Payment events.

structured list,
response

├─createdAt

Resource creation date.

date

├─type

Events type. Possible values: PAYMENT.WAITING, PAYMENT.AUTHORIZED, PAYMENT.IN_ANALYSIS, PRE_AUTHORIZED, PAYMENT.REFUNDED, PAYMENT.REVERSED.

string

└─description

Event description.

string

cancellationDetails

Cancellation details of credit card payments.

structured

├─cancelledBy

Responsible for cancellation. Possible values: MOIP ou ACQUIRER.

string,
response

├─code

Cancellation reason code.
See list of Payment Cancellation Details.

number,
response

└─description

Description of the reason for cancellation.

string,
response

updatedAt

Resource last update date.

datetime,
response

createdAt

Resource creation date.

datetime,
response

device

Information about the device used by the buyer at the time of payment.

structured

├─ip

Buyer IP address.

string(15)

├─userAgent

Buyer userAgent.

string(256)

├─fingerprint

Device fingerprint.

string(256)

├─geolocation

Transaction geolocation.

structured

├ ├─latitude

Latitude of the buyer's location. Possible values range from -90 to 90, with 7 decimals (If the value entered exceeds the maximum, we will create the payment with latitude 90).

decimal(9,7)

├ └─longitude

Longitude of the buyer's location. Possible values range from -180 to 180, with 7 decimals (If the value entered exceeds the maximum, we will create the payment with longitude 180).

decimal(10,7)

├─self

Reference to the resource itself.

structured

├ └─href

Hyperlink to the resource itself.

link

├─order

Order reference.

structured

├ ├─title

Order identification.

string

├ └─href

Hyperlink to the order.

link

└─checkout

URL to access the Wirecard checkout for the user to choose the payment method: bank slip, bank transfer or credit card.

object

_links

Hypermedia link structure (HATEOAS) of the resource.

structured,
response

├─self

Reference to the resource itself.

structured

├ └─href

Hyperlink to the resource itself.

link

├─order

Order reference.

structured

├ ├─title

Order identifier.

string

├ └─href

Hyperlink to the order.

link

└─payCheckout

Link structure.

structured

   └─redirectHref

URL to access the Wirecard checkout for the user to choose the payment method: bank slip, bank transfer or credit card.

link

└─payCreditCard

Link structure.

structured

    └─redirectHref

Wirecard checkout for credit card, safe and compliant environment by our PCI Compliance.

link

└─payBoleto

Link structure.

structured

    └─redirectHref

URL to access Wirecard checkout and print the bank billing.

link

└─payOnlineBankDebitItau

Link structure.

structured

    └─redirectHref

Automatic redirect URL to internet banking.

link

❗️

Protected sale program

The attributes highlighted with Protected Sale are required fields to be eligible in the program.

🚧

IMPORTANT

The amount paid on a bank slip can be different from the initial order amount. Always validate the attribute amount.total, sent in payment webhooks and also available in queries via API.