ChargebeeAPI

Payment vouchers

The Payment Voucher resource represents a voucher that has been created for a customer to initiate voucher-based payment. This resource contains relevant details such as the voucher URL, the amount of the voucher, the status of the voucher, and more. Currently, the only supported voucher-based payment source is Boleto. Boleto is a payment method in Brazil that is regulated by the Central Bank of Brazil and is considered an official form of payment. This is also a popular voucher-based payment method in Brazil.

Note: This resource can be extended in the future to support other types of payment sources for vouchers.

Sample Payment voucherJSON

API Index URL

https://[site].chargebee.com/api/v2/payment_vouchers

Payment vouchers attributes

id
required, string, max chars=40

Uniquely identifies the payment voucher.

id_at_gateway
optional, string, max chars=100

The id with which this voucher is referred in gateway.

payment_voucher_type
required, enumerated string

Type of the payment source.

Possible Enum Values
boleto

Boleto

expires_at
optional, timestamp(UTC) in seconds

Timestamp indicating when the Voucher will expire if left unconsumed.

status
optional, enumerated string

Current status of the payment voucher.

Possible Enum Values
active

Active and ready to be consumed

consumed

Consumed for a transaction and cannot be used again

expired

Expired before consumed and cannot be used again

failure

Failed to create the voucher due to gateway rejection

subscription_id
optional, string, max chars=50

Identifier of the subscription for which this payment voucher is made.

currency_code
required, string, max chars=3

The currency code (ISO 4217 format) for the voucher.

amount
optional, in cents, min=1

Amount for this payment voucher.

gateway_account_id
optional, string, max chars=50

The gateway account used for this voucher

payment_source_id
optional, string, max chars=40

Identifier of the payment source for which this payment voucher is created

gateway
required, enumerated string

The gateway through which this payment voucher was created. Note: Note: Currently, stripe is the only supported gateway through which you can create the payment voucher.

Possible Enum Values
chargebee

Chargebee test gateway.

chargebee_payments

Chargebee Payments gateway

adyen

Adyen is a payment gateway.

stripe

Stripe is a payment gateway.

wepay

WePay is a payment gateway.

payload
optional, string, max chars=65k

Payload from the gateway response with voucher details

error_code
optional, string, max chars=100

Error code received from the payment gateway on failure.

error_text
optional, string, max chars=65k

Error message received from the payment gateway on failure.

url
optional, string, max chars=65k

Chargebee Hosted Page url for payment voucher

date
optional, timestamp(UTC) in seconds

Indicates when this payment voucher occurred date.

resource_version
optional, long

Version number of this resource. The resource_version is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

updated_at
optional, timestamp(UTC) in seconds

Timestamp indicating when this voucher was last updated.

customer_id
required, string, max chars=50

The unique identifier of the customer.

linked_invoices

Invoices related to the generated voucher