SohojXPay
Developer integration

Build reliable service flows with one concise API guide.

Create recharge, Drive, bill, and MFS requests with examples that match the current SohojxPay API.

REST and JSONService API keySafe simulations

Start here

One key. Predictable JSON.

Send your service API key in a request header. Create operations require the matching Recharge, Bills, or MFS permission and an approved KYC profile.

Base URL
https://sohojxpay.com
Authentication header
x-service-api-key: usk_live_demo_not_a_real_key

Keep the key private

Use service API keys only from your backend. Never place a live key in browser or mobile application code.

Manage API keys
01

Mobile recharge

Recharge

Create prepaid, postpaid, or Skitto recharge requests and follow their current status.

Submit a recharge and hold the calculated service amount from the API-key owner’s balance.

POST/api/v1/recharge/requestService API keyRecharge permission

Operator codes

GPGrameenphoneRBRobiATAirtelBLBanglalinkTTTeletalkSKSkitto

Recharge types

prepaidPrepaid SIMpostpaidPostpaid SIMskittoSkitto SIM

Parameters

FieldLocationTypeRequiredAccepted / exampleDescription
numberbodystringYes0171234567811-digit Bangladesh mobile number beginning with 01.
typebodystringYesprepaid, postpaid, skittoThe SIM account type.
operatorbodystringYesGP, RB, AT, BL, TT, SKTwo-letter mobile operator code.
tran_idbodystringYesRCH-DEMO-10001Unique customer reference, 5–50 characters.
amountbodynumberYes100Positive recharge amount in BDT. Sent as a string.
package_idbodystringNo—Optional regular-offer package identifier.
package_namebodystringNo—Optional package label, maximum 100 characters.

Safe playground

Try a simulated request

Runs entirely in your browser. No API call or transaction is created.

Mock only
Required
Required
Required
Required
Required
Optional
Optional
Request body · application/json
{
  "number": "01712345678",
  "type": "prepaid",
  "operator": "GP",
  "tran_id": "RCH-DEMO-10001",
  "amount": "100"
}
Simulated response
{
  "success": true,
  "status": "PENDING",
  "message": "Recharge request queued successfully",
  "data": {
    "transaction_id": "8c2133a5-54e2-4b7d-9bd1-22c8af7fa101",
    "tran_id": "RCH-DEMO-10001",
    "number": "01712345678",
    "operator": "GP",
    "type": "prepaid",
    "amount": "100",
    "final_amount": "98.00",
    "commission": 2,
    "charge": 0,
    "status": "PENDING",
    "recharge_processor": "system",
    "queued_at": "2026-01-15T10:30:00.000Z",
    "processor_check_count": 0,
    "processor_last_error": null,
    "balance_held": true
  }
}

Code examples

Node.js
const response = await fetch('https://sohojxpay.com/api/v1/recharge/request', {
  method: 'POST',
  headers: {
    "Content-Type": "application/json",
    "x-service-api-key": "usk_live_demo_not_a_real_key"
  },
  body: JSON.stringify({
    "number": "01712345678",
    "type": "prepaid",
    "operator": "GP",
    "tran_id": "RCH-DEMO-10001",
    "amount": "100"
  }),
});

const data = await response.json();
if (!response.ok) throw new Error(data.message || 'Request failed');
console.log(data);
02

Special packages

Drive packages

Browse active Drive packages, submit a purchase request, and check its processing status.

List active Drive packages. Operator and package-type filters are optional.

GET/api/user/offers?offer_type=drive&operator=GP&package_type=mbPublic

Operator codes

GPGrameenphoneRBRobiATAirtelBLBanglalinkTTTeletalkSKSkitto

Package types

mbInternetminuteMinutescomboCombosmsSMS

Parameters

FieldLocationTypeRequiredAccepted / exampleDescription
operatorquerystringNoGP, RB, AT, BL, TT, SKOptional operator filter.
package_typequerystringNomb, minute, combo, smsOptional package category.

Safe playground

Try a simulated request

Runs entirely in your browser. No API call or transaction is created.

Mock only
Optional
Optional
Resolved request
{
  "url": "https://sohojxpay.com/api/user/offers?offer_type=drive&operator=GP&package_type=mb"
}
Simulated response
{
  "success": true,
  "data": {
    "offerType": "drive",
    "offers": [
      {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "operator": "GP",
        "packageType": "mb",
        "name": "1 GB Internet — 7 Days",
        "description": "1 GB internet package valid for 7 days",
        "regularPrice": 129,
        "price": 99,
        "validity": "7 days",
        "dataAmount": "1GB",
        "minutes": null,
        "sms": null,
        "offerLocationId": null,
        "offerLocation": null,
        "source": "database"
      }
    ],
    "pagination": {
      "page": 1,
      "perPage": 50,
      "total": 1,
      "totalPages": 1
    }
  }
}

Code examples

Node.js
const response = await fetch('https://sohojxpay.com/api/user/offers?offer_type=drive&operator=GP&package_type=mb', {
  method: 'GET',
  headers: {
    "Content-Type": "application/json"
  },
});

const data = await response.json();
if (!response.ok) throw new Error(data.message || 'Request failed');
console.log(data);
03

Utility payments

Bills

Create electricity, gas, or water bill requests and check them with your transaction ID.

Submit a bill payment and hold the calculated service amount from the customer balance.

POST/api/v1/billsService API keyBills permission

Bill types

electricityElectricity billgasGas billwaterWater bill

Biller codes

descoDESCOnescoNESCOdpdcDPDCbrebBREBwzpdclWZPDCLtitas_gas_meteredTitas Gas (Metered)titas_gas_non_meteredTitas Gas (Non-metered)karnaphuli_gasKarnaphuli Gasjalalabad_gasJalalabad Gassundarban_gasSundarban GasdwasaDWASAcwasaCWASArwasaRWASA

Meter types

prepaidPrepaid electricity meterpostpaidPostpaid electricity meter

Parameters

FieldLocationTypeRequiredAccepted / exampleDescription
bill_typebodystringYeselectricity, gas, waterUtility category.
biller_codebodystringYesdesco, nesco, dpdc, breb, wzpdcl, titas_gas_metered, titas_gas_non_metered, karnaphuli_gas, jalalabad_gas, sundarban_gas, dwasa, cwasa, rwasaProvider code matching the selected bill type.
meter_typebodystringElectricity onlyprepaid, postpaidRequired for electricity bills.
account_numberbodystringYes12345678901Customer account or meter number, at least 3 characters.
contact_numberbodystringRequired for electricity0171234567811-digit contact number for electricity bills.
bill_numberbodystringNo—Optional bill reference, maximum 50 characters.
amountbodynumberYes500Positive bill amount in BDT. Sent as a string.
notebodystringNo—Optional note, maximum 255 characters.
tran_idbodystringYesBILL-DEMO-10001Unique customer reference, 5–50 characters.

Safe playground

Try a simulated request

Runs entirely in your browser. No API call or transaction is created.

Mock only
Required
Required
Electricity only
Required
Required for electricity
Optional
Required
Optional
Required
Request body · application/json
{
  "bill_type": "electricity",
  "biller_code": "desco",
  "meter_type": "prepaid",
  "account_number": "12345678901",
  "contact_number": "01712345678",
  "amount": "500",
  "tran_id": "BILL-DEMO-10001"
}
Simulated response
{
  "success": true,
  "status": "PENDING",
  "message": "Bill payment initiated successfully",
  "data": {
    "id": "74a14863-0443-40f0-bdf7-b446301b68f1",
    "tranId": "BILL-DEMO-10001",
    "billType": "electricity",
    "billerCode": "desco",
    "billerName": "Dhaka Electric Supply Company",
    "accountNumber": "12345678901",
    "amount": "500",
    "location": null,
    "final_amount": "500",
    "commission": 0,
    "charge": 0,
    "ussdCode": null,
    "status": "PENDING",
    "queuedAt": "2026-01-15T10:30:00.000Z",
    "createdAt": "2026-01-15T10:30:00.000Z"
  }
}

Code examples

Node.js
const response = await fetch('https://sohojxpay.com/api/v1/bills', {
  method: 'POST',
  headers: {
    "Content-Type": "application/json",
    "x-service-api-key": "usk_live_demo_not_a_real_key"
  },
  body: JSON.stringify({
    "bill_type": "electricity",
    "biller_code": "desco",
    "meter_type": "prepaid",
    "account_number": "12345678901",
    "contact_number": "01712345678",
    "amount": "500",
    "tran_id": "BILL-DEMO-10001"
  }),
});

const data = await response.json();
if (!response.ok) throw new Error(data.message || 'Request failed');
console.log(data);
04

Mobile financial services

MFS

Create bKash, Nagad, Rocket, or Upay transactions and check their processing status.

Submit an MFS transaction and hold the calculated service amount from the balance.

POST/api/v1/mfsService API keyMFS permission

Provider codes

bkashbKashnagadNagadrocketRocketupayUpay

Transaction types

sendmoneySend moneycashoutCash outcashinCash in

Parameters

FieldLocationTypeRequiredAccepted / exampleDescription
mfs_namebodystringYesbkash, nagad, rocket, upayMFS provider code.
mfs_typebodystringYessendmoney, cashout, cashinRequested MFS operation.
receiver_nobodystringYes0171234567811-digit Bangladesh mobile number beginning with 01.
amountbodynumberYes500Positive transaction amount in BDT. Sent as a string.
tran_idbodystringNoMFS-DEMO-10001Optional unique reference, 5–50 characters. The server generates one when omitted.

Safe playground

Try a simulated request

Runs entirely in your browser. No API call or transaction is created.

Mock only
Required
Required
Required
Required
Optional
Request body · application/json
{
  "mfs_name": "bkash",
  "mfs_type": "sendmoney",
  "receiver_no": "01712345678",
  "amount": "500",
  "tran_id": "MFS-DEMO-10001"
}
Simulated response
{
  "success": true,
  "status": "PENDING",
  "message": "MFS request created successfully.",
  "data": {
    "id": "0ad650aa-ad67-4de5-a88f-ef4a2afe9114",
    "tranId": "MFS-DEMO-10001",
    "mfsName": "bkash",
    "mfsType": "sendmoney",
    "receiverNo": "01712345678",
    "amount": "500",
    "location": null,
    "final_amount": "500",
    "commission": 0,
    "charge": 0,
    "ussdCode": null,
    "status": "PENDING",
    "queuedAt": "2026-01-15T10:30:00.000Z",
    "createdAt": "2026-01-15T10:30:00.000Z"
  }
}

Code examples

Node.js
const response = await fetch('https://sohojxpay.com/api/v1/mfs', {
  method: 'POST',
  headers: {
    "Content-Type": "application/json",
    "x-service-api-key": "usk_live_demo_not_a_real_key"
  },
  body: JSON.stringify({
    "mfs_name": "bkash",
    "mfs_type": "sendmoney",
    "receiver_no": "01712345678",
    "amount": "500",
    "tran_id": "MFS-DEMO-10001"
  }),
});

const data = await response.json();
if (!response.ok) throw new Error(data.message || 'Request failed');
console.log(data);

HTTP response status codes

Use the HTTP status together with the response message to decide what your integration should do next.

400

Invalid or missing request data

401

Missing or invalid API key

403

API key lacks permission

404

Requested record was not found

423

KYC approval is required

429

Too many requests

500

Unexpected server error