Sandbox
A test environment with no real money. Same endpoints, bodies and webhook events as live, under its own base URL and its own keys.
Base URL and keys
https://api.armhed.lat/sandboxPrefix any path with /sandbox: POST /sandbox/charges, GET /sandbox/balance, POST /sandbox/payouts. Sandbox keys start with sbx_; they do not work live and live keys do not work here. The test account starts with R$ 1.000,00 and copies your live fees.
Getting sandbox keys
Sandbox keys are managed with your dashboard session (the Authorization: Bearer token from logging in, plus X-Company-Id), on https://finance.armhed.lat:
GET /api/v1/company/sandboxPOST /api/v1/company/sandbox/activatePOST /api/v1/company/sandbox/rotate-keyPOST /api/v1/company/sandbox/topupPUT /api/v1/company/sandbox/webhookSimulating a payment
Sandbox QR codes are well-formed, but no bank can pay them. Decide the outcome yourself; the balance moves and the matching webhook event is sent exactly as in live.
/sandbox/charges/{id}/simulatepaidfailedrefundedcurl https://api.armhed.lat/sandbox/charges/6dcf2aee0d6148e1a12b78db78/simulate \
-u "$SBX_CLIENT_ID:$SBX_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "outcome": "paid" }'The response is the updated charge. Simulating from the wrong state (for example paying twice) returns 409 conflict. The route does not exist live.
Payouts in the sandbox
Payouts leave the test balance and are paid immediately with payout.paid. Any amount ending in 99 cents (for example 1099) is refused on purpose: the money returns to the balance and payout.failed is sent, so you can test that path.