NewDash Dots are hereMini apps in Dash, with payments built inLearn more

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.

0 of 6 steps complete
  1. 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.

  2. 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.

  3. 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 ID
  4. Create a checkout session

    Create a session for one line item. Amounts are in minor units, so 25000 is 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 id and a redirectUrl — 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"
      }
    }
  5. Pay on the hosted checkout page

    Open the redirectUrl in 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 your cancelUrl.

  6. Confirm the payment

    Retrieve the session with the id from step 4. A paid session has the status completed.

    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.completed webhook event instead. The webhooks getting-started guide walks through it.

Next steps

On this page