logo

Chargebee Subscriptions

Introduction

Chargebee is a subscription management system that can help you handle all the aspects of the subscription life cycle including recurring billing, invoicing, and trial management for your customers.

How to setup

  1. Create Chargebee account https://www.chargebee.com/trial-signup/โ€‹
  1. Go to Settings -> Configure Chargebee
Image without caption
โ€‹3. Go to API keysโ€‹
Image without caption
4. Press Add API Keyโ€‹
Image without caption
โ€‹5. Create Full-Access Keyโ€‹
Image without caption
6. Set the name of API Keyโ€‹
Image without caption
7. Copy API Keyโ€‹
Image without caption
8. Place this API Key in Plugin fieldsโ€‹
Image without caption

Plugin Element Proprietes

Chargebee Card Input- use Chargebee Components to collect card details. Chargebee Components are iframe-based input fields.

Element fields โš™

Image without caption
Image without caption
Image without caption
  • Site - text, Required.
Your Site name. The site name can be obtained from the link from your Chargebee page.โ€‹
Image without caption
  • Domain - text, Required if the custom domain is enabled.
Your custom domain. Example: https://billing.yourdomain.comโ€‹
  • Number - text. Optional.
Custom text for card number placeholder.โ€‹
  • Expiry - text. Optional.
Custom text for card expiry placeholder.โ€‹
  • CVV - text. Optional.
Custom text for card cvv expiry placeholder.โ€‹
  • Placeholder Color - color. Optional.
Color of placeholder text.โ€‹
  • Icon Color - color. Optional.
Color of card image in input.โ€‹
  • publishableKey - text. Required.
How to get Publishable Key:
  1. Go to Settings -> Configure Chargebee
Image without caption
3. Go to API keysโ€‹
Image without caption
โ€‹4. Press Add API Keyโ€‹
Image without caption
โ€‹5. Create Publishable Key
Image without caption
โ€‹
6. Check all checkboxes and set a name for this key
Image without caption
7. Copy this key and put it in the element fieldโ€‹
Image without caption
  • Type - Fields mode or Default mode. Required.
Fields mode
Image without caption
โ€‹Default mode
Image without caption

Element actions โš™

Generate token - generate a token with data about the card. Return token value in Card Token state.
Clear token - delete token from Card Token state.

Element events โš™

Token Is Generated - is triggered when action Generate token is executed and the token is written in Card Token state.
Error In Token Generation - is triggered when an action Generate token has an error. Error text is written in the Token Generation Error state.
Error in input - is triggered when an input value is not valid. Error text is written in Error in input state.

Element states โš™

Card Token - contains token generated by an action Generate token.
Token Generation Error - contains error text in the token generation.
Error in input - contains error text from invalid input.

Plugin actions

1. ChargeBee - Get Item Price

Get a list of all prices and item_id and return item_price_id.โ€‹
Image without caption

Action Fields

Item ID - text, required. ID of Chargebee item.
List of prices - List of things returned by API Call List item prices, required.โ€‹

2. ChargeBee - Generate Sort Query For ...

We have 4 actions with the same name and different things. These actions generate a special Chargebee sort query. Chargebee filtering info.โ€‹

3. ChargeBee - Generate Query For Buing

This action gets a list of things where represent a bucket and using additional options ( read about Buy query ) generates a correct query.
Image without caption

Plugin API Calls

The site name, for the your_site field can be obtained from the link from your Chargebee page.โ€‹
Image without caption

1. Create a customer

This API call creates a new customer in Chargebee.โ€‹
Image without caption
Image without caption
Image without caption
โ€‹About Create customer fields (customer attributes and sample of customer JSON) see Chargebee docs.

2. List of customers

This API call return list of your customers.โ€‹
Image without caption
About List of customers fields (samples of JSON request and response, and input parameters) see Chargebee docs.

3. Retrieve Customer

Return information about a customer.โ€‹
Image without caption
About Retrieve Customer fields (samples of JSON request and response, and input parameters) see Chargebee docs.

4. Update Customer (No Billing)

Update data of customer excluding billing data.โ€‹
Image without caption
Image without caption
Image without caption
About Update Customer (No Billing) fields (samples of JSON request and response, and input parameters) see Chargebee docs.

5. Update Customer (Billing Data)

This method is used for updating the 'Billing Info' - the Billing Address and 'vat_number' attributes - of the customer.โ€‹
Image without caption
Image without caption
About Update Customer ( Billing Data ) fields (samples of JSON request and response, and input parameters) see Chargebee docs.

6. Create a card payment source via token for a customer

Add a card payment source to a customer using Chargebee.js tokenโ€‹
Image without caption
About Create a card payment source via token for customer fields (samples of JSON request and response, and input parameters) see Chargebee docs.

7. Create a bank account payment source for a customer

This API adds a Direct Debit payment source for a customer.โ€‹
Image without caption
Image without caption
About Create a bank account payment source for customer fields (samples of JSON request and response, and input parameters) see Chargebee docs.

8. List items

Returns a list of items satisfying all the conditions specified in the filter parameters below. โ€‹
Image without caption
Abou List items fields (samples of JSON request and response, and input parameters) see Chargebee docs.

9. Retrieve An Item

Retrieve an item resource.โ€‹
Image without caption
About Retrieve An Item fields (samples of JSON request and response) see Chargebee docs.

10. List item prices

An item price is a price point for an item.โ€‹
Image without caption
About List item prices fields (samples of JSON request and response, and input parameters) 11 see Chargebee docs.

11. Retrieve Item Price

Retrieve a specific item price.โ€‹
Image without caption
About Retrieve Item Price fields (samples of JSON request and response) see Chargebee docs.

12. Create Subscription For Items

Creates a new subscription for an existing customer in Chargebee.โ€‹
Image without caption
Image without caption
Image without caption
Image without caption
About Create Subscription For Items fields (samples of JSON request and response, and input parameters) see Chargebee docs.

13. Cancel subscription for items

Cancels the subscription.โ€‹
Image without caption
About Cancel subscription for items fields (samples of JSON request and response, and input parameters) see Chargebee docs.

14. Pause subscription

Pausing a subscription will move the subscription from its current state to Paused state, and will stop all recurring actions.
Image without caption
About Pause subscription fields (samples of JSON request and response, and input parameters) see Chargebee docs.

15. Resume subscription

This API is used to resume a paused subscription.โ€‹
Image without caption
About Resume subscription fields (samples of JSON request and response, and input parameters) see Chargebee docs.

16. List subscriptions

Returns a list of subscriptions meeting all the conditions specified in the filter parameters below.โ€‹
Image without caption
About List subscriptions fields (samples of JSON request and response, and input parameters) see Chargebee docs.

17. Retrieve subscription

Retrieves a subscription.
Image without caption
โ€‹About Retrieve subscription fields (samples of JSON request and response, and input parameters) see Chargebee docs.

18. Update a card payment source

Update card details.โ€‹
Image without caption
About Update a card payment source fields (samples of JSON request and response, and input parameters) see Chargebee docs.

19. Delete a payment source

Deletes a payment source.
Image without caption
About Delete a payment source fields (samples of JSON request and response) see Chargebee docs.

20. Delete subscription

Deletes the subscription resource.
Image without caption
About Delete a payment source fields (samples of JSON request and response) see Chargebee docs.

21. Delete customer

Deletes the customer resource.
Image without caption
About Delete a payment source fields (samples of JSON request and response) see Chargebee docs.โ€‹โ€‹

Demo to preview the settings