Sandbox. Test keys, Arc testnet and test USDC. No real money moves here.

Get started

Quickstart

Take your first payment in the sandbox. You need a SaphraONE Business account and a terminal. No real money is involved.

  1. Open the sandbox console and sign in

    Go to the sandbox console and sign in with your SaphraONE account (email, Google or a wallet). The API is for Business accounts; if yours is personal, upgrade it to Business in Settings first.

  2. Create a test secret key

    In API keys, name the key after your site and select Create key. Copy the sk_test_… key straight away: it is shown once. Keep it in an environment variable on your server.

    .env
    export SAPHRA_SECRET_KEY=sk_test_…
  3. Create a checkout session

    Call the API from your server or terminal. success_url is where the buyer lands after paying; {CHECKOUT_SESSION_ID} is replaced with the session id.

    curl https://sandbox.api.saphra.one/v1/checkout/sessions \
      -H "Authorization: Bearer sk_test_…" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: order-1042" \
      -d '{
        "amount": "25.00",
        "currency": "USDC",
        "description": "Order #1042",
        "client_reference_id": "1042",
        "success_url": "https://shop.example/thanks?session_id={CHECKOUT_SESSION_ID}",
        "cancel_url": "https://shop.example/cart"
      }'
  4. Open the url and pay

    The response is a checkout session. Open its url in a browser and pay with an Arc testnet wallet or a sandbox SaphraONE account. Get free test USDC from the Circle faucet (choose Arc Testnet).

  5. Confirm the payment

    Retrieve the session. Once the payment is in, it is complete:

    curl https://sandbox.api.saphra.one/v1/checkout/sessions/cs_test_… \
      -H "Authorization: Bearer $SAPHRA_SECRET_KEY"
    {
      "id": "cs_test_…",
      "object": "checkout.session",
      "status": "complete",
      "payment_status": "paid",
      "amount": "25",
      "amount_received": "25",
      ...
    }