InstaPay API v2.0

Full programmatic access to InstaPay (Egypt) — transfers, balance, transactions, and more.

Authentication

All API requests require an API key sent via the X-API-Key header:

X-API-Key: ipk_your_api_key_here

Each API call (except /api/status.php) costs 1 credit from your balance. Contact admin to recharge credits.

Workflow
  1. Call /api/login.php with InstaPay credentials to get a session_id
  2. Use session_id in all subsequent calls
  3. Sessions expire when InstaPay invalidates the token — re-login if you get a 401

Endpoints

POST /api/login.php 1 credit

Authenticate with InstaPay and create a session.

Parameters
FieldTypeRequiredDescription
ipastringYesIPA address (e.g. user@instapay)
passwordstringYesInstaPay account password
device_idstringNoDevice ID (auto-generated if empty)
Response
{
  "error": false,
  "message": "Authenticated successfully",
  "data": {
    "session_id": 1,
    "ipa": "user@instapay",
    "device_id": "abc123..."
  }
}
GET /api/status.php FREE

Check API key status and remaining credits. No credits deducted.

{
  "error": false,
  "data": {
    "client_name": "My App",
    "credits": 450,
    "total_used": 550,
    "rate_limit": 60,
    "today_requests": 23,
    "active_sessions": 1
  }
}

Read Operations

POST /api/transactions.php 1 credit

Get transaction history with pagination and type filtering.

Parameters
FieldTypeRequiredDescription
session_idintYesSession ID from login
pageintNoPage number (0-based, default 0)
typestringNoCREDIT (incoming) or DEBIT (outgoing)
Response
{
  "error": false,
  "data": {
    "transactions": [
      {
        "txnId": "550e8400-e29b...",
        "txnDate": "2024-01-15 14:30:00",
        "txnType": "CREDIT",
        "amount": "500.00",
        "currency": "EGP",
        "payerName": "Ahmed Mohamed",
        "payerIpa": "ahmed@instapay",
        "payeeName": "Your Name",
        "payeeIpa": "you@instapay",
        "status": "SUCCESS",
        "description": "Transfer",
        "remarks": "Payment for order #123"
      }
    ],
    "total_pages": 5,
    "page": 0
  }
}
POST /api/balance.php 1 credit

Get mini statement (recent transactions summary).

Parameters
FieldTypeRequiredDescription
session_idintYesSession ID from login
POST /api/account_balance.php 1 credit

Get actual account balance from the linked bank account.

Parameters
FieldTypeRequiredDescription
session_idintYesSession ID from login
Response
{
  "error": false,
  "data": {
    "balance": "15000.00",
    "currency": "EGP",
    "accountName": "Your Account Name"
  }
}
POST /api/limits.php 1 credit

Get daily and monthly transaction limits for the account.

Parameters
FieldTypeRequiredDescription
session_idintYesSession ID from login
Response
{
  "error": false,
  "data": {
    "dailyLimit": "30000.00",
    "monthlyLimit": "100000.00",
    "dailyUsed": "5000.00",
    "monthlyUsed": "25000.00"
  }
}
POST /api/pending.php 1 credit

Get pending collect (payment) requests awaiting your action.

Parameters
FieldTypeRequiredDescription
session_idintYesSession ID from login
POST /api/banks.php 1 credit

List all banks available on the InstaPay network.

Parameters
FieldTypeRequiredDescription
session_idintYesSession ID from login

Write Operations

These endpoints modify account state. Use with caution.

POST /api/verify_ipa.php 1 credit

Verify that an IPA address exists and is active on InstaPay. Use before transfers.

Parameters
FieldTypeRequiredDescription
session_idintYesSession ID from login
payee_ipastringYesIPA address to verify (e.g. user@instapay)
Response
{
  "error": false,
  "data": {
    "valid": true,
    "payeeName": "Ahmed Mohamed",
    "payeeIpa": "ahmed@instapay"
  }
}
POST /api/fees.php 1 credit

Get the fee that will be charged for a transfer before executing it.

Parameters
FieldTypeRequiredDescription
session_idintYesSession ID from login
amountnumberYesTransfer amount
ipastringYesRecipient IPA address
currencystringNoCurrency code (default: EGP)
is_onusstringNoSame bank transfer? true/false (default: true)
Response
{
  "error": false,
  "data": {
    "fee": "0.00",
    "totalAmount": "100.00",
    "currency": "EGP"
  }
}
POST /api/transfer.php 1 credit

Send money to another InstaPay account. Verify the IPA and check fees first.

Parameters
FieldTypeRequiredDescription
session_idintYesSession ID from login
payee_ipastringYesRecipient IPA address
payee_namestringYesRecipient name (from verify_ipa)
amountnumberYesAmount to transfer
currencystringNoCurrency code (default: EGP)
remarksstringNoTransfer note/description
Response
{
  "error": false,
  "message": "Transfer completed successfully",
  "data": {
    "txnId": "550e8400-e29b...",
    "amount": "100.00",
    "fee": "0.00",
    "status": "SUCCESS"
  }
}
POST /api/collect.php 1 credit

Request money from another InstaPay user. They will receive a notification to approve or reject.

Parameters
FieldTypeRequiredDescription
session_idintYesSession ID from login
payer_ipastringYesIPA of the person to request from
payer_namestringYesName of the payer
amountnumberYesAmount to request
currencystringNoCurrency code (default: EGP)
remarksstringNoRequest note/description
Response
{
  "error": false,
  "message": "Collect request sent successfully",
  "data": {
    "txnId": "550e8400-e29b...",
    "status": "PENDING"
  }
}

Beneficiaries

POST /api/beneficiaries.php 1 credit

Manage saved beneficiaries (favorite contacts).

Parameters
FieldTypeRequiredDescription
session_idintYesSession ID from login
actionstringNolist (default), add, or remove
ipastring*IPA address (required for add and remove)
namestring*Beneficiary name (required for add)
List Beneficiaries
POST /api/beneficiaries.php
session_id=1&action=list

{
  "error": false,
  "data": {
    "beneficiaries": [
      { "ipa": "ahmed@instapay", "name": "Ahmed Mohamed" },
      { "ipa": "sara@instapay", "name": "Sara Ali" }
    ]
  }
}
Add Beneficiary
POST /api/beneficiaries.php
session_id=1&action=add&ipa=user@instapay&name=User Name

{ "error": false, "data": { "added": true } }
Remove Beneficiary
POST /api/beneficiaries.php
session_id=1&action=remove&ipa=user@instapay

{ "error": false, "data": { "removed": true } }

Error Codes

HTTP CodeMeaning
400Missing or invalid parameters
401Invalid/missing API key, or InstaPay session expired
402No credits remaining
403API key disabled, expired, or IP not allowed
429Rate limit exceeded
500Server error

All error responses follow this format:

{
  "error": true,
  "message": "Error description here"
}

cURL Examples

1. Login
curl -X POST https://instapay.advcode.net/api/login.php \
  -H "X-API-Key: ipk_your_key_here" \
  -d "ipa=user@instapay" \
  -d "password=your_password"
2. Check Status (Free)
curl -H "X-API-Key: ipk_your_key_here" \
  https://instapay.advcode.net/api/status.php
3. Get Transactions
curl -X POST https://instapay.advcode.net/api/transactions.php \
  -H "X-API-Key: ipk_your_key_here" \
  -d "session_id=1" \
  -d "page=0" \
  -d "type=CREDIT"
4. Verify IPA Before Transfer
curl -X POST https://instapay.advcode.net/api/verify_ipa.php \
  -H "X-API-Key: ipk_your_key_here" \
  -d "session_id=1" \
  -d "payee_ipa=ahmed@instapay"
5. Check Fees
curl -X POST https://instapay.advcode.net/api/fees.php \
  -H "X-API-Key: ipk_your_key_here" \
  -d "session_id=1" \
  -d "amount=500" \
  -d "ipa=ahmed@instapay"
6. Send Transfer
curl -X POST https://instapay.advcode.net/api/transfer.php \
  -H "X-API-Key: ipk_your_key_here" \
  -d "session_id=1" \
  -d "payee_ipa=ahmed@instapay" \
  -d "payee_name=Ahmed Mohamed" \
  -d "amount=500" \
  -d "remarks=Payment for order 123"
7. Request Money (Collect)
curl -X POST https://instapay.advcode.net/api/collect.php \
  -H "X-API-Key: ipk_your_key_here" \
  -d "session_id=1" \
  -d "payer_ipa=ahmed@instapay" \
  -d "payer_name=Ahmed Mohamed" \
  -d "amount=200" \
  -d "remarks=Invoice 456"
8. Get Account Balance
curl -X POST https://instapay.advcode.net/api/account_balance.php \
  -H "X-API-Key: ipk_your_key_here" \
  -d "session_id=1"
9. List Beneficiaries
curl -X POST https://instapay.advcode.net/api/beneficiaries.php \
  -H "X-API-Key: ipk_your_key_here" \
  -d "session_id=1" \
  -d "action=list"
10. List Banks
curl -X POST https://instapay.advcode.net/api/banks.php \
  -H "X-API-Key: ipk_your_key_here" \
  -d "session_id=1"