This page's content:

The voucher card transaction is very similar to the Direct operation. But some fields are requireds like payment.items node.

In this page we will see some examples to create a payment with voucher card and the difference between Direct operation.

The accepted brands are Alelo, VR and Sodexo.

Request parameters

Below we will show the differences in relation to direct operation.

payment JSON

A JSON object that represents the payment.

payment.amount_total float, required

The amount in the specified currency (currency_code). E.g.: 100.50. The payment.amount_total shoud be exactly the same value with the sum of all the payment.items JSON array.

payment.payment_type_code string, required

Should be voucher

payment.card.card_number string, Length: 14-19, required(voucher cards)

Voucher card number.

payment.card.card_name string, Length: 50, required(voucher cards)

Voucher card cardholder name.

payment.card.card_due_date string, Length: 7, Format: mm/yyyy, required(voucher cards)

Voucher card due date (“valid thru”) in the format mm/yyyy.

payment.card.card_cvv string, Length: 3-4, required(voucher cards)

Voucher card security code.

payment.card.token string, Length: 1-200, Constraints: unique, optional(voucher cards)

If a previously created token is informed, no card information is needed. EBANX will identify the card associated with the token and perform the transaction.

payment.items JSON array, required

An array of objects containing the items of the order

payment.items.0.sku string, Length: 20, optional

SKU of the item

payment.items.0.name string, Length: 100, required

Name of the item

payment.items.0.description string, Length: 200, optional

Description of the item

payment.items.0.unit_price float, required

Price of the unity of the item

payment.items.0.quantity integer, required

Quantity of each item

payment.items.0.type string, Length: 50, optional

Type of the item

Important notes

  • Instalment shold be 1;
  • No split is supported with voucher;
  • Only for individuals person type (CPF only);
  • Before all transactions, you need call setCVV operation;
  • Refund is only available over API on the same day the payment was created.

Example to create payment with voucher card