# Go-live checklist

How activation will open live payments, what to prepare, and what to check before you switch from test keys to live keys.

Today every AdProMaxPay account works in the sandbox. Live payments open with **activation**, which is
coming: you tell us about your business, we check it, and your account becomes active. This page says
how activation will work and what to prepare, and lists what to check in your integration, so that
going live is a change of keys, not of code.

That works because test mode and live mode run the same code: see
[Sandbox and live: the differences](https://pay-docs.adpromax.com/en/sandbox/differences).

## How activation works

Your account's `activation_status`, in [`GET /v1/account`](https://pay-docs.adpromax.com/en/get-started/api-keys), says where it
stands. It is `sandbox` until you ask for activation.

The activation of an account:

- `sandbox` → `submitted`: you submit
- `submitted` → `under_review`
- `under_review` → `information_requested`
- `information_requested` → `under_review`
- `under_review` → `partner_review`: approved by us
- `partner_review` → `active`: approved by our partner
- `under_review` → `rejected`: refused
- `partner_review` → `rejected`

1. **You submit** your business details and documents in the dashboard.
2. **Our team reviews them.** If something is missing or unclear, we ask for more information, with
   a deadline, and show the reason next to each field concerned. Your answer sends the file back to
   review.
3. **Our licensed payment partner**, which holds the funds, then approves your business in turn. The
   dashboard shows how long this usually takes.
4. **Your account is `active`**: live keys work, and live payments are real.

Card payments and cash payments are enabled separately. `GET /v1/account` shows each one in
`capabilities.card_payments` and `capabilities.cash_payments`: `inactive`, `pending` or `active`.

If activation is refused, you get the reason, and your organization stays in the sandbox: your test
keys and your test data keep working. Later, an active account can become `restricted`, with payments
or payouts paused, while a hold is reviewed.

## What to prepare

The list below is being confirmed and may change. Gathering it early saves time.

* **Your business**: legal form, legal name, commercial register (RC) number and city, ICE (15
  digits), tax identifier (IF), business tax registration, address, activity, and your website or
  social media profile. Self-employed (*auto-entrepreneur*): your registration card instead of the
  RC.
* **Its people**: the legal representative and the beneficial owners, with their name, ID and share.
* **Its bank account**: the RIB (24 digits) and the bank's certificate.
* **Documents**: articles of association, IDs, proof of address.
* **Public details**: the name on your customers' statements, a support email and phone, your logo.
* **Your team's sign-in**: a verified email, and two-step verification for each person who will
  work in live mode (see [Security](https://pay-docs.adpromax.com/en/account/security)).

## Check your integration

Go through this list before you switch. Each line links to the page that explains it.

1. **A live webhook endpoint.** Endpoints belong to one mode: create one for live mode, store its own
   secret, verify each delivery's [signature](https://pay-docs.adpromax.com/en/webhooks/signatures), handle a delivery that comes
   twice, and answer `2xx` quickly ([Retries, ordering and deduplication](https://pay-docs.adpromax.com/en/webhooks/retries)).
2. **Deliver on the right signal**: `payment_intent.succeeded`, or the payment intent's status read
   with your secret key; never the return to your `success_url`
   ([How payments work](https://pay-docs.adpromax.com/en/payments/how-payments-work#redirects-and-webhooks-which-one-to-trust)).
3. **Idempotency**: an `Idempotency-Key` on every request that moves money, kept across retries
   ([Idempotency](https://pay-docs.adpromax.com/en/api-reference/idempotency)).
4. **Errors**: your code branches on `code`, never on `message`, and logs `request_id`
   ([Handling errors](https://pay-docs.adpromax.com/en/errors)).
5. **Keys**: secret keys on your server only, read from its environment or a secret store
   ([Security](https://pay-docs.adpromax.com/en/account/security)).
6. **Limits**: your code handles `429` and `Retry-After`; ask for a higher limit before a campaign
   ([Rate limits](https://pay-docs.adpromax.com/en/api-reference/rate-limits)).
7. **Cash**: you show the voucher's `amount_to_pay` and deadline as given, handle expired codes, and
   respect the 100.00 MAD minimum ([Cash payments](https://pay-docs.adpromax.com/en/payments/cash-payments)).
8. **Refunds**: only card payments are refunded, and in live mode a refund can take longer to
   complete; your customers know your policy for cash payments before they pay
   ([Refunds](https://pay-docs.adpromax.com/en/payments/refunds)).
9. **Branding**: your logo, display name and support contact on the payment pages, under
   **Settings → Branding**.
10. **Team**: each person has the role they need, and everyone uses two-step verification
    ([Team and roles](https://pay-docs.adpromax.com/en/account/team-and-roles)).
11. **Every scenario** of [Test your integration](https://pay-docs.adpromax.com/en/get-started/test-your-integration) passes.

## Switch to live

Once your account is active:

1. Switch the dashboard to live mode, and create your live keys under **Developers → API keys**. A
   live secret key (`apx_sk_live_…`) is shown once, when it is created: store it then.
2. Put the live keys in your production configuration only. Your development and test machines keep
   their test keys.
3. Create your live webhook endpoint, and store its secret.
4. Create your customers and payment links again in live mode: test objects stay in test mode.
5. Read [Sandbox and live: the differences](https://pay-docs.adpromax.com/en/sandbox/differences) once more: in live mode the card
   page is the secure page of our card partner, 3-D Secure comes from your customer's bank, cash
   codes are checked every 2 minutes, funds become available after the holding period set at
   activation, and refunds can stay `pending` for longer.
6. Make a first small real payment, and follow it through to its webhook.

## What is coming

Activation will bring, without dates yet:

* activation in the dashboard: your details, your documents and the review's progress;
* live keys and live mode;
* two-step verification required for live mode, and asked again for sensitive actions such as
  creating a live key or changing your team;
* payouts to your bank account, with their reports;
* the holding period for your live balance;
* fees and invoices.

We will announce each one in the [changelog](https://pay-docs.adpromax.com/en/changelog).
