# Go live

You must test your integration in the sandbox environment before you move to the live environment.
For more information, see [Test transactions in the sandbox](/docs/tutorials/test-transactions-sandbox).

This topic describes how to move your integration from the sandbox environment to the live environment.

The sandbox and live environments are separate.
Configuration and data that you create in the sandbox environment, such as gateway accounts, payment forms, and API keys, are not available in the live environment.
For more information, see [Environments](/docs/tutorials/environments).

## Step 1. Switch your integration to the live environment

Complete the following in your code and configuration:

1. Create live API keys.
  In the live environment, create a secret key and, if your integration uses a payment form library, a publishable key.
  For more information, see [API keys](/docs/dev-docs/api-keys).
2. Replace the sandbox API keys in your integration with the live keys.
  Sandbox keys start with `sk_sandbox_` and `pk_sandbox_`.
  Live keys start with `sk_live_` and `pk_live_`.
3. Point your integration at the live environment:
    - Rebilly API: Use `https://api.rebilly.com` instead of `https://api-sandbox.rebilly.com`.
    - Rebilly JS SDK: Set `sandbox: false`.
    - Rebilly Instruments: Set `apiMode: "live"`.
4. Confirm the organization ID and website ID that your integration uses.
  In the live environment, in the left navigation bar, press **Settings**, then in the **Management** section, press **My organization & websites**.
5. If your integration uses webhooks, update the webhook URL to your production endpoint and verify signatures against the live public key.
  For more information, see [Webhook configuration](/docs/dev-docs/webhooks-configuration#standard-webhooks-signature).

## Step 2. Configure the live environment

Check that each of the following exists in the live environment, and create it if it does not:

- [Payment gateway accounts](/docs/settings/set-up-a-gateway) with your live gateway credentials.
  The `TestProcessor` gateway is only available in the sandbox environment.
- [Products and pricing plans](/docs/settings/products-and-pricing).
- [Organization and website information](/docs/settings/organizations-and-websites), including the billing descriptor and support contact details.
- [Hosted payment forms](/docs/settings/hosted-payment-forms), if you use them.
- [Webhooks](/docs/dev-docs/webhooks-configuration), if you use them.
- [Team members and their permissions](/docs/settings/users), if required.

## Step 3. Test in the live environment

Live transactions create real charges.
Plan your tests carefully and keep the amounts small.

1. Limit the payment gateway to one, or a small number of, test customer IDs.
  For more information, see [Set up a payment gateway - Configure additional filters](/docs/settings/set-up-a-gateway#configure-additional-filters).
2. Define a series of small-value test transactions for various scenarios, and test these using all enabled card types and payment methods.
3. Test the checkout flow on your website.
4. Subscribe to a plan and confirm that the card is charged immediately.
5. Cancel a subscription.
  For more information, see [Cancel a subscription](/docs/data-tables/manage-subscriptions#cancel-a-subscription).
6. Issue a partial and a full refund.
  For more information, see [Refund transactions](/docs/data-tables/manage-customer-payments-and-billing#refund-transactions).
7. Confirm that email notifications and webhooks are received.
8. Log in to your payment gateway account and confirm that the test transactions are present.
9. Remove the customer ID filter from the payment gateway.

If you use an embedded checkout page with a Rebilly API integration, you must use an SSL certificate.
If you use a Rebilly hosted payment form, you do not require an SSL certificate.
For more information, see [Hosted payment forms](/docs/settings/hosted-payment-forms).

## Related topics

- [Environments](/docs/tutorials/environments)
- [Test payment transactions](/docs/tutorials/test-transactions)
- [Test cards, IBANs, and ACH details](/docs/tutorials/test-payment-cards)
