Prerequisites
- A Moflay account and organization
- A sandbox API key
- Node.js or Bun if you want to use the SDK
Step 1: Install the SDK
Step 2: Store your API key
Step 3: Send a sandbox payment
Step 4: Check the result
You should receive a response that includes fields like:transactionIdstatusamountcustomerIdwhen a customer record is created or matched
- Open the Moflay dashboard.
- Go to the Transactions page.
- Confirm that the payment appears in the sandbox environment.
Verify the result
Your setup is working if all of the following are true:- The API call returns a valid payment response
- The transaction appears in the dashboard
- The environment is
sandbox
Troubleshooting
- The API returns
missing_api_key: Make sure you setAuthorization: Bearer YOUR_API_KEYor loadedMOFLAY_API_KEYcorrectly. - The API returns
invalid_api_key: Check that the key is active and belongs to the same environment you are testing. - The payment does not appear in the dashboard: Confirm you are viewing the sandbox environment, not production.