Init JSON Parameter

  "payment" : {
    "amount" : 10.00
  "currency" : "USD"
}{"k":"0yqowfwfxb2vpnuv9ovpqvgt","h":"","o":"","p":{"a":"5000.20"},"c":"USD","m":["echeck", "card"],"b":{"s": "41 Grandview St","c":"Santa Cruz","p":"95060","d":"CA","u":"USA"},"y":{"n":"Christina Chan","e":"demo%[email protected]"},"z":{"foo":{"bar":"quux","baz":"norf"}}}{"k":"0yqowfwfxb2vpnuv9ovpqvgt","h":"","o":"","c":"USD","m":["echeck","card"],"b":{"s":"100 Bay St","c":"Santa Cruz","p":"95060","d":"CA","u":"USA"},"y":{"n": "Christina Chan","e":"demo%[email protected]"},"z":{"foo":{"bar":"quux","baz":"norf"}},"r":{"n":"One year lease","d":"120 Swift St. 12 Month Lease","i":[{"n":"Monthly Rent","d":"Rent of $1200 is due on the first of every month","s":{"n":"Rent","d":"Pay rent on the 1st of the month","i":"month","c":"1","a":"start","s":"2016-04-01T00:00","t":"12"},"a":"1200.00"},{"n":"Application Fee","d":"One time application fee of $150.00","s":{"n":"Application Fee","d":"Pay a one time non-refundable application fee"},"a":"150.00"},{"n":"Security Deposit","d":"$2000 Refundable security deposit that can be used to cover damages","s":{"n":"Deposit","d":"Security deposit or the home","s":"2016-04-01T00:00"},"a":"2000.00"}]}}

The Billing Portal can be initialized by adding a parameter named "init" to the billing portal URL with a JSON formatted and URL encoded value representing a checkout initialization object.

Using a URL encoded, JSON formatted [initialization object]/reference/checkout-init-object) in the URL is primarily useful when the object and URL are programmatically generated.

An example use case is an invoicing application which automatically generates the Billing Portal URL with an init parameter specifying the amount, currency, invoice number, customer, etc. and injects it in the emailed PDF invoice. JSON formatting and URL encoding an initialization object in such an environment is typically very straightforward and concise.


URL Encoding

All parameter values containing non-alphanumeric characters passed in the URL need to be URL encoded regardless of which parameter format is being used.