Introducing the Better Auth Chargebee plugin: Use it to handle subscriptions, billing, and auth seamlessly.
Chargebeechargebee API

Create a voucher for the customer to initiate payment

Idempotency Supported

Creates a voucher type payment source. If you create this voucher type payment source using customer details, like tax ID, you can then generate a voucher with that payment source.

Sample Request

creates a voucher for unpaid invoice

Sample Result[JSON]

URL Format

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

Input Parameters

customer_id
required, string, max chars=50

The unique identifier of the customer for whom you want to create the voucher.

payment_source_id
optional, string, max chars=40

The identifier of the payment source used for generating the voucher.

voucher_payment_source
Parameters for voucher_payment_source
pass parameters as voucher_payment_source[<param name>]
invoice_allocations[0..n]
Parameters for invoice_allocations. Multiple invoice_allocations can be passed by specifying unique indices.
pass parameters as invoice_allocations[<param name>][<idx:0..n>]

Returns

Payment voucher object
Resource object representing payment_voucher