Using AI coding agents like Claude Code or Cursor? Try the official Chargebee Agent Skills to speed up your development.Try now
ChargebeeAPI

Collect Now

Idempotency Supported

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

Sample Request

Sample Result[JSON]

URL Format

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

Input Parameters

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