Get Started
Accept your first payment
Create a test token, create a checkout session with the API, pay it on Monime's hosted page, and confirm the result — end to end in Test mode.
Take a test payment end to end: create a checkout session from your terminal, pay it on Monime's hosted checkout page, and confirm the result. Everything runs in Test mode, so no real money moves. Mark each step as done to keep your place.
Create a test access token
In the dashboard, open Developer → Access Tokens and click Create token. Turn Test Mode on: test tokens start with
mon_test_and only process simulated transactions.Copy the token straight away — it is shown only once. See Personal Access Tokens for every option.
Find your Space ID
Every request names the Space it acts on. Open Developer in the dashboard to see your Spaces and their Space IDs.
Save your credentials in your shell
The rest of this quickstart reads them from environment variables.
Terminal export MONIME_ACCESS_TOKEN="mon_test_..." # your test token export MONIME_SPACE_ID="spc-k6Em1Aap25VZ8oWg7ajhxHX3JqF" # your Space IDCreate a checkout session
Create a session for one line item. Amounts are in minor units, so
25000is SLE 250.00.Terminal curl https://api.monime.io/v1/checkout-sessions \ -H "Authorization: Bearer $MONIME_ACCESS_TOKEN" \ -H "Monime-Space-Id: $MONIME_SPACE_ID" \ -H "Idempotency-Key: first-payment-1" \ -H "Content-Type: application/json" \ -d '{ "name": "Order #1042", "successUrl": "https://example.com/checkout/success", "cancelUrl": "https://example.com/checkout/cancel", "lineItems": [{ "type": "custom", "name": "Event ticket", "quantity": 1, "price": { "currency": "SLE", "value": 25000 } }] }'The response includes the session
idand aredirectUrl— the Monime-hosted checkout page for this session. Keep both for the next steps. Hover over a field to see what it means.JSON { "success": true, "messages": [], "result": { "id": "cos-6gyBvKXqbTVUpqf2HNk9nm", "status": "pending", "name": "Order #1042", "orderNumber": "1042", "redirectUrl": "https://checkout.monime.io/cos-6gyBvKXqbTVUpqf2HNk9nm", "successUrl": "https://example.com/checkout/success", "cancelUrl": "https://example.com/checkout/cancel", "expireTime": "2026-09-30T13:30:00Z", "createTime": "2026-09-30T12:30:00Z" } }Pay on the hosted checkout page
Open the
redirectUrlin your browser and complete the payment on Monime's checkout page. With a test token, the transaction is simulated.When the customer finishes, Monime sends them to your
successUrl; if they cancel, to yourcancelUrl.Confirm the payment
Retrieve the session with the
idfrom step 4. A paid session has the statuscompleted.Terminal curl https://api.monime.io/v1/checkout-sessions/$SESSION_ID \ -H "Authorization: Bearer $MONIME_ACCESS_TOKEN" \ -H "Monime-Space-Id: $MONIME_SPACE_ID"In production, don't poll: subscribe to the
checkout_session.completedwebhook event instead. The webhooks getting-started guide walks through it.