SANDBOX
Your first connection.
Full engineering walkthrough for Sandbox: register an application, then integrate with the SDK or Hosted API — manually or with an AI prompt. Already registered? Developers → Integration guide is the shorter in-dashboard path with your credentials.
1. Register a Sandbox application
Open Developers, choose Sandbox, and register your website and callback URLs. For the starter, use:
After registration, generate your API key. If you build manually, register the exact localhost (or tunnel) URLs your app will use instead.
2. Choose how to set up
Wire Connect into your product manually, or hand an AI assistant the integration prompt. The Next.js starter is optional if you want a local demo first.
Manual setup with the SDK
Build Connect into your own app. Install buymeamalt, wire handlers to your Sandbox credentials, then connect a signed-in user. Prefer the Hosted HTTP API if you are not on Node.js.
Supply your application ID, API key, BMM origin and callback URL. Derive getUserId from your signed-in server session. BMM stores connections, so you do not need token storage or refresh logic.
Connect your user
Bind the SDK to your authenticated server session. BMM handles sign-in, account creation and consent, then returns to your registered callback.
For Next.js, first configure the server module and route handlers in the Next.js integration guide, then use this form. Other Node.js frameworks can use the core SDK.
Display the support button
Read the connection on your server. Use the returned support_url unchanged, including its attribution, and open it in a new tab.
If getConnection() returns null, show Connect BMM. If only support_url is null, keep the profile visible and omit the support button.
Read earnings with permission
Only call getEarnings() when earnings_shared is true. Hide earnings on a 403 while keeping the profile available.
Label these settled earnings from this application, after fees and refunds. They are not a withdrawable balance. Format integer minor units and keep currencies separate. Use the formatting example.
Allow users to disconnect
After confirmation, submit a POST to your disconnect handler. Show a success toast only after the server confirms disconnection. Include a manage connections link to BMM’s Share → Connected apps.
Test before inviting users
Check account binding, denied consent, optional earnings and revocation. Follow the security and testing checklist.
Ready for your live website?
Keep this Sandbox app for testing. Production uses a separate Live application, HTTPS callbacks and your real user sessions.
Set up production →