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

Collect now

This API generates a hosted page URL to collect due payments for the customer.

Open the hosted page in a new browser tab or window using the url from this API's response. Do not embed it in your own iframe.

Sample Request

Sample Result[JSON]

URL Format

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

Input Parameters

brand_id
optional, string, max chars=50

The unique ID of the brand this hosted page should be linked to. Applicable only when multiple brands have been created for the site. This need not match the brand of the customer or subscription in the request; when the two differ, the value provided here is used for the hosted page. 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 hosted page is linked to the brand of the customer or subscription in the request.
redirect_url
optional, string, max chars=250

Used to specify the destination URL to which a user is redirected after invoices are paid. The transaction ID of the transactions made through the Pay Now hosted page will be sent as return variables along with the URL.

currency_code
optional, string, max chars=3

The currency code (ISO 4217 format) of the specified credit amount .

payment_method_save_policy
optional, enumerated string

Determines whether the payment method should be saved to the customer's account.

Enum Values
always

Automatically save the payment method to the customer's account for future use.

ask

Let the customer choose whether to save the payment method.

never

Do not save the payment method.

customer
Parameters for customer
pass parameters as customer[<param name>]
card
Parameters for card
pass parameters as card[<param name>]

Returns

Hosted page object

Resource object representing hosted_page