Skip to content
Merxian

Core concepts

Accounts and environments

Your organization has two environments, sandbox and live. Each environment has its own account, its own data, and its own API keys.

On this page

Organizations and users#

An organization is your business on Merxian. Users sign in to the dashboard and belong to an organization. Each user has a role in the organization. You manage users and roles in the dashboard.

Accounts#

When you sign up, Merxian creates two accounts for your organization: one in sandbox and one in live. An account is the owner of every resource: transactions, payments, refunds, checkout sessions, payment links, products, prices, and customers.

An account ID starts with acct_, for example acct_5Rn8bQ2xW7mK4tLzP. It appears as accountId on API resources and as account_id in webhook events. The API never takes an account ID as input. The API key decides the account.

Sandbox and live#

Sandbox Live
Purpose Build and test your integration Take real payments
API key prefix mx_sandbox_ mx_live_
Money Test payment details only. No real money moves. Real payments and payouts
Base URL https://api.merxian.com https://api.merxian.com
Hosted checkout https://checkout.merxian.com/sandbox/… https://checkout.merxian.com/live/…
Webhook endpoint URL http is accepted Must use https and a public host

Both environments use the same base URL. The key selects the environment. No header, query parameter, or body field selects it.

Data does not cross environments#

The two environments are separate. Each has its own data, keys, webhook endpoints, and signing secrets.

  • An ID from one environment does not exist in the other. A live ID sent with a sandbox key returns 404.
  • Webhook events from sandbox go only to sandbox endpoints. Events from live go only to live endpoints.
  • Products and prices can be copied from sandbox to live in the dashboard. The copy gets new IDs in live. Customers, transactions, payments, and other records are never copied.

What to build#

  • Keep the sandbox key and the live key in separate configuration, for example one per deployment environment.
  • Store the environment with each ID that you save, or keep sandbox and live data in separate stores.
  • Configure a webhook endpoint in each environment. Each endpoint has its own signing secret.

Try refund, payment.succeeded,POST /v1/transactions, orIdempotency-Key.