Skip to content

Provider (Amounts)

Get available amounts for a specific operator.

Endpoint: POST /international-bridge/provider

Request

Pass the provider_id from the Providers response.

bash
curl -X POST https://API-ENDPOINT/international-bridge/provider \
  -H "Content-Type: application/json" \
  -d '{
    "auth": {
      "id": 123,
      "key": 1706360400000,
      "hash": "a1b2c3d4e5f6..."
    },
    "provider_id": 56
  }'
php
<?php
$url = 'https://API-ENDPOINT/international-bridge/provider';
$key = time() * 1000;

$data = [
    'auth' => [
        'id' => 123,
        'key' => $key,
        'hash' => md5(123 . $token . $key)
    ],
    'provider_id' => 56
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);
print_r($result);
javascript
const key = Date.now();
const hash = md5(`123${token}${key}`);

const response = await fetch('https://API-ENDPOINT/international-bridge/provider', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    auth: { id: 123, key, hash },
    provider_id: 56
  })
});

const data = await response.json();
console.log(data);
python
import requests
import hashlib
import time

url = 'https://API-ENDPOINT/international-bridge/provider'
key = int(time.time() * 1000)
hash_value = hashlib.md5(f"123{token}{key}".encode()).hexdigest()

response = requests.post(url, json={
    'auth': {
        'id': 123,
        'key': key,
        'hash': hash_value
    },
    'provider_id': 56
})

print(response.json())

Request Fields

FieldTypeRequiredDescription
provider_idintegerYesOperator ID from Providers response

Response

json
{
  "country": {
    "id": 233,
    "name": "India",
    "phone_code": "+91",
    "phone_mask": "+91 ($$$) $$$-$$-$$",
    "currency": "INR",
    "logo": "https://API-ENDPOINT/static-media/country-flags/IND.png",
    "logo_large": "https://API-ENDPOINT/static-media/country-flags-large/IND.png"
  },
  "provider": {
    "id": 56,
    "name": "Airtel",
    "logo": "https://API-ENDPOINT/static-media/operators/56.png"
  },
  "amounts": [
    {
      "id": "16a6e7cc7319a2f36c110d6a3af98aff",
      "category_id": "mobile-airtime",
      "name": "Topup Plan",
      "description": "Talktime of INR 7.47\nAn active validity plan is required to purchase this product.",
      "amount": "10",
      "currency": "INR",
      "sale_price": "0.46",
      "sale_currency": "AED",
      "price": "0.43",
      "price_currency": "AED"
    },
    {
      "id": "adcb07de7d5560909df1b0b9f273728c",
      "category_id": "mobile-data",
      "name": "1 GB 1 Day",
      "description": "Enjoy 1GB data; valid for 1 day\nAn active validity plan is required to purchase this product.",
      "amount": "22",
      "currency": "INR",
      "sale_price": "1",
      "sale_currency": "AED",
      "price": "0.93",
      "price_currency": "AED"
    },
    {
      "id": "eff902a3725b9aa6b9698c92900bc4bc",
      "category_id": "mobile-bundles",
      "name": "Unlimited Data 2 Days",
      "description": "Unlimited Data 2 Days. This Data Top-Up recharge is available only to Airtel Prepaid customers with active outgoing service validity.",
      "amount": "99",
      "currency": "INR",
      "sale_price": "4.52",
      "sale_currency": "AED",
      "price": "4.2",
      "price_currency": "AED"
    },
    {
      "id": "062821f6bf2765e1d61a51e6f2757e9c",
      "category_id": "mobile-data",
      "name": "6 GB 30 Days",
      "description": "Get 6 GB Data + JioHotstar Mobile subscription for 30 days.",
      "amount": "100",
      "currency": "INR",
      "sale_price": "4.56",
      "sale_currency": "AED",
      "price": "4.24",
      "price_currency": "AED"
    }
  ]
}

Response Fields

Amount Object

FieldTypeDescription
idstringAmount ID (use in Check request as amount_id)
category_idstringProduct category (see Categories)
namestringProduct name
descriptionstringProduct description
amountstringValue customer receives in local currency
currencystringLocal currency code
sale_pricestringSuggested retail price
sale_currencystringRetail price currency
pricestringYour cost (wholesale)
price_currencystringYour cost currency

Common Category IDs

category_idDescription
mobile-airtimeAirtime / Calls
mobile-dataMobile Internet
mobile-bundlesBundles & Plans

See Categories for the full list.

Next Step

Select an amount and proceed to Check with the amount_id and recipient phone number.

Paynet API Documentation