Skip to content

Quickstart

Five minutes is all it takes to accept a first payment.

  1. Create your account and connect your aggregator.

    Create an account, then in Gateways, add your aggregator’s API keys. Cartflox checks the keys with the provider before saving them. In Payment methods, enable the operators your customers will be able to use.

  2. Get your API keys.

    In API and Logs, you will find your public key af_live_pub_... and your secret key af_live_sec_.... The secret key authenticates your server-side calls: never put it in a web page or a mobile app.

  3. Create a payment session.

    curl
    curl -X POST https://cartflox.com/api/v1/checkout/sessions \
    -H "Authorization: Bearer af_live_sec_YOUR_KEY" \
    -H "Content-Type: application/json" \
    -H "Idempotency-Key: order-1042" \
    -d '{
    "amount": 5000,
    "currency": "XOF",
    "customer_name": "Awa Koné",
    "customer_email": "awa@example.com",
    "customer_phone": "+2250700000000",
    "description": "Order #1042",
    "success_url": "https://maboutique.com/merci",
    "cancel_url": "https://maboutique.com/panier",
    "metadata": { "order_id": "1042" }
    }'

    The response contains the address of the payment page: redirect your customer there.

    Response 201
    {
    "id": "cmf3k2p1x0001abcd9e8f7g6h",
    "object": "checkout.session",
    "url": "https://checkout.cartflox.com/cmf3k2p1x0001abcd9e8f7g6h",
    "order_id": "CS-MF3K2A-9X1QZ",
    "amount": 5000,
    "currency": "XOF",
    "status": "pending",
    "created": "2026-09-02T10:15:00.000Z"
    }
  4. Receive the confirmation.

    Enter your server’s URL in API and Logs, or through the API (see Webhooks). As soon as the payment succeeds, Cartflox sends the signed payment.completed event. You can also check the session status at any time.

  5. Go live.

    Replace your gateway’s sandbox keys with its production keys. Complete your identity verification: it is mandatory for a payment platform.