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 voucher [ JSON ]
{
"id": "pv_1mG11S1TcNM88A9Zm",
"id_at_gateway": "pi_3N0VBuK7ilSfRo7v0D66epcC",
"payment_voucher_type": "boleto",
"expires_at": 1682365190,
"status": "active",
"amount": 17800,
"gateway_account_id": "gw_161my9TXG5oNYwgv",
"payment_source_id": "pm_1mG11S1TcNM3LP9ZX",
"gateway": "stripe",
"payload": "{\"url\":\"https://payments.stripe.com/boleto/voucher/test_YWNjdF8xTHZnMFRLN2lsU2ZSbzd2LF9ObTNJN2NoejBsYldJeDI0VTVxemkwbnJaZUVTN0FH0100PvfYwtjd\",\"voucher_number\":\"01010101010101010101010101010101010101010101010\",\"expiry\":\"1682365190\"}",
"url": "http://john.chargebee.com/pages/v3/__dev__w5aPBsoEK5z6kIEt2mrEIH9GWLliHXrN/view_voucher",
"date": 1682365010,
"updated_at": 1682365010,
"resource_version": 1682365010580,
"object": "payment_voucher",
"currency_code": "BRL",
"customer_id": "test_d23ed22ew",
"linked_invoices": [
{
"invoice_id": "61",
"date": 1682364955,
"total": 17800,
"status": "payment_due"
}
]
}
API Index URL GET
https://{site}.chargebee.com/api/v2/payment_vouchers
string, max chars=40 Uniquely identifies the payment voucher.
optional, string, max chars=100 The id with which this voucher is referred in gateway.
enumerated string Type of the payment source. Possible values are
boletoBoleto
optional, timestamp(UTC) in seconds Timestamp indicating when the Voucher will expire if left unconsumed.
optional, enumerated string Current status of Payment Voucher. Possible values are
activeActive and ready to be consumedconsumedConsumed for a transaction and cannot be used againexpiredExpired before consumed and cannot be used againfailureFailed to create the voucher due to gateway rejection
activeActive and ready to be consumedconsumedConsumed for a transaction and cannot be used againexpiredExpired before consumed and cannot be used againfailureFailed to create the voucher due to gateway rejection
Show all values[+]
optional, string, max chars=50 Identifier of the subscription for which this payment voucher is made.
string, max chars=3 The currency code (ISO 4217 format) for the voucher.
optional, in cents, min=1 Amount for this payment voucher.
optional, string, max chars=50 The gateway account used for this voucher
optional, string, max chars=40 Identifier of the payment source for which this payment voucher is created
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 values are
chargebeeChargebee test gateway.chargebee_paymentsChargebee Payments gatewayadyenAdyen is a payment gateway.stripeStripe is a payment gateway.wepayWePay is a payment gateway.braintreeBraintree is a payment gateway.authorize_netAuthorize.net is a payment gatewaypaypal_proPayPal Pro Account is a payment gateway.pinPin is a payment gatewayewayeWAY Account is a payment gateway.eway_rapideWAY Rapid is a payment gateway.worldpayWorldPay is a payment gatewaybalanced_paymentsBalanced is a payment gatewaybeanstreamBambora(formerly known as Beanstream) is a payment gateway.bluepayBluePay is a payment gateway.elavonElavon Virtual Merchant is a payment solution.first_data_globalFirst Data Global Gateway Virtual Terminal AccounthdfcHDFC Account is a payment gateway.migsMasterCard Internet Gateway Service payment gateway.nmiNMI is a payment gateway.ogoneIngenico ePayments (formerly known as Ogone) is a payment gateway.paymillPAYMILL is a payment gateway.paypal_payflow_proPayPal Payflow Pro is a payment gateway.sage_paySage Pay is a payment gateway.tco2Checkout is a payment gateway.wirecardWireCard Account is a payment service provider.amazon_paymentsAmazon Payments is a payment service provider.paypal_express_checkoutPayPal Express Checkout is a payment gateway.gocardlessGoCardless is a payment service provider.orbitalChase Paymentech(Orbital) is a payment gateway.moneris_usMoneris USA is a payment gateway.monerisMoneris is a payment gateway.bluesnapBlueSnap is a payment gateway.cybersourceCyberSource is a payment gateway.vantivVantiv is a payment gateway.checkout_comCheckout.com is a payment gateway.paypalPayPal Commerce is a payment gateway.ingenico_directWorldline Online Payments is a payment gateway.exactExact Payments is a payment gateway.mollieMollie is a payment gateway.quickbooksIntuit QuickBooks Payments gatewayrazorpayRazorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc.global_paymentsGlobal Payments is a payment service provider.bank_of_americaBank of America GatewayecentricEcentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities.metrics_globalMetrics global is a leading payment service provider providing unified payment services in the US.windcaveWindcave provides an end to end payment processing solution in ANZ and other leading global markets.pay_comPay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.ebanxEBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.dlocalDlocal provides payment solutions for global commerce by accepting local payment methods.nuveiNuvei is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. paystackPaystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline. jp_morganJ.P. Morgan Mobility is a payment gateway that enables you to securely accept and manage digital payments across different payment_source_type
. not_applicableIndicates that payment gateway is not applicable for this resource. chargebeeChargebee test gateway.chargebee_paymentsChargebee Payments gatewayadyenAdyen is a payment gateway.stripeStripe is a payment gateway.
wepayWePay is a payment gateway.braintreeBraintree is a payment gateway.authorize_netAuthorize.net is a payment gatewaypaypal_proPayPal Pro Account is a payment gateway.pinPin is a payment gatewayewayeWAY Account is a payment gateway.eway_rapideWAY Rapid is a payment gateway.worldpayWorldPay is a payment gatewaybalanced_paymentsBalanced is a payment gatewaybeanstreamBambora(formerly known as Beanstream) is a payment gateway.bluepayBluePay is a payment gateway.elavonElavon Virtual Merchant is a payment solution.first_data_globalFirst Data Global Gateway Virtual Terminal AccounthdfcHDFC Account is a payment gateway.migsMasterCard Internet Gateway Service payment gateway.nmiNMI is a payment gateway.ogoneIngenico ePayments (formerly known as Ogone) is a payment gateway.paymillPAYMILL is a payment gateway.paypal_payflow_proPayPal Payflow Pro is a payment gateway.sage_paySage Pay is a payment gateway.tco2Checkout is a payment gateway.wirecardWireCard Account is a payment service provider.amazon_paymentsAmazon Payments is a payment service provider.paypal_express_checkoutPayPal Express Checkout is a payment gateway.gocardlessGoCardless is a payment service provider.orbitalChase Paymentech(Orbital) is a payment gateway.moneris_usMoneris USA is a payment gateway.monerisMoneris is a payment gateway.bluesnapBlueSnap is a payment gateway.cybersourceCyberSource is a payment gateway.vantivVantiv is a payment gateway.checkout_comCheckout.com is a payment gateway.paypalPayPal Commerce is a payment gateway.ingenico_directWorldline Online Payments is a payment gateway.exactExact Payments is a payment gateway.mollieMollie is a payment gateway.quickbooksIntuit QuickBooks Payments gatewayrazorpayRazorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc.global_paymentsGlobal Payments is a payment service provider.bank_of_americaBank of America GatewayecentricEcentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities.metrics_globalMetrics global is a leading payment service provider providing unified payment services in the US.windcaveWindcave provides an end to end payment processing solution in ANZ and other leading global markets.pay_comPay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.ebanxEBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.dlocalDlocal provides payment solutions for global commerce by accepting local payment methods.nuveiNuvei is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. paystackPaystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline. jp_morganJ.P. Morgan Mobility is a payment gateway that enables you to securely accept and manage digital payments across different payment_source_type
. not_applicableIndicates that payment gateway is not applicable for this resource. Show all values[+]
optional, string, max chars=65k Payload from the gateway response with voucher details
optional, string, max chars=100 Error code received from the payment gateway on failure.
optional, string, max chars=65k Error message received from the payment gateway on failure.
optional, string, max chars=65k Chargebee Hosted Page url for payment voucher
optional, timestamp(UTC) in seconds Indicates when this payment voucher occurred date.
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.
optional, timestamp(UTC) in seconds Timestamp indicating when this voucher was last updated.
string, max chars=50 Identifier of the customer. optional, list of invoice_payment_voucher
Invoices related to the generated voucher
Linked invoice attributes
string, max chars=50 Identifier for the invoice.
string, max chars=40 Uniquely identifies the payment voucher.
timestamp(UTC) in seconds Timestamp at which the transaction is applied.
string, max chars=40 Uniquely identifies the payment voucher.
optional, string, max chars=100 The id with which this voucher is referred in gateway.
enumerated string Type of the payment source. Possible values are
boletoBoleto
optional, timestamp(UTC) in seconds Timestamp indicating when the Voucher will expire if left unconsumed.
optional, enumerated string Current status of Payment Voucher. Possible values are
activeActive and ready to be consumedconsumedConsumed for a transaction and cannot be used againexpiredExpired before consumed and cannot be used againfailureFailed to create the voucher due to gateway rejection
activeActive and ready to be consumedconsumedConsumed for a transaction and cannot be used againexpiredExpired before consumed and cannot be used againfailureFailed to create the voucher due to gateway rejection
Show all values[+]
optional, string, max chars=50 Identifier of the subscription for which this payment voucher is made.
string, max chars=3 The currency code (ISO 4217 format) for the voucher.
optional, in cents, min=1 Amount for this payment voucher.
optional, string, max chars=50 The gateway account used for this voucher
optional, string, max chars=40 Identifier of the payment source for which this payment voucher is created
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 values are
chargebeeChargebee test gateway.chargebee_paymentsChargebee Payments gatewayadyenAdyen is a payment gateway.stripeStripe is a payment gateway.wepayWePay is a payment gateway.braintreeBraintree is a payment gateway.authorize_netAuthorize.net is a payment gatewaypaypal_proPayPal Pro Account is a payment gateway.pinPin is a payment gatewayewayeWAY Account is a payment gateway.eway_rapideWAY Rapid is a payment gateway.worldpayWorldPay is a payment gatewaybalanced_paymentsBalanced is a payment gatewaybeanstreamBambora(formerly known as Beanstream) is a payment gateway.bluepayBluePay is a payment gateway.elavonElavon Virtual Merchant is a payment solution.first_data_globalFirst Data Global Gateway Virtual Terminal AccounthdfcHDFC Account is a payment gateway.migsMasterCard Internet Gateway Service payment gateway.nmiNMI is a payment gateway.ogoneIngenico ePayments (formerly known as Ogone) is a payment gateway.paymillPAYMILL is a payment gateway.paypal_payflow_proPayPal Payflow Pro is a payment gateway.sage_paySage Pay is a payment gateway.tco2Checkout is a payment gateway.wirecardWireCard Account is a payment service provider.amazon_paymentsAmazon Payments is a payment service provider.paypal_express_checkoutPayPal Express Checkout is a payment gateway.gocardlessGoCardless is a payment service provider.orbitalChase Paymentech(Orbital) is a payment gateway.moneris_usMoneris USA is a payment gateway.monerisMoneris is a payment gateway.bluesnapBlueSnap is a payment gateway.cybersourceCyberSource is a payment gateway.vantivVantiv is a payment gateway.checkout_comCheckout.com is a payment gateway.paypalPayPal Commerce is a payment gateway.ingenico_directWorldline Online Payments is a payment gateway.exactExact Payments is a payment gateway.mollieMollie is a payment gateway.quickbooksIntuit QuickBooks Payments gatewayrazorpayRazorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc.global_paymentsGlobal Payments is a payment service provider.bank_of_americaBank of America GatewayecentricEcentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities.metrics_globalMetrics global is a leading payment service provider providing unified payment services in the US.windcaveWindcave provides an end to end payment processing solution in ANZ and other leading global markets.pay_comPay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.ebanxEBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.dlocalDlocal provides payment solutions for global commerce by accepting local payment methods.nuveiNuvei is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. paystackPaystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline. jp_morganJ.P. Morgan Mobility is a payment gateway that enables you to securely accept and manage digital payments across different payment_source_type
. not_applicableIndicates that payment gateway is not applicable for this resource. chargebeeChargebee test gateway.chargebee_paymentsChargebee Payments gatewayadyenAdyen is a payment gateway.stripeStripe is a payment gateway.
wepayWePay is a payment gateway.braintreeBraintree is a payment gateway.authorize_netAuthorize.net is a payment gatewaypaypal_proPayPal Pro Account is a payment gateway.pinPin is a payment gatewayewayeWAY Account is a payment gateway.eway_rapideWAY Rapid is a payment gateway.worldpayWorldPay is a payment gatewaybalanced_paymentsBalanced is a payment gatewaybeanstreamBambora(formerly known as Beanstream) is a payment gateway.bluepayBluePay is a payment gateway.elavonElavon Virtual Merchant is a payment solution.first_data_globalFirst Data Global Gateway Virtual Terminal AccounthdfcHDFC Account is a payment gateway.migsMasterCard Internet Gateway Service payment gateway.nmiNMI is a payment gateway.ogoneIngenico ePayments (formerly known as Ogone) is a payment gateway.paymillPAYMILL is a payment gateway.paypal_payflow_proPayPal Payflow Pro is a payment gateway.sage_paySage Pay is a payment gateway.tco2Checkout is a payment gateway.wirecardWireCard Account is a payment service provider.amazon_paymentsAmazon Payments is a payment service provider.paypal_express_checkoutPayPal Express Checkout is a payment gateway.gocardlessGoCardless is a payment service provider.orbitalChase Paymentech(Orbital) is a payment gateway.moneris_usMoneris USA is a payment gateway.monerisMoneris is a payment gateway.bluesnapBlueSnap is a payment gateway.cybersourceCyberSource is a payment gateway.vantivVantiv is a payment gateway.checkout_comCheckout.com is a payment gateway.paypalPayPal Commerce is a payment gateway.ingenico_directWorldline Online Payments is a payment gateway.exactExact Payments is a payment gateway.mollieMollie is a payment gateway.quickbooksIntuit QuickBooks Payments gatewayrazorpayRazorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc.global_paymentsGlobal Payments is a payment service provider.bank_of_americaBank of America GatewayecentricEcentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities.metrics_globalMetrics global is a leading payment service provider providing unified payment services in the US.windcaveWindcave provides an end to end payment processing solution in ANZ and other leading global markets.pay_comPay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.ebanxEBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.dlocalDlocal provides payment solutions for global commerce by accepting local payment methods.nuveiNuvei is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. paystackPaystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline. jp_morganJ.P. Morgan Mobility is a payment gateway that enables you to securely accept and manage digital payments across different payment_source_type
. not_applicableIndicates that payment gateway is not applicable for this resource. Show all values[+]
optional, string, max chars=65k Payload from the gateway response with voucher details
optional, string, max chars=100 Error code received from the payment gateway on failure.
optional, string, max chars=65k Error message received from the payment gateway on failure.
optional, string, max chars=65k Chargebee Hosted Page url for payment voucher
optional, timestamp(UTC) in seconds Indicates when this payment voucher occurred date.
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.
optional, timestamp(UTC) in seconds Timestamp indicating when this voucher was last updated.
string, max chars=50 Identifier of the customer.
optional, list of invoice_payment_voucher Invoices related to the generated voucher 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.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Sample Request
curl https://{site}.chargebee.com/api/v2/payment_vouchers \
-u {site_api_key}:\
-d customer_id="__test__XpbTXGTSRp4Mg0Dr" \
-d payment_source_id="pm___dev__8asu4TZd0GfCJs" \
-d "voucher_payment_source[voucher_type]"="BOLETO" \
-d "invoice_allocations[invoice_id][0]"="__demo_inv__27"
Creates a voucher for unpaid invoice
curl https://{site}.chargebee.com/api/v2/payment_vouchers \
-u {site_api_key}:\
-d customer_id="__test__XpbTXGTSRp4Mg0Dr" \
-d payment_source_id="pm___dev__8asu4TZd0GfCJs" \
-d "voucher_payment_source[voucher_type]"="BOLETO" \
-d "invoice_allocations[invoice_id][0]"="__demo_inv__27"
Creates a voucher for unpaid invoice
curl https://{site}.chargebee.com/api/v2/payment_vouchers \
-u {site_api_key}:\
-d customer_id="__test__XpbTXGTSRp4Mg0Dr" \
-d payment_source_id="pm___dev__8asu4TZd0GfCJs" \
-d "voucher_payment_source[voucher_type]"="BOLETO" \
-d "invoice_allocations[invoice_id][0]"="__demo_inv__27"
Sample Response [ JSON ]
Show more...
{
"payment_voucher": {
"id": "pv_1mG11S1TcNM88A9Zm",
"id_at_gateway": "pi_3N0VBuK7ilSfRo7v0D66epcC",
"payment_voucher_type": "boleto",
"expires_at": 1682365190,
"status": "active",
"amount": 17800,
"gateway_account_id": "gw_161my9TXG5oNYwgv",
"payment_source_id": "pm_1mG11S1TcNM3LP9ZX",
"gateway": "stripe",
"payload": "{\"url\":\"https://payments.stripe.com/boleto/voucher/test_YWNjdF8xTHZnMFRLN2lsU2ZSbzd2LF9ObTNJN2NoejBsYldJeDI0VTVxemkwbnJaZUVTN0FH0100PvfYwtjd\",\"voucher_number\":\"01010101010101010101010101010101010101010101010\",\"expiry\":\"1682365190\"}",
"url": "http://john.chargebee.com/pages/v3/__dev__w5aPBsoEK5z6kIEt2mrEIH9GWLliHXrN/view_voucher",
"date": 1682365010,
"updated_at": 1682365010,
"resource_version": 1682365010580,
"object": "payment_voucher",
"currency_code": "BRL",
"customer_id": "test_d23ed22ew",
"linked_invoices": [
{
"invoice_id": "61",
"date": 1682364955,
"total": 17800,
"status": "payment_due"
},
{..}
]
}
}
URL Format
POST
https://{site}.chargebee.com/api/v2/payment_vouchers
required, string, max chars=50 The unique identifier of the customer for whom you want to create the voucher.
optional, string, max chars=40 The identifier of the payment source used for generating the voucher. voucher_payment_source[[0..n]][0..n]
optional, enumerated string Parameters for voucher_payment_source invoice_allocations[[0..n]][0..n]
optional, array Parameters for invoice_allocations. Multiple invoice_allocations can be passed by specifying unique indices.
Parameters for voucher_payment_source
pass parameters as voucher_payment_source[<param name>]
voucher_payment_source[voucher_type] required, enumerated string The type of voucher-based payment source. Possible values are
boletoThe payment source is Boleto.
Parameters for invoice_allocations. Multiple invoice_allocations can be passed by specifying unique indices.
pass parameters as invoice_allocations[<param name>][<idx:0..n>]
invoice_allocations[invoice_id][0..n] required, string, max chars=50 The unique identifier of the invoice. You can pass multiple invoices ID.
always returned required
Resource object representing payment_voucher
Sample admin console URL
https://{site}.chargebee.com/admin-console/payment_vouchers/123x
Retrieves a voucher using the unique payment_voucher_id
.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Sample Request
curl https://{site}.chargebee.com/api/v2/payment_vouchers/pv_1mG11S1TcNL0SP9Vd \
-u {site_api_key}:
curl https://{site}.chargebee.com/api/v2/payment_vouchers/pv_1mG11S1TcNL0SP9Vd \
-u {site_api_key}:
curl https://{site}.chargebee.com/api/v2/payment_vouchers/pv_1mG11S1TcNL0SP9Vd \
-u {site_api_key}:
Sample Response [ JSON ]
Show more...
{
"payment_voucher": {
"id": "pv_1mG11S1TcNL0SP9Vd",
"id_at_gateway": "pi_3N0V7aK7ilSfRo7v1pfbc2NI",
"payment_voucher_type": "boleto",
"expires_at": 1682364922,
"status": "active",
"amount": 18900,
"gateway_account_id": "gw_161my9TXG5oNYwgv",
"payment_source_id": "pm_1mG11S1TcNKrvR9Up",
"gateway": "stripe",
"payload": "{\"url\":\"https://payments.stripe.com/boleto/voucher/test_YWNjdF8xTHZnMFRLN2lsU2ZSbzd2LF9ObTNFc3MzMDlsbU1qamg1Q2ROdDNzOWNYUk81bkhp0100p0cMVCz3\",\"voucher_number\":\"01010101010101010101010101010101010101010101010\",\"expiry\":\"1682364922\"}",
"url": "http://john.chargebee.com/pages/v3/__dev__w5aPBsoEK5z6kIEt2mrEIH9GWLliHXrN/view_voucher",
"date": 1682364742,
"updated_at": 1682364742,
"resource_version": 1682364742832,
"object": "payment_voucher",
"currency_code": "BRL",
"customer_id": "test_d23ed22ew",
"linked_invoices": [
{
"invoice_id": "60",
"date": 1682364741,
"total": 18900,
"status": "payment_due"
},
{..}
]
}
}
URL Format
GET
https://{site}.chargebee.com/api/v2/payment_vouchers/{payment-voucher-id}
always returned required
Resource object representing payment_voucher
Sample admin console URL
https://{site}.chargebee.com/admin-console/payment_vouchers/123x
Retrieves vouchers for an invoice in reverse chronological order.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Sample Request
curl https://{site}.chargebee.com/api/v2/invoices/__demo_inv__4/payment_vouchers \
-G \
-u {site_api_key}:\
--data-urlencode limit=1
curl https://{site}.chargebee.com/api/v2/invoices/__demo_inv__4/payment_vouchers \
-G \
-u {site_api_key}:\
--data-urlencode limit=1
curl https://{site}.chargebee.com/api/v2/invoices/__demo_inv__4/payment_vouchers \
-G \
-u {site_api_key}:\
--data-urlencode limit=1
Sample Response [ JSON ]
Show more...
{
"list": [
{
"payment_voucher": {
"id": "pv_1mG11S1TcNL0SP9Vd",
"id_at_gateway": "pi_3N0V7aK7ilSfRo7v1pfbc2NI",
"payment_voucher_type": "boleto",
"expires_at": 1682364922,
"status": "active",
"amount": 18900,
"gateway_account_id": "gw_161my9TXG5oNYwgv",
"payment_source_id": "pm_1mG11S1TcNKrvR9Up",
"gateway": "stripe",
"payload": "{\"url\":\"https://payments.stripe.com/boleto/voucher/test_YWNjdF8xTHZnMFRLN2lsU2ZSbzd2LF9ObTNFc3MzMDlsbU1qamg1Q2ROdDNzOWNYUk81bkhp0100p0cMVCz3\",\"voucher_number\":\"01010101010101010101010101010101010101010101010\",\"expiry\":\"1682364922\"}",
"url": "http://john.chargebee.com/pages/v3/__dev__w5aPBsoEK5z6kIEt2mrEIH9GWLliHXrN/view_voucher",
"date": 1682364742,
"updated_at": 1682364742,
"resource_version": 1682364742832,
"object": "payment_voucher",
"linked_invoices": [
{
"invoice_id": "60",
"date": 1682364741,
"total": 18900,
"status": "payment_due"
},
{..}
],
"currency_code": "BRL",
"customer_id": "test_d23ed22ew"
}
},
{..}
]
}
URL Format
GET
https://{site}.chargebee.com/api/v2/invoices/{invoice-id}/payment_vouchers
optional, integer, default=10, min=1, max=100 The number of resources to be returned.
optional, string, max chars=1000 Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set offset
to the value of next_offset
obtained in the previous iteration of the API call.
optional, string filter
Sorts based on the specified attribute.
Supported attributes : date, updated_at
Supported sort-orders : asc, desc
Example → sort_by[asc] = "date"
This will sort the result based on the 'date'
attribute in ascending(earliest first) order.
optional, enumerated string filter
Current status of Payment Voucher. Possible values are : active, consumed, expired, failure
Supported operators : is, is_not, in, not_in
Example → status[is] = "active, consumed, expired"
Current status of Payment Voucher.
pass parameters as status[<param name>][<operator>]
optional, enumerated string filter
Possible values are : active, consumed, expired, failure
Supported operators :
Example →
optional, enumerated string filter
Possible values are : active, consumed, expired, failure
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
always returned required
Resource object representing payment_voucher
always returned optional, string, max chars=1000
This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter `offset`.
Sample admin console URL
https://{site}.chargebee.com/admin-console/payment_vouchers/123x
Retrieves vouchers for a customer in reverse chronological order.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Sample Request
curl https://{site}.chargebee.com/api/v2/customers/test_d23ed22ew/payment_vouchers \
-G \
-u {site_api_key}:\
--data-urlencode limit=1
curl https://{site}.chargebee.com/api/v2/customers/test_d23ed22ew/payment_vouchers \
-G \
-u {site_api_key}:\
--data-urlencode limit=1
curl https://{site}.chargebee.com/api/v2/customers/test_d23ed22ew/payment_vouchers \
-G \
-u {site_api_key}:\
--data-urlencode limit=1
Sample Response [ JSON ]
Show more...
{
"list": [
{
"payment_voucher": {
"id": "pv_1mG11S1TcNL0SP9Vd",
"id_at_gateway": "pi_3N0V7aK7ilSfRo7v1pfbc2NI",
"payment_voucher_type": "boleto",
"expires_at": 1682364922,
"status": "active",
"amount": 18900,
"gateway_account_id": "gw_161my9TXG5oNYwgv",
"payment_source_id": "pm_1mG11S1TcNKrvR9Up",
"gateway": "stripe",
"payload": "{\"url\":\"https://payments.stripe.com/boleto/voucher/test_YWNjdF8xTHZnMFRLN2lsU2ZSbzd2LF9ObTNFc3MzMDlsbU1qamg1Q2ROdDNzOWNYUk81bkhp0100p0cMVCz3\",\"voucher_number\":\"01010101010101010101010101010101010101010101010\",\"expiry\":\"1682364922\"}",
"url": "http://john.chargebee.com/pages/v3/__dev__w5aPBsoEK5z6kIEt2mrEIH9GWLliHXrN/view_voucher",
"date": 1682364742,
"updated_at": 1682364742,
"resource_version": 1682364742832,
"object": "payment_voucher",
"linked_invoices": [
{
"invoice_id": "60",
"date": 1682364741,
"total": 18900,
"status": "payment_due"
},
{..}
],
"currency_code": "BRL",
"customer_id": "test_d23ed22ew"
}
},
{..}
]
}
URL Format
GET
https://{site}.chargebee.com/api/v2/customers/{customer-id}/payment_vouchers
optional, integer, default=10, min=1, max=100 The number of resources to be returned.
optional, string, max chars=1000 Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set offset
to the value of next_offset
obtained in the previous iteration of the API call.
optional, string filter
Sorts based on the specified attribute.
Supported attributes : date, updated_at
Supported sort-orders : asc, desc
Example → sort_by[asc] = "date"
This will sort the result based on the 'date'
attribute in ascending(earliest first) order.
optional, enumerated string filter
Current status of Payment Voucher. Possible values are : active, consumed, expired, failure
Supported operators : is, is_not, in, not_in
Example → status[is] = "active, consumed, expired"
Current status of Payment Voucher.
pass parameters as status[<param name>][<operator>]
optional, enumerated string filter
Possible values are : active, consumed, expired, failure
Supported operators :
Example →
optional, enumerated string filter
Possible values are : active, consumed, expired, failure
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
always returned required
Resource object representing payment_voucher
always returned optional, string, max chars=1000
This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter `offset`.
Sample admin console URL
https://{site}.chargebee.com/admin-console/payment_vouchers/123x