Docs

Log in to read the version of docs relevant to your site, or use the dropdown versions

How to configure return/redirect URLs in Chargebee?

Scope

How to configure return/redirect URLs in Hpv3?

How to configure return/redirect URLs on PC 1.0/Hpv3?

How to configure return/redirect URLs on PC 2.0/Hpv3?

Summary

This article applies to users on hosted page V3/Modal checkout.

Note:

 To configure redirect URL on Checkout Hpv2, refer to this link.

When you are using Chargebee's checkout page to complete sign-ups, and need to redirect your customers back to your app to a "Sign up successful" or "Thank you" page you can configure it using a redirect URL.

If you're using the Chargebee checkout-based integration, you can configure the redirected URL in the plan, from the edit page after the plan is created.

Solution Redirect URLs:

  • Can be set up only during a plan creation or by editing an existing plan.

  • Must be added to all the plans which require users to be redirected after checkout.

  • Must be whitelisted in the Checkout settings (To do this, Go to > Settings > Configure Chargebee > Checkout and self-serve portal > Advanced settings > Add domains. Add the URL and publish the changes.)

  1. How to set up a redirect URL: To configure your custom page URL Go to Dashboard > Product Catalog > Plans > Edit plan > Redirect URL

Classic UI

Leap UI

2. How to set up a custom redirect URL: If you want to redirect a particular user to a particular page on signup (i_f you are using our API + Checkout page_), then you can leverage our API to generate the checkout and pass your redirect URL in the parameter. Alternatively, you also redirect users to a different page by listening to the success callback from the Chargebee js. Here's more.

Inapp  API + Checkout -> the redirect URL must be explicitly passed as a parameter as it won't pick the plan level redirect URL by default.

Note: If you have enabled the 'one-time payments checkout' feature, then refer to this link to set up redirect URL for it.

Return Variables

VariableDescriptionType & Example
CUSTOMER - Basic customer details with card status
customer.full_nameFull Name of the customer.Type : String | Eg : John Doe
customer.first_nameFirst name of the customer.Type : String | Eg : John
customer.last_nameLast name of the customer.Type : String | Eg : Doe
customer.emailCustomer's default email address.Type : Email | Eg : john.doe@acmeinc.com
customer.companyCompany Name.Type : String | Eg : JB Incorporated.
customer.phoneCustomer's phone number.Type : String | Eg : +1-949-305-6900
customer.auto_collectionCustomer's auto collection

Type : Enumerated string Eg : on Possible values : on, off

customer.created_atAccount created date and time.Type : Date | Eg : 22-Jan-2020
customer.idUnique customer ID in ChargebeeType : String | Eg : sample_KyVqFKNnJKCX2I
customer.card_statusCredit card status. (Use this on trial subscriptions)Type : String | Eg : no_card, valid, expiring, expired
customer.net_term_daysThe number of days within which the customer has to make payment for the invoice.Type : Numeric | Eg : 15
customer.cs_newsletterNewsletter subscription statusType : true / false | Eg : true
customer.cs_couponsCoupon subscription statusType : true / false | Eg : true
customer.cf_timestampCustom field timestampType : Date | Eg : 23-Nov-2012
CUSTOMER_PAYMENT_METHOD - Customer's payment method
customer_payment_method.typeType of payment source

Type : Enumerated string Eg : card Possible values : card, paypal_express_checkout, amazon_payments, direct_debit, alipay, unionpay, apple_pay, wechat_pay, ideal, google_pay, sofort, bancontact, giropay, dotpay

customer_payment_method.statusCurrent status of the payment source.

Type : Enumerated string Eg : valid Possible values : valid, expiring, expired, invalid, pending_verification

customer_payment_method.infoPayment method informationType : String | Eg : card ending with 1111, Amazon Payments account, PayPal Express Checkout account, Bank: Wells Fargo - Account number ending with 7890
CUSTOMER_BILLING_ADDRESS - Customer's billing address
customer_billing_address.first_nameFirst name.Type : String | Eg : John
customer_billing_address.last_nameLast name.Type : String | Eg : Doe
customer_billing_address.emailEmail address.Type : Email | Eg : john.doe@acmeinc.com
customer_billing_address.companyCompany Name.Type : String | Eg : JB Incorporated.
customer_billing_address.phonePhone number.Type : String | Eg : +1-949-305-6900
customer_billing_address.line1Address line 1.Type : String | Eg : No 7
customer_billing_address.line2Address line 2.Type : String | Eg : Hill Street
customer_billing_address.line3Address line 3.Type : String | Eg : Beach Avenue
customer_billing_address.cityCity.Type : String | Eg : Los Angeles
customer_billing_address.stateState.Type : String | Eg : California
customer_billing_address.countryCountry.Type : String | Eg : United States
customer_billing_address.zipZip or postal code.Type : String | Eg : 90210
SUBSCRIPTION - Subscription information
subscription.idUnique subscription ID.Type : String | Eg : sub_KyVqFKPPJKCX2I
subscription.statusCurrent subscription status.

Type : Enumerated string Eg : future, in_trial, active, non_renewing, paused, cancelled Possible values : future, in_trial, active, non_renewing, paused, cancelled

subscription.start_dateThe date at which this subscription is scheduled to start. Applicable only for 'Future' subscriptions.Type : Date | Eg : 1-Jan-2010
subscription.trial_startDate when the customer signed up for the subscription. Only for trial subscriptions.Type : Date | Eg : 23-Jan-2010
subscription.trial_endDate when the trial subscription ends. Only for trial subscriptions.Type : Date | Eg : 6-Feb-2010
subscription.current_term_startDate when the billing cycle for the subscription starts. Only for active subscriptions.Type : Date | Eg : 7-Feb-2010
subscription.current_term_endBilling cycle end date. Only for active subscriptions.Type : Date | Eg : 7-Mar-2010
subscription.next_billing_atDate when the next billing would happen. This field is applicable only for future, trial and active subscriptions.Type : Date | Eg : 7-Mar-2010
subscription.next_billing_interval_daysNext billing interval daysType : Numeric | Eg : 3
subscription.remaining_billing_cyclesTotal no. of billing cycles that will be applied to the subscription.Type : Numeric | Eg : 12
subscription.po_numberPurchase Order Number for this subscription.Type : String | Eg : PO-00015
subscription.started_atDate when the subscription started. Will be empty for subscriptions in 'Future' state.Type : Date | Eg : 1-Jan-2010
subscription.activated_atDate when subscription status changed from trial or cancelled to active.Type : Date | Eg : 2-Jan-2010
subscription.created_atDate when the subscription was created.Type : Date | Eg : 1-Jan-2010
subscription.currency_codeThe currency code (ISO 4217 format) of the subscription.Type : String | Eg : USD
subscription.pause_dateDate on which the subscription will be paused.Type : Date | Eg : 07-JAN-2018
subscription.resume_dateDate on which the subscription will be resumed.Type : Date | Eg : 07-FEB-2018
SUBSCRIPTION_SHIPPING_ADDRESS - Subscriber's shipping address
subscription_shipping_address.first_nameFirst name.Type : String | Eg : John
subscription_shipping_address.last_nameLast name.Type : String | Eg : Doe
subscription_shipping_address.emailEmail address.Type : Email | Eg : john.doe@acmeinc.com
subscription_shipping_address.companyCompany Name.Type : String | Eg : JB Incorporated.
subscription_shipping_address.phonePhone number.Type : String | Eg : +1-949-305-6900
subscription_shipping_address.line1Address line 1.Type : String | Eg : No 7
subscription_shipping_address.line2Address line 2.Type : String | Eg : Hill Street
subscription_shipping_address.line3Address line 3.Type : String | Eg : Beach Avenue
subscription_shipping_address.cityCity.Type : String | Eg : Los Angeles
subscription_shipping_address.stateState.Type : String | Eg : California
subscription_shipping_address.countryCountry.Type : String | Eg : United States
subscription_shipping_address.zipZip or postal code.Type : String | Eg : 90210
CUSTOMER_BALANCE - Customer Balances
customer_balance.promotional_creditsPromotional credits balance of the customer.Type : Currency value | Eg : $100
customer_balance.excess_paymentsTotal unused payments associated with the customer.Type : Currency value | Eg : $50
customer_balance.refundable_creditsRefundable credits balance of the customer.Type : Currency value | Eg : $75
customer_balance.unbilled_chargesTotal unbilled charges for this customer.Type : Currency value | Eg : $75
SUBSCRIPTION_REFERRAL_INFO - Subscription's referral details
subscription_referral_info.referral_codeReferral code from referral system used for the subscriptionType : String | Eg : String
subscription_referral_info.coupon_codeReferral coupon code used for the subscriptionType : String | Eg : SDASFGDG
subscription_referral_info.referral_systemReferral system name from which this subscription was made

Type : Enumerated string Eg : referral_candy Possible values : referral_candy, referral_saasquatch, friendbuy

subscription_referral_info.idReferral Campaign handle from which this subscription was madeType : String | Eg : refer_a_friend_campaign
subscription_referral_info.external_campaign_idExternal Campaign id from which this subscription was madeType : String | Eg : String
PLAN - Subscribed plan details
plan.invoice_nameName of the plan invoice.Type : String | Eg : Basic
plan.idUnique plan ID.Type : String | Eg : basic
plan.nameName of the plan.Type : String | Eg : Basic
plan.pricePrice of the plan that the customer has signed up for.Type : Currency value | Eg : $10.99
plan.setup_costSetup or installation price of the plan.Type : Currency value | Eg : $6.99
plan.periodDuration of the billing cycle or how often the subscription is being charged.Type : Numeric | Eg : billed every 3 months will display '3'
plan.period_unitFrequency of the billing cycle. Possible values: day, week, month, yearType : String | Eg : String
plan.trial_periodDuration of the trial period.Type : Numeric | Eg : 14
plan.trial_period_unitUnit of the trial duration. Possible values: day, monthType : String | Eg : String
plan.quantityTotal plan quantity purchased in the subscription.Type : String | Eg : 2
INVOICE - Invoice details
invoice.idUnique invoice ID.Type : String | Eg : inv___sam__8avTzNrBhrdG2
invoice.po_numberPurchase Order Number for this invoice.Type : String | Eg : PO-00016
invoice.amountTotal amount on invoice.Type : Currency value | Eg : $200
invoice.amount_dueTotal amount due.Type : Currency value | Eg : $100
invoice.amount_paidTotal payments received for this invoice.Type : Currency value | Eg : $100
invoice.amount_adjustedTotal adjustments made against this invoice.Type : Currency value | Eg : $100
invoice.credits_appliedTotal credits applied against this invoice.Type : Currency value | Eg : $100
invoice.write_off_amountAmount written off against this invoice.Type : Currency value | Eg : $100
invoice.statusCurrent invoice status.

Type : Enumerated string Eg : paid, posted, payment_due, not_paid, voided, pending Possible values : paid, posted, payment_due, not_paid, voided, pending

invoice.paid_onDate the payment was made.Type : Date | Eg : 20-Dec-2009
invoice.recurringSpecifies if the invoice is a recurring type or not.Type : true / false | Eg : true
invoice.start_dateDate when invoice was generated for the current billing cycle.Type : Date | Eg : 20-Jan-2010
invoice.end_dateEnd date of the invoice's current billing cycle.Type : Date | Eg : 20-Feb-2010
invoice.due_dateDue date of the invoiceType : Date | Eg : 4-Mar-2010
invoice.net_term_daysNumber of days within which the invoice has to be paidType : Numeric | Eg : 15
invoice.currency_codeThe currency code (ISO 4217 format) of the invoice.Type : String | Eg : USD
GIFT - Details about a gift subscription
gift.idThe unique identifier for this gift.Type : String | Eg : AzZlFZSOmuVMjJm
gift.statusThe current status of the gift subscription

Type : Enumerated string Eg : John Doe Possible values : scheduled, unclaimed, claimed, cancelled, expired

gift.scheduled_atThe date when the gift notification is set to be sent to the receiver.Type : Date | Eg : 1-Apr-2020
gift.auto_claimIndicates whether the gift claim is automatic.Type : true / false | Eg : true
gift.signatureThe sign-off name of the gifter.Type : String | Eg : John
gift.noteThe personalized message attached to this gift.Type : String | Eg : Happy Birthday!
GIFT_RECEIVER - Details about a gift subscription's recipient
gift_receiver.full_nameThe full name of the recipient.Type : String | Eg : Jane Doe
gift_receiver.first_nameFirst name of the recipient.Type : String | Eg : Jane
gift_receiver.last_nameLast name of the recipient.Type : String | Eg : Doe
gift_receiver.emailEmail address of the recipient.Type : Email | Eg : jane.doe@newco.com

Was this article helpful?