Skip to content
شعار البي شعار البي El-BDevelopers

Getting started

Quickstart

From your key to a payment link, a signed webhook and a confirmed transfer.

  1. Get your API key

    Your account must be verified by an official document. In the El-B app, open API and generate your key. It starts with elb_sk_ and is shown once: keep it on your server, never in code that runs in a browser or a mobile app.

  2. Check the key

    Read your account: your credits and the limits that apply to you.

    curl https://el-b.com/api/v1/account \
      -H "Authorization: Bearer $ELB_API_KEY"
  3. Create a payment

    Seal what you deliver and where. The answer holds url: send it to the sender, on the platform where you negotiated.

    curl -X POST "https://el-b.com/api/v1/payments" \
      -H "Authorization: Bearer $ELB_API_KEY" \
      -H "Accept: application/json" \
      -H "Content-Type: application/json" \
      -d '{
        "amount_dzd": 45000,
        "deliverable": "iPhone 13, 128 GB, used",
        "fulfillment_target": "Hand delivery in Bab Ezzouar, Algiers",
        "platform": "Facebook Marketplace",
        "recipient_handle": "Phone Store DZ",
        "label": "Order #1042",
        "join_mode": "verified"
    }'
  4. Hear back with a webhook

    Register an endpoint for the events you need. payment.reference_submitted tells you the transaction number is in.

    curl -X POST "https://el-b.com/api/v1/webhooks" \
      -H "Authorization: Bearer $ELB_API_KEY" \
      -H "Accept: application/json" \
      -H "Content-Type: application/json" \
      -d '{
        "url": "https://shop.example.com/elb/webhooks",
        "events": [
            "payment.reference_submitted",
            "payment.finalized"
        ]
    }'
  5. Confirm the transfer

    Once you see the transfer in your BaridiMob history, confirm it. The payment is complete and its receipt is issued.

    curl -X POST "https://el-b.com/api/v1/payments/Kx7pR2mQ9a/confirm" \
      -H "Authorization: Bearer $ELB_API_KEY" \
      -H "Accept: application/json"

Next: verify each delivery's signature before trusting it.