Send the key
Use either header;Authorization is preferred:
mk_test_… for the sandbox and mk_live_… for production, and each works only in its own environment. A key prices the catalogue for your own account, so another partner can see a different group_price for the same product.
Scopes
A key without the scope an endpoint needs gets403 insufficient_scope, with error.details.required_scope. The check runs before the rate limit, so the refusal uses none of your budget. Retrying does not help: ask Mart to add the scope.
GET /account needs no scope. Each operation in the API reference names its scope in x-required-scope.
Keys made before scopes existed keep exactly their old access. On order writes they still get 422 orders_not_enabled, never a 403, and a card order without card payment gets 422 card_not_enabled. Where withdrawals are off, their money writes get 403 withdrawals_disabled.
Read what your account may do
CallGET /api/v1/account at startup instead of learning from refusals.
A closed account’s key can still read your money and ask to withdraw, but cannot change the payout method or place orders.
Keep the key safe
- Keep it in a secrets manager or a server-side environment variable.
- Never put it in client-side code, a mobile app, a repository or a URL.
- Call the API from your server only, never from a browser.
- If a key is exposed, tell Mart: Mart issues a replacement.
