Skip to main content

Overview

The C2C Merchant API uses two credentials, issued together:
Both credentials are shown only once, when C2C issues them. C2C stores only a hash of your API key and cannot show it to you again. Store both immediately in a secret manager or environment variables, and never expose them in client-side code.

Getting your credentials

A C2C administrator issues API keys for your merchant account, and each key comes with its own signing secret. In the Merchant Portal you can see your keys (name, prefix, status, last used) and revoke a key, but you can’t create new ones there. Contact C2C to get a key or to rotate one.
  • You can hold more than one active API key (for example one per backend service). Each key has its own signing secret.
  • Idempotency keys are scoped to the API key that used them. Orders belong to your merchant account: any of your active keys can query their status, including orders created before a key rotation.
  • Regenerating your API key issues a new key and secret and revokes every previously active key on your account.
  • A revoked key stops working immediately.
What you can do in the Merchant Portal depends on your portal role. The account owner has full access. Team members only see the pages their role allows: API Keys to view or revoke keys, Settings to change the default callback URL, and Transactions for order history. The account owner manages roles in the portal.

Authentication method

Send your API key in the C2C-API-Key header:
Authorization: Bearer mk_live_... is still accepted for existing integrations. If a request carries both, C2C-API-Key is used.

Required headers

Deposit and withdrawal requests also carry a signature field in the JSON body. See the Signature Generation Guide. Status and balance requests need only the API key.

Example request

A successful call returns 200:
GET /api/merchant/orders/balance has no side effects, so it is a good way to test your API key. Test your signing code against the worked examples.

Storing credentials securely

1

Server-side only

Call the C2C API from your backend. Never ship the API key or signing secret to a browser or mobile app.
2

Use a secret manager in production

Azure Key Vault, AWS Secrets Manager or HashiCorp Vault, not plain configuration files.
3

Never log credentials

Mask the C2C-API-Key (or Authorization) header and never log the signing secret.
4

Separate keys per environment

Use different keys for development and production. Keys only work in the environment that issued them.
5

Rotate on exposure

If a key or secret may have leaked, contact C2C to revoke it and issue a replacement.

Account-level access controls

Besides the API key and signature, C2C applies these checks when you create an order. The Merchant API has no request rate limits.

Authentication errors

401 Unauthorized: API key

Returned when no API key is sent (neither C2C-API-Key nor Authorization: Bearer mk_...), the C2C-API-Key value isn’t an mk_ key, or the key is unknown or revoked. The response has an empty body.
Checklist
  1. The header is exactly C2C-API-Key: mk_live_..., with no quotes or extra spaces.
  2. The key belongs to the environment you are calling.
  3. The key has not been revoked or replaced by a regeneration.

401 Unauthorized: signature

Returned on order creation when the API key is valid but the body’s signature is missing, malformed, wrong or replayed. Unlike an API key failure, this response has a JSON body with a code:
See Signature error responses.

Next steps

Signature Generation Guide

Sign requests correctly

Create a deposit

Create your first order

Errors

Every error response the API returns

Quickstart

End-to-end integration