6MM Agent SDK

View as Markdown

The 6MM Agent SDK is for partner backend services that need to call privileged Agent APIs without implementing signing and request handling from scratch. It must not run in browser, mobile, or public desktop code because the integration uses a partner API secret.

When to use the Agent SDK

Use an Agent SDK when your backend needs to bind a partner user, move assets through an approved workflow, query trading records, create an embedded trading entry URL, or verify webhook notifications. Use the Trading Widget SDK separately when the partner frontend needs to display the trading interface.

Capabilities

ScenarioJava SDKPHP SDK
Bind userSupportedSupported
Fixed amount transferSupportedSupported
Transfer all outSupportedSupported
Reverse transferSupportedSupported
Query ordersSupportedSupported
Create entry URLSupportedSupported
Webhook verificationSupportedSupported

Common configuration

KeyExampleDescription
baseUrlhttps://agent-api.6mm.com6MM Agent API service URL without trailing slash.
agentCodeAGENT001Partner agent code.
apiSecretyour-api-secretAPI signing secret stored only on the backend.
defaultCurrencyUSDTDefault currency for transfer and account APIs.
webhookUrlhttps://partner.example.com/6mm/webhookPartner endpoint for 6MM webhook notifications.

Typical integration flow

  1. The partner frontend authenticates the user through the partner’s own account system.
  2. The partner backend maps the user to a stable partner-side identifier.
  3. The backend calls the Agent SDK with agentCode and the protected API secret.
  4. The SDK signs and sends the Agent API request.
  5. The backend stores the returned business identifier and processes later webhooks idempotently.
  6. The frontend receives only the short-lived result or entry credential it needs.

Choose an SDK

Production checklist

  • Load apiSecret from a backend secret manager, not source code.
  • Keep development, staging, and production credentials separate.
  • Use a stable partner user mapping and unique business order identifiers.
  • Preserve the original identifier when checking the status of a timed-out request.
  • Verify webhook signatures and store processed event IDs.
  • Redact secrets and signatures from logs while retaining request IDs for support.

Next steps