# Go live: from sandbox to production Building with an AI agent? Start at https://docs.payme.io/agents.md ## Prerequisites - A PayMe account, or a registration at paid.co.il ## Related - [Authentication and environments](/payments/getting-started/authentication) - [Test Cards and Payment Methods](/payments/getting-started/test-cards-and-payment-methods) - [Quickstart](/payments/getting-started/quickstart) - [Callbacks](/payments/getting-started/callbacks) - [Errors](/payments/getting-started/errors) - [Idempotency and Retries](/payments/getting-started/idempotency-and-retries) - [Build your own checkout form with Hosted Fields](/accepting-payments/checkout-and-in-person/hosted-fields-jsapi-guide) - [Accept Apple Pay](/accepting-payments/payment-methods/apple-pay) - [Accept Google Pay](/accepting-payments/payment-methods/google-pay) - [Reconcile sales and withdrawals](/accepting-payments/reporting/reconcile-sales-and-withdrawals) This guide puts the launch steps in order: get the right credentials, open your sandbox account, test what you built, then switch to production with the checklist below. Each step links to the reference page with the details. ## Step 1: Know which credentials you need Which credential is which, who has it, where each one goes and where to find it in the dashboard: [The credentials at a glance](/payments/getting-started/authentication#the-credentials-at-a-glance) and [Getting credentials](/payments/getting-started/authentication#getting-credentials). Only the public key may appear in browser or mobile code. ## Step 2: Open your sandbox account Open your test account and find its keys as described on [Getting credentials](/payments/getting-started/authentication#getting-credentials). ## Step 3: Build and test in the sandbox Send every sandbox call to `https://sandbox.payme.io/api/` with your sandbox credentials. Before you go live, run every check in the [Quickstart](/payments/getting-started/quickstart) with your own code: create a sale, pay it, receive the callback, confirm the sale with `get-sales`, try a decline card and refund the sale. The callback URL must be a public address even in the sandbox: see [Callback URL rules](/payments/getting-started/callbacks#callback-url-rules). If your sales go through 3D Secure, test the challenge too: the cards and the rules that select a sale are on [3D Secure in the sandbox](/payments/getting-started/test-cards-and-payment-methods#3d-secure-in-the-sandbox). All test data, including the other decline cards, Apple Pay cards and bank accounts, is on [Test Cards and Payment Methods](/payments/getting-started/test-cards-and-payment-methods). ### What the sandbox doesn't cover - **Invoices and receipts:** the invoicing service doesn't run in the sandbox. Test documents on a small live sale that you refund straight away. - **Apple Pay on your own page:** ask PayMe which environment to test it in. See [Accept Apple Pay](/accepting-payments/payment-methods/apple-pay). ## Step 4: Go-live checklist Work through every item before your first live sale. ### Credentials and URLs - [ ] Every server call goes to `https://live.payme.io/api/`. - [ ] You use the production MPL and the production public key. Partners also use the production `payme_client_key` and client password. - [ ] Credentials come from your server's configuration, not from code: kept in a secrets manager, not a database column or a committed file. The MPL, `payme_client_key` and client password never reach the browser or a mobile app. - [ ] Saved-card tokens are encrypted at rest. - [ ] Your log pipeline is checked: no partner key, MPL, token or personal data in logs or error reports. A credential from the other environment fails: a sandbox MPL in production returns `251`, and a partner key from the other environment returns `200`. See [Errors](/payments/getting-started/errors). ### Browser code - [ ] The environment switch reads production, and `testMode` follows it: `PayMe.create(publicKey, { testMode: false })`, with the production public key. `testMode` is the only switch: load the same Hosted Fields script URL in both environments. See [Hosted Fields](/accepting-payments/checkout-and-in-person/hosted-fields-jsapi-guide). - [ ] With 3D Secure on Hosted Fields: `PayMe.clientData(false)`, or no argument. See [Add 3D Secure to Hosted Fields](/accepting-payments/3d-secure/3ds-with-hosted-fields). - [ ] With Google Pay on your own page: `PayMe.isGooglePayAvailable(false)`. - [ ] If your site sets a Content Security Policy, it allows the production hosts that the Hosted Fields, Apple Pay and Google Pay pages list, and the host of the 3D Secure `redirect_url` you receive (the same host you call: `live.payme.io` in production). See [Authentication and environments](/payments/getting-started/authentication#hosts-you-will-see-besides-the-api) and the [Build your own checkout form with Hosted Fields](/accepting-payments/checkout-and-in-person/hosted-fields-jsapi-guide#rules-that-cost-people-time). ### Test data - [ ] Test card numbers, test bank accounts and test seller values (such as `9999999999` and `random@paymeservice.com`) are gone from production code, configuration and forms. - [ ] Nothing from the sandbox, such as tokens or MPLs, is reused in production. ### Payment methods and services - [ ] Every payment method you offer is active on the production account. A seller installs Apple Pay, Google Pay or Bit from the production dashboard's app store. A partner calls `vas-enable` against `live.payme.io`. A missing service fails with error `720`. - [ ] 3D Secure, if you need it, is enabled on the production account. PayMe enables it, so confirm with PayMe before launch. Google Pay cards saved in the buyer's Google account always go through 3D Secure, and fail with error `21017` without the service. - [ ] **Apple Pay on your own page:** every domain that shows the button serves the **production** domain file, downloaded from `https://live.payme.io/.well-known/apple-developer-merchantid-domain-association`, and the domains are registered in production. The sandbox file is different, and a mismatch fails the call with error `703`. See [Host PayMe's domain file](/accepting-payments/payment-methods/apple-pay#step-1-host-paymes-domain-file). Apple Pay on PayMe's Hosted Payment Page needs no file. - [ ] **Google Pay on your own page:** your registration in the Google Pay & Wallet Console is complete, and PayMe Partners confirmed it. See [Accept Google Pay](/accepting-payments/payment-methods/google-pay). - [ ] The production account allows each currency you charge (error `252`) and the number of installments you offer. More than 12 installments must be enabled by PayMe. ### Amounts and commercials - [ ] No amount conversion outside the display layer, and bad amounts are rejected before they reach PayMe. - [ ] **Partner:** `market_fee` matches what sellers were told, and currencies are limited to what each seller has enabled (`seller_currencies`). - [ ] **Partner:** sellers can see their approval state and signup link. ### Callbacks - [ ] Every `generate-sale` sends `sale_callback_url`, and every subscription sends `sub_callback_url`, pointing at your production endpoint. A seller has no dashboard setting for a default. - [ ] The endpoint is public, on a real HTTPS origin (not a tunnel), and replies `200` within 5 seconds. - [ ] **Partner:** PayMe has set your production Default Callback URL, where seller callbacks arrive. - [ ] Partners verify `payme_signature` with the production `payme_client_key` and client password. - [ ] Your handler ignores repeats (`notify_type` + `payme_sale_id` + `payme_transaction_id`), is safe to run twice, and confirms the sale with `get-sales` before you fulfil an order. - [ ] A forged callback was seen doing nothing, on a test server of your own. - [ ] Callback lookups are rate-limited. - [ ] Alerts fire on runs of rejected or unconfirmed callbacks, and on handler errors. - [ ] Any local callback simulator or debug route is out of the build. - [ ] You don't allow-list callbacks by IP address: PayMe doesn't publish a fixed list. Details: [Callbacks](/payments/getting-started/callbacks). ### Retries, limits and monitoring - [ ] A timed-out call that moves money is checked with `get-sales` before it is retried. PayMe has no idempotency key. - [ ] HTTP 429 with error `998` is handled with backoff. Payment calls share a per-seller rate limit: see [Rate limits](/payments/getting-started/idempotency-and-retries#rate-limits). - [ ] A scheduled job reconciles your orders with `get-sales`, because a callback is dropped after 3 failed attempts. It runs in production, for sales and for active subscriptions, against PayMe's queries and not only your database: [Reconcile Sales and Withdrawals](/accepting-payments/reporting/reconcile-sales-and-withdrawals). - [ ] Someone watches authorizations approaching 7 days. - [ ] You log the `session` value of each response, and with every error, so you can quote it to PayMe. ### First live payment Run one real sale for a small amount with your own card, and refund it. Check that the callback arrived and that `get-sales` shows the sale. If PayMe issues invoices for your sales, check the document on this sale too. ## If a key leaks See [If a key leaks](/payments/getting-started/authentication#if-a-key-leaks). ## After launch - **A callback didn't arrive:** look the sale up with `get-sales`. By default it leaves out unpaid sales (status `initial`), so add `initial` to `sale_status` to see them. If your endpoint keeps failing or timing out, PayMe pauses deliveries to your host for a while; see [Retries](/payments/getting-started/callbacks#retries). - **An error you don't recognize:** look the code up on [Errors](/payments/getting-started/errors). - **Need help:** write to for integration questions and quote the `session` value. PayMe's [Status Page](https://status.payme.io/) shows incidents and maintenance. ## Partners If you are a platform or marketplace: - PayMe Partners issues your `payme_client_key` and client password. - Each of your sellers has its own MPL and public key in each environment. Production sellers are created with `create-seller` on `live.payme.io`, which returns their production MPL and public key. Sandbox seller values don't pass in production: a production seller needs real documents and a real review. - Create test sellers in the sandbox with the values on [Creating test sellers](/payments/getting-started/test-cards-and-payment-methods#creating-test-sellers-partners). The whole partner flow is on [Start here: build a platform or marketplace on PayMe](/marketplaces-and-platforms/start-here/how-platforms-work).