Introducing OpenTelemetry for Chargebee SDKs — trace every API call in any telemetry tool.

Create a voucher payment method

Create a voucher payment method for the payment source.

Sample Request

Sample Result[JSON]

URL Format

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

Input Parameters

customer_id
required, string, max chars=50

Identifier of the customer with whom this payment source is associated.

brand_id
optional, string, max chars=50

The unique ID of the brand this payment source should be linked to. Applicable only when multiple brands have been created for the site. This need not match the brand of the customer_id; when the two differ, the value provided here is used for the payment source. An alternative way of passing this parameter is by means of the chargebee-brand-id custom HTTP header; when both are provided, they must specify the same brand.

Default behavior

  • When not provided, the payment source is linked to the brand of the customer it is created for.
voucher_payment_source
Parameters for voucher_payment_source
pass parameters as voucher_payment_source[<param name>]

Returns

Customer object

Resource object representing customer

Payment source object

Resource object representing payment_source