# Chargebee To get started using the Checkout.com Chargebee plugin, you must first set up and test your integration in the sandbox environment, and then move your integration to the production environment. The plugin supports the following payment methods: - Card payments - Apple Pay - Google Pay - ACH direct debit - SEPA direct debit --- ## Before you start Before you configure the plugin, you must create a public and private key. ### Create a public API key 1. Sign in to the sandbox environment in the [Dashboard](https://dashboard.checkout.com). 2. Select _Developers_ in the left navigation bar and open the _Keys_ tab. 3. Select _Create a new key_. 4. Under _Type of key_, select _Public API key_. 5. Give the API key a description. This will help you identify what it's used for. 6. Disable the _Allow any processing channel_ setting. 7. Select the processing channel you want to use for Chargebee payments from the list. 8. Select _Create key_. 9. Copy your public API key. You'll need it to configure the plugin. > **Information** > > You can view your public API key in the Dashboard at any time. ### Create a private API key 1. Sign in to the sandbox environment in the [Dashboard](https://dashboard.checkout.com). 2. Select _Developers_ in the left navigation bar and open the _Keys_ tab. 3. Select _Create a new key_. 4. Under _Type of key_, select _Secret API key_. 5. Give the API key a description. This will help you identify what it's used for. 6. Under _Scopes_, select _Default_. 7. Disable the _Allow any processing channel_ setting. 8. Select the same processing channel you created the public API key for from the list. 9. Select _Create key_. 10. Copy your secret API key securely. You'll need it to configure the plugin. > **Note** > > For security, you cannot view the secret API key again after you've left the _Create a new key_ page. Ensure you copy its value securely before you exit or close the window. --- ## Configure the plugin ### Configure the app settings 1. Sign in to your Chargebee account. 2. Go to _Settings_ > _Configure Chargebee_ > _Payment Gateways_. 3. Select the _Checkout.com_ gateway that you configured previously. 4. Select _Manage_. 5. In the _NAS API Secret Key_ field, enter `Bearer` followed by the secret key you created in the Dashboard sandbox environment. For example, `Bearer `. 6. In the _NAS API Public Key_ field, enter the public key you created in the Dashboard sandbox environment. You can manage your settings in the _Configure Checkout.com Settings_ page. ### Configure the app webhook Before you can configure your webhooks in the Dashboard, you must retrieve the notification URL from Chargebee: 1. Sign in to your Chargebee account. 2. Go to the _Webhooks_ section. 3. Copy the _Notification URL_. To configure webhooks in the Dashboard: 1. Sign in to the sandbox environment in the [Dashboard](https://dashboard.checkout.com). 2. Select _Developers_ in the left navigation bar and open the _Webhooks_ tab. 3. Select _New webhook_. 4. Enter a name for the webhook. 5. Enter the notification URL you copied from Chargebee in the _Endpoint URL_ field. 6. Leave the _Authorization Header Key_ field blank. 7. In the _Signature Key_ field, enter `Bearer` followed by the secret key you created in the Dashboard sandbox environment. For example, `Bearer `. 8. Under _Events_, select the event types you want to receive notifications for. 9. Under _Entities and processing channels_, select the entities you want to receive webhooks for. If you leave this blank, the parent entity is selected by default. 10. Select _Create webhook_. --- ## Test your integration 1. Sign in to your Chargebee account. 2. Go to the _Customers_ page. 3. Select _Create customer_. 4. Enter the customer details. Use a real email address to to receive the order confirmation. 5. Select _Create_. 6. In the left navigation, select _Payment methods_. 7. Enter the following card details: - Number – `4242 4242 4242 4242` - Expiry date – Any date in the future - CVV – `100` 8. Select a _Gateway Account_ from the drop-down. 9. Confirm the card creation. 10. Select the _Create Quick Charge_ option from the right navigation. 11. Configure the quick charge settings and select _Add_. To view the test order in your Chargebee account: 1. Go to the _History_ tab. 2. Select the payment in the _History_ report to view additional details. --- ## Move your integration to the production environment 1. Sign in to the production environment in the [Dashboard](https://dashboard.checkout.com). 2. Follow the previous steps to [create a public key](#Create_a_public_API_key) and [create a private key](#Create_a_private_API_key). 3. Follow the previous steps to [Configure the app webhook](#Configure_the_app_webhook). Use the new secret key you created as the webhook's _Signature Key_. 4. Sign in to your Chargebee account and follow the Chargebee – [Go-live checklist](https://www.chargebee.com/docs/2.0/checklist.html) steps. --- ## Manage refund, return, and void transaction data You can refund, return, or void an order from the Dashboard. Chargebee updates the status of the order automatically.