If you do not yet have merchant credentials, register at business.papp.sa or email support@papp.sa to request sandbox access.
Prerequisites
- A Points merchant account (sandbox or production)
- A Private API key (see API keys)
- A terminal with
curl, or any HTTP client (Postman, Insomnia, your backend) - A test customer phone number in KSA format (e.g.
512345678)
Step 1 — Locate your API key
Sign in to the Points Business dashboard and open Settings → API Keys. Copy the Private key — you will send it in thex-api-key header on every request.
Step 2 — Confirm the base URL
All v1 endpoints live under:| Header | Value |
|---|---|
x-api-key | Your Private key |
Content-Type | application/json |
Accept | application/json |
Step 3 — Create an earning order
The simplest integration point: award points for a completed purchase.Step 4 — Read the response
A successful call returns the created order:uuid— the Points identifier. Store this on your side; you will use it for later operations (refund, cancel, lookup).order_status: "approved"— the earning order is settled and points are credited.total_points— the number of points awarded to the customer.type: 1— indicates an earning order (2= replacing / redeem checkout).
Step 5 — Verify in the dashboard
Open the Points Business dashboard → Orders. Your new order appears withreference_number matching the response above, and the customer balance has been credited.
That’s it — you just awarded points through the API.
What to build next
Set up webhooks
Receive real-time notifications when orders are approved, captured, cancelled, or refunded.
Full checkout flow
Let customers redeem points at your checkout, not just earn them.
Order lifecycle
Understand authorize → capture → refund and how each transition affects points.
API reference
Every endpoint, parameter, and response documented.
Troubleshooting
400 — API key is required
400 — API key is required
The
x-api-key header is missing. Confirm your HTTP client is attaching it. Header names are case-insensitive but must be spelled exactly x-api-key.400 — Invalid or inactive API key
400 — Invalid or inactive API key
The key you sent does not match any active merchant key. Regenerate from the dashboard or confirm you copied the Private key (not the Public key).
403 — Merchant is not allowed to create earning orders
403 — Merchant is not allowed to create earning orders
Your merchant account is not enabled for earn-only. Contact support@papp.sa to enable it.
422 — Validation error
422 — Validation error
One of the body fields failed validation. The response
message field names the first failing rule. Common causes: missing phone_number for earning orders, empty products array, non-numeric total_price.429 — Too many concurrent requests
429 — Too many concurrent requests
You sent another earning request for the same merchant before the previous one released its distributed lock. Retry after a short back-off; do not parallelise earning calls for the same merchant.

