Testnet

Test integrations with test API keys and test networks.

Testnet uses the same public API host and request formats as mainnet integrations. Testnet is a business mode, not a separate deployment host.

Use https://api.stafiel.com for both mainnet and testnet requests. The request mode is selected by the matching API key, X-App-Client header, Merchant ID, and mode-scoped merchant data.

Keep the endpoint path and request body shape the same as the corresponding API reference.

Authenticated Merchant API Request Parameters

The following headers apply to authenticated merchant API requests:

Field Required Default Description
X-API-Key Yes None Use a test API key, for example mk_test_your_api_key.
X-App-Client Yes None Use merchant-client-testnet.
Content-Type Required for JSON requests None Use application/json when sending a JSON request body.

merchant-client-testnet tells Stafiel that the request belongs to testnet. It must be used with mk_test_ keys. A test key with merchant-client, or a live key with merchant-client-testnet, is rejected with 401 AUTH_FAILED.

Data Isolation

Testnet and live data are separate. Keep testnet activity isolated from live customer payments, accounting, reconciliation, webhook handling, and operational records in your own system.

Do not treat a successful testnet payment as a real customer payment.

Use the testnet chain and token options listed in Supported Assets and Networks and enabled for your Merchant Dashboard account. For the complete mainnet and testnet isolation rules, see Mainnet vs Testnet.

Webhooks

Use separate webhook configuration for testnet. Treat testnet event IDs, signing secrets, and delivery logs as separate from live deliveries.

Go-Live Checklist

Before going live, replace:

  • Merchant ID: use your live merchant ID in API requests.
  • API key: use a live API key with the mk_live_ prefix.
  • X-App-Client: change merchant-client-testnet to merchant-client.
  • Chain labels: switch from testnet labels to mainnet chain labels.
  • Webhook configuration: use the live webhook endpoint and signing secret.