Accept local payment methods in Pakistan, India, UAE, and Bangladesh. JazzCash, Easypaisa, NayaPay, SadaPay, UPI, bKash and more.
The Local Payments API is a completely separate API system from the main ReyPub payment APIs. It enables businesses to accept local payment methods in Pakistan, India, UAE, and Bangladesh.
X-LP-Key and X-LP-Secret headersAccept payments in one country
Accept payments in all supported countries
Currency: PKR
Currency: INR
Currency: AED
Currency: BDT
Business subscribes to a Local Payments package ($50 single / $150 all countries)
Business enables payment methods (JazzCash, bank, etc.) they want to accept
System Admin configures the actual payment account details (numbers, bank info)
Customer sees payment methods at checkout, pays to the shown details
Customer enters the transaction/reference ID from their payment app
System Admin verifies the payment reference and approves/rejects it
Approved payment is auto-credited to merchant balance (minus 1% fee)
Pending Admin Setup| Field | Type | Required | Description |
|---|---|---|---|
package_slug | string | Yes | "single-country" or "all-countries" |
countries | array | For single | Array of country codes, e.g. ["PK"] |
{
"package_slug": "single-country",
"countries": ["PK"]
}
{
"success": true,
"data": {
"subscription_id": 1,
"package": "Single Country",
"countries": ["PK"],
"api_key": "lp_pk_...",
"api_secret": "lp_sk_...",
"settlement_fee": "1%",
"price_charged": 50,
"warning": "IMPORTANT: Save your API secret now."
}
}
?country=PK filter. Returns gateways with their setup status.Pending Admin Setup state.| Field | Type | Required | Description |
|---|---|---|---|
country | string | Yes | Country code: PK, IN, AE, BD (must be in your subscription) |
method_type | string | Yes | e.g. jazzcash, easypaisa, bank_pk, upi, bkash |
{
"country": "PK",
"method_type": "jazzcash"
}
{
"success": true,
"message": "JazzCash enabled! Admin will set up the payment details. You will be notified once it is active."
}
{
"success": true,
"data": { "is_active": 1 },
"message": "Gateway enabled"
}
?status=submitted, ?country=PK{
"success": true,
"data": {
"api_key": "lp_pk_new_key...",
"api_secret": "lp_sk_new_secret...",
"warning": "IMPORTANT: Save your new API secret now. It will NOT be shown again. Old keys are now invalid."
},
"message": "API keys regenerated"
}
X-LP-Key: lp_pk_your_keyX-LP-Secret: lp_sk_your_secret
Every checkout API call requires the X-LP-Key and X-LP-Secret headers. These are generated when you subscribe to Local Payments.
?country=PK filter. Returns account details for each method.{
"success": true,
"data": {
"business_name": "MyShop",
"countries": [
{
"country_code": "PK",
"country_name": "Pakistan",
"currency": "PKR",
"methods": [
{
"id": 1,
"method_type": "jazzcash",
"method_name": "JazzCash",
"account_title": "Ali Ahmed",
"account_number": "03001234567",
"instructions": "Send to this JazzCash number"
},
{
"id": 2,
"method_type": "easypaisa",
"method_name": "Easypaisa",
"account_title": "Ali Ahmed",
"account_number": "03451234567"
}
]
}
]
}
}
| Field | Type | Required | Description |
|---|---|---|---|
gateway_id | integer | Yes | The payment method ID from /checkout/methods |
amount | number | Yes | Amount paid in local currency |
reference_id | string | Yes | Transaction ID / Reference number from payment app |
order_id | string | No | Your order/invoice ID |
customer_name | string | No | Customer name |
customer_email | string | No | Customer email |
customer_phone | string | No | Customer phone |
{
"gateway_id": 1,
"amount": 5000,
"reference_id": "TXN123456789",
"order_id": "ORD-001",
"customer_name": "Muhammad Bilal",
"customer_phone": "+923001234567"
}
{
"success": true,
"data": {
"transaction_id": "lp_abc123...",
"status": "submitted",
"amount": 5000,
"currency": "PKR",
"method": "JazzCash",
"reference_id": "TXN123456789",
"message": "Payment submitted for verification."
}
}
| Status | Description |
|---|---|
pending | Payment created, awaiting customer action |
submitted | Customer submitted transaction ID, awaiting verification |
approved | Payment verified and approved, funds credited |
rejected | Payment rejected (invalid reference, etc.) |
expired | Payment expired without submission |
Admin endpoints for managing the Local Payments system. All require admin Bearer token authentication.
Default gateways are template gateways that get copied to new business subscriptions. Set your own JazzCash, bank details here and they will be the default for all new businesses.
?country=PK filter.All local payment transactions must be approved or rejected by Admin. This is the only way to process transactions - businesses cannot approve/reject.
?status=submitted, supports pagination.{
"action": "approve", // or "reject"
"admin_note": "Verified via JazzCash app - TXN confirmed"
}
// Subscribe for Pakistan only ($50)
const response = await fetch('/api/local-payments/subscribe', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_BUSINESS_TOKEN'
},
body: JSON.stringify({
package_slug: 'single-country',
countries: ['PK']
})
});
const data = await response.json();
// Save data.data.api_key and data.data.api_secret!
// Business enables the method - Admin will configure the account details
await fetch('/api/local-payments/gateways/enable', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_BUSINESS_TOKEN'
},
body: JSON.stringify({
country: 'PK',
method_type: 'jazzcash'
})
});
// Response: "JazzCash enabled! Admin will set up the payment details."
// Wait for Admin to configure details before gateway goes live
// Step 1: Get payment methods
const methods = await fetch('/api/local-payments/checkout/methods?country=PK', {
headers: {
'X-LP-Key': 'lp_pk_...',
'X-LP-Secret': 'lp_sk_...'
}
});
// Step 2: Show payment details to customer
// Customer pays to the shown JazzCash/Bank details
// Step 3: Customer submits transaction ID
const payment = await fetch('/api/local-payments/checkout/pay', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-LP-Key': 'lp_pk_...',
'X-LP-Secret': 'lp_sk_...'
},
body: JSON.stringify({
gateway_id: 1,
amount: 5000,
reference_id: 'TXN123456789',
order_id: 'ORD-001',
customer_name: 'Muhammad Bilal'
})
});
// Step 4: Check status
const status = await fetch(
'/api/local-payments/checkout/status/' + payment.data.transaction_id,
{ headers: { 'X-LP-Key': 'lp_pk_...', 'X-LP-Secret': 'lp_sk_...' } }
);
// NOTE: Only Admin can approve/reject transactions
// Businesses can only VIEW their transactions
await fetch('/api/local-payments/admin/transactions/1/process', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ADMIN_TOKEN'
},
body: JSON.stringify({
action: 'approve',
admin_note: 'Verified via JazzCash app - TXN confirmed'
})
});
// On approval: amount minus 1% fee auto-credited to business balance
const response = await fetch('/api/local-payments/regenerate-keys', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_BUSINESS_TOKEN'
}
});
const data = await response.json();
// SAVE the new api_key and api_secret immediately!
// Old keys are now invalid
Call GET /checkout/methods to show available payment options
Customer chooses JazzCash, bank, etc. Show account details
Customer sends money to the displayed account via their app
Customer enters the Transaction ID / Reference from their payment
Call POST /checkout/pay with gateway_id, amount, reference_id
Call GET /checkout/status/:id to check if approved