Developers

Payment API

Take payments straight from your website — no backend required. Create a payment with your public key, then check its status with your secret key.

Base URL:https://api.paysouhoola.com/api/v1

Get your API keys

Every merchant has two keys, in Profile → API keys. The public key (pk_live_…) is safe to use in your website. The secret key (sk_live_…) must stay on your server and is shown only once.

Open your profile

Authentication

Pass your key as a Bearer token. The public key may only create payments; the secret key may only read them.

Authorization: Bearer pk_live_...   # create
Authorization: Bearer sk_live_...   # retrieve

Create a payment

POST/pay

Call this from your website with your public key. CORS is open, so it works from any origin. Rate limit: 60 requests per minute. It returns a hosted checkout URL — redirect your buyer there. The buyer’s name and email are saved as one of your customers.

Fields

FieldTypeDescription
amountrequirednumberAmount in major units (e.g. 49.90).
currencyrequiredstringISO-4217 currency code, e.g. AED.
descriptionrequiredstringWhat the payment is for.
namerequiredstringYour buyer’s name.
emailrequiredstringYour buyer’s email.

Body

{
  "amount": 49.90,
  "currency": "AED",
  "description": "Order #1024",
  "name": "Khaled Al Sabah",
  "email": "khaled@example.com"
}

cURL

curl -X POST 'https://api.paysouhoola.com/api/v1/pay' \
  -H 'Authorization: Bearer pk_live_...' \
  -H 'Content-Type: application/json' \
  -d '{
    "amount": 49.90,
    "currency": "AED",
    "description": "Order #1024",
    "name": "Khaled Al Sabah",
    "email": "khaled@example.com"
  }'

JavaScript (browser)

const res = await fetch('https://api.paysouhoola.com/api/v1/pay', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + PUBLIC_KEY, // pk_live_...
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    amount: 49.90,
    currency: 'AED',
    description: 'Order #1024',
    name: 'Khaled Al Sabah',
    email: 'khaled@example.com',
  }),
});
const { url } = await res.json();
window.location.href = url; // send the buyer to checkout

Response

{
  "reference": "cmsck9hj40007a0vqo70bqmie",
  "url": "https://checkout.stripe.com/c/pay/...",
  "status": "ACTIVE",
  "amount": 4990,
  "currency": "AED"
}

Retrieve a payment

GET/pay/:reference

Check a payment’s status with your secret key, using the reference returned by create.

cURL

curl 'https://api.paysouhoola.com/api/v1/pay/cmsck9hj40007a0vqo70bqmie' \
  -H 'Authorization: Bearer sk_live_...'

Response

{
  "reference": "cmsck9hj40007a0vqo70bqmie",
  "status": "PAID",
  "paid": true,
  "amount": 4990,
  "currency": "AED",
  "description": "Order #1024",
  "createdAt": "2026-07-21T00:00:00.000Z"
}

Good to know

  • Create is limited to 60 requests per minute per IP.
  • CORS is open on these endpoints — call them from the browser.
  • Never put your secret key in frontend code. If it leaks, roll it from your profile.
  • Amounts are in major units (e.g. 49.90), minimum 0.5. Currency is the ISO-4217 code, e.g. AED.