Payment
- The user is provided with wallet details to which payment must be made.
- The user makes a payment in their wallet app and receives a unique transaction number.
- Next, the user enters a unique transaction number in the payment window, after which the transaction is activated.
- Paykassma sends a postback to the merchant's side.
- Funds are credited to the user’s balance on the merchant platform.
Payment window integration (plugin)
Example of a link to open a EasyPaisa payment window:
https://plugin.{server_URL}/? label =label ¤cy_code =PKR &lang =lang &wallet_type =easypaisa &custom_transaction_id =custom_transaction_id &fixed_amount=fixed_amount &payment_url_fail_id=1 |
---|
wallet_type=easypaisa currency_code=PKR Available languages (lang): en, ur
Pay attention to the description of the parameters payment_url_success_id / payment_url_fail_id/ payment_url_pending_id and success_url / fail_url / pending_url.
To use payment_url_success_id / payment_url_fail_id / payment_url_pending_id you need to send the URLs to Paykassma support and use the received IDs in the parameters.
To use success_url / fail_url / pending_url you must use hashing URLs ( For more details on hashing click here).
For the description of all the plug-in parameters click here.
API integration
Creating payment
URL: https://api.{server_URL}/api/v1/transaction/create/easypaisa?secret={pluginapi_secret}
At this stage, we provide the details of the wallet to which the user must make a payment.
Request method:
POST
Format:
JSON
Parameters:
Name | Type | Required | Max Length | Description |
currency | string | yes | 3 | Currency code. |
label | string | yes | 190 | The unique identifier (ID) of the user who makes the payment. |
{ 'currency': 'PKR', 'label': 'eligendi' }
{ 'status': 'ok', 'params': { 'identifier': '03919394039' } }
{ 'status': 'fail', 'message': 'MESSAGE' }
Activation request
URL: http://api.{server_URL}/api/v1/transaction/activate?secret={pluginapi_secret}
Request method:
POST
Format:
JSON
Parameters:
Name | Type | Required | Max Length | Description |
currency_code | string | yes | 3 | Currency code. |
wallet_type | string | yes | 190 | Method. |
label | string | yes | 190 | The unique identifier (ID) of the user who makes the payment. |
key1 | string | yes | 11 | Transaction ID received from the user (11 digits). |
amount | float | yes | 256 | Payment amount. |
custom_transaction_id | string | Yes | 190 | The identifier of the transaction in the Client's system. Must be unique. |
{ "currency_code": "PKR", "label": "786442", "wallet_type": "easypaisa", "key1": "67923175246", "amount": 1200, "custom_transaction_id": "3158538" }
{ "status": "ok", "deposit": true, "deposit_amount": 6000, "currency": { "code": "PKR", "symbol": "PKR" } }
{ "status": "pending", "message": "The deposit status check has been started. The operation may take longer than expected. Upon completion of the verification, the funds will be credited to your account" }
{ "status": "possible_transaction_created", "message": "Transaction not found. Possible transaction created" }
{ 'status': 'fail', 'message': 'MESSAGE' }
Deposit postback
For the general documentation on post backs click here.
Example of a deposit postback for a EasyPaisa
{ "signature": "2ad41735cd2d225cb30fe0665e83a3ade8618e0d", "wallet_type": "easypaisa", "amount": 1000, "currency_code": "PKR", "label": "545932754", "converted_amount": { "USD": 3.44, "INR": 287, "EUR": 3.26, "IDR": 53345.01, " R": 16.13, "VND": 83939.04, "SGD": 4.71, "THB": 125.55, "NGN": 2683.44, "TRY": 93.83, "AED": 12.64, "CAD": 4.65, "AUD": 5.38, "BDT": 379.55, "AFN": 269.35, "ALL": 345.5, "AMD": 1334.63, "AOA": 2860.58, "ARS": 1204.88, "AWG": 6.2, "AZN": 5.85, "BAM": 6.36, "BBD": 6.88, "BGN": 6.36, "BHD": 1.3, "BIF": 9793.46, "BMD": 3.44, "BND": 4.72, "BOB": 23.79, "BRL": 17.17, "BSD": 3.44, "BTC": 0.00013153, "BTN": 286.42, "BWP": 47.13, "BYN": 8.69, "BZD": 6.94, "CDF": 8588.64, "CHF": 3.15, "CLF": 0.11, "CLP": 3111.53, "CNH": 25.17, "CNY": 25.17, "COP": 14004.25, "CRC": 1853.68, "CUC": 3.44, "CUP": 88.64, "CVE": 360.24, "CZK": 79.62, "DJF": 612.14, "DKK": 24.29, "DOP": 195.35, "DZD": 473.03, "EGP": 106.42, "ERN": 51.64, "ETB": 190.44, "FJD": 7.8, "FKP": 2.83, "GBP": 2.83, "GEL": 9.23, "GGP": 2.83, "GHS": 39.76, "GIP": 2.83, "GMD": 223.92, "GNF": 29793.45, "GTQ": 27.05, "GYD": 720.18, "HKD": 26.93, "HNL": 85.4, "HRK": 24.55, "HTG": 463, "HUF": 1273.46, "ILS": 13.17, "IMP": 2.83, "IQD": 4509.47, "IRR": 145395.84, "ISK": 472.7, "JEP": 2.83, "JMD": 531.91, "JOD": 2.44, "JPY": 513.15, "KES": 508.95, "KGS": 305.37, "KHR": 14182.44, "KMF": 1603.96, "KPW": 3098.11, "KRW": 4659.28, "KWD": 1.06, "KYD": 2.87, "KZT": 1640.6, "LAK": 69345.94, "LBP": 51738.37, "LKR": 1115.54, "LRD": 642, "LSL": 64.54, "LYD": 16.78, "MAD": 35.36, "MDL": 62.53, "MGA": 15622.78, "MKD": 200.46, "MMK": 7229.09, "MNT": 11876.07, "MOP": 27.73, "MRO": 0, "MRU": 131.15, "MUR": 153.9, "MVR": 53.18, "MWK": 3729.78, "MXN": 60.18, "MZN": 219.97, "NAD": 65.54, "NIO": 125.92, "NOK": 37.28, "NPR": 458.28, "NZD": 5.79, "OMR": 1.33, "PAB": 3.44, "PEN": 12.98, "PGK": 12.53, "PHP": 196.97, "PKR": 1000, "PLN": 15.02, "PYG": 25089.55, "QAR": 12.53, "RON": 16.2, "RSD": 382.13, "RUB": 331.76, "RWF": 4165.23, "SAR": 12.91, "SBD": 28.87, "SCR": 46, "SDG": 2070.57, "SEK": 37.98, "SHP": 2.83, "SLL": 72184.15, "SOS": 1960.41, "SRD": 131.66, "SSP": 448.4, "STD": 76701.53, "STN": 80.03, "SVC": 30.12, "SYP": 8648.98, "SZL": 64.54, "TJS": 37.81, "TMT": 12.08, "TND": 10.93, "TOP": 8.22, "TTD": 23.35, "TWD": 110.91, "TZS": 8623.06, "UAH": 127.14, "UGX": 12974.99, "UYU": 131.28, "UZS": 42082.61, "VEF": 0, "VES": 116.97, "VUV": 408.68, "WST": 9.36, "XAF": 2137, "XAG": 0.15, "XAU": 0, "XCD": 9.3, "XDR": 2.62, "XOF": 2137, "XPD": 0, "XPF": 388.76, "XPT": 0, "YER": 861.88, "ZAR": 65.71, "ZMW": 72.37, "ZWL": 1108.43, "ETH": 0.00217404, "LTC": 0.05394329, "DOGE": 57.16089421, "DASH": 0.12895029, "BCH": 0.01611015, "ZEC": 0.13142451, "ETC": 0.22849437, "XRP": 6.82546989, "TRX": 40.70360447, "XLM": 30.77768748, "WAVES": 2.27571992, "USDT": 3.44373882, "USDTTRC20": 0, "USDT20": 0 }, "direction": "ingoing", "created_datetime": "2023-09-26 19:37:02", "access_key": "TA25Ea9sjPUFJvIG", "additional_data": [ { "activated_datetime": "2023-09-26 22:37:00", "exchanger_identifier": "923139471223", "comment": "", "amount": "1000", "currency_code": "PKR", "wallet_type": "easypaisa", "stockpiling_id": 4819603, "transaction_id": "23936218009", "transaction_type": 0, "plugin_custom_order_id": "5586199250", "withdrawal_id": null, "withdrawal_status": null, "account_number": "", "account_name": "", "account_email": "", "bank_details": { "bank_code": "", "branch_code": "" } } ] }
Repeated postbacks must also be answered with {"status":"ok"} response code 200.
Withdrawals for users
For the general documentation on the withdrawals of funds click here.
Creating withdrawal
URL: https://api.{server_URL}/v2/withdrawal/create
Request method:
POST
Format:
JSON
Parameters:
Name | Type | Required | Description |
withdrawal_id | string(1-36) | yes | Withdrawal ID, if the parameter is not passed, then the system generates withdrawal _id. |
payment_system | string | yes | Payment system. |
amount | int | required | Additional requirements:
|
currency_code | string(3) | yes | Currency code. |
label | string(1-36) | yes | The unique identifier (ID) of the user who makes the payment. |
account_number | string | yes | Eleven-digit account number of the Customer's user account in easypaisa, in the format 03XXXXXXXXX. Validation: Numbers: 0-9. |
account_name | string | yes | Name of account holder (the limit on the number of characters is 30, only the Latin alphabet, without other symbols and numbers). |
bank_details.bank_code | string | yes | CNIC (national id card) - 13 digits, the CNIC number that the user used to verify his EasyPaisa wallet. If indicated incorrectly, the payment will be rejected. |
is_test | boolean | yes | The is_test parameter can take one of two values:
|
signature | string | yes | Signature formed with private_key. |
{ "withdrawal_id": "1234567test", "payment_system": "easypaisa", "amount": 10000, "currency_code": "PKR", "label": "125199", "account_number": "03405135211", "account_name": "Muhammad Saqib Mushtaq", "bank_details": { "bank_code": "3460342887803" }, "is_test": true, "signature": "2e56786153bec935220fa1e9409ab24bd99cf9e8" }
{ "status": "ok" }
{ 'status': 'fail', 'message': 'MESSAGE' }
*If, when trying to create a withdrawal request, the amount of account balances in the currency of the request is less than the total amount of new and still incomplete applications, the error message"Insufficient balance" will be displayed (to configure this functionality, contact the TP Paykassma).
{ "status": "fail", "message": { "withdrawals_sum_amount": [ "Insufficient balance" ] } }
Example of a withdrawal postback for a EasyPaisa
{ "signature": "80dea4b4ac348b3362a6ae8a384bda273090d736", "wallet_type": "easypaisa", "amount": 1000, "currency_code": "PKR", "label": "53999", "converted_amount": {"USD": 9.19, "INR": 762, "EUR": 8.4, "IDR": 139456.4, "MYR": 41.85, "VND": 218252.65, "SGD": 12.34, "THB": 319.65, "NGN": 7059.31, "TRY": 248.14, "AED": 33.76, "CAD": 12.29, "AUD": 14.01, "BDT": 1000, "AFN": 782.21, "ALL": 880.95, "AMD": 3553.15, "AOA": 7606.14, "ARS": 2556.17, "AWG": 16.57, "AZN": 15.63, "BAM": 16.41, "BBD": 18.38, "BGN": 16.42, "BHD": 3.47, "BIF": 25985.39, "BMD": 9.19, "BND": 12.32, "BOB": 63.39, "BRL": 45.21, "BSD": 9.19, "BTC": 0.00031527, "BTN": 759.15, "BWP": 123.06, "BYN": 23.16, "BZD": 18.49, "CDF": 22761.01, "CHF": 8.07, "CLF": 0.28, "CLP": 7825.36, "CNH": 66.09, "CNY": 66.01, "COP": 37354.96, "CRC": 4997.9, "CUC": 9.19, "CUP": 236.69, "CVE": 925.13, "CZK": 203.57, "DJF": 1633.46, "DKK": 62.6, "DOP": 518.16, "DZD": 1249.8, "EGP": 284.5, "ERN": 137.88, "ETB": 503.71, "FJD": 20.82, "FKP": 7.24, "GBP": 7.24, "GEL": 23.94, "GGP": 7.24, "GHS": 102.53, "GIP": 7.24, "GMD": 555.18, "GNF": 78901.88, "GTQ": 72.13, "GYD": 1919.37, "HKD": 71.77, "HNL": 225.63, "HRK": 63.29, "HTG": 1256.82, "HUF": 3290.49, "ILS": 33.88, "IMP": 7.24, "IQD": 12017.81, "IRR": 388924.19, "ISK": 1215.7, "JEP": 7.24, "JMD": 1419.83, "JOD": 6.51, "JPY": 1311.31, "KES": 1314.41, "KGS": 806.76, "KHR": 37931.08, "KMF": 4134.66, "KPW": 8272.54, "KRW": 12026.76, "KWD": 2.83, "KYD": 7.64, "KZT": 4085.16, "LAK": 178275.46, "LBP": 137706.07, "LKR": 2935.82, "LRD": 1714.25, "LSL": 170.49, "LYD": 44.17, "MAD": 90.83, "MDL": 161.83, "MGA": 40949.06, "MKD": 516.95, "MMK": 19265.17, "MNT": 31711.4, "MOP": 73.76, "MRO": 0, "MRU": 347.91, "MUR": 415.74, "MVR": 141.09, "MWK": 9637.55, "MXN": 159.13, "MZN": 587.12, "NAD": 171.88, "NIO": 335.77, "NOK": 93.87, "NPR": 1214.64, "NZD": 15.12, "OMR": 3.54, "PAB": 9.19, "PEN": 33.46, "PGK": 33.33, "PHP": 512.31, "PKR": 2646.06, "PLN": 37.35, "PYG": 66768.73, "QAR": 33.47, "RON": 41.61, "RSD": 985.18, "RUB": 872.02, "RWF": 10882.98, "SAR": 34.48, "SBD": 76.92, "SCR": 121.87, "SDG": 5528.81, "SEK": 98.37, "SHP": 7.24, "SLL": 192745.54, "SOS": 5224.43, "SRD": 352.64, "SSP": 1197.31, "STD": 204807.82, "STN": 208.19, "SVC": 80.28, "SYP": 23094.44, "SZL": 170.64, "TJS": 100.59, "TMT": 32.17, "TND": 28.36, "TOP": 21.78, "TTD": 62.19, "TWD": 291.36, "TZS": 22933.31, "UAH": 338.83, "UGX": 33073.3, "UYU": 344.16, "UZS": 107221.29, "VEF": 0, "VES": 273.17, "VUV": 1091.26, "WST": 24.99, "XAF": 5511.18, "XAG": 0.39, "XAU": 0, "XCD": 24.84, "XDR": 6.83, "XOF": 5511.18, "XPD": 0.01, "XPF": 1002.59, "XPT": 0.01, "YER": 2301.14, "ZAR": 171.84, "ZMW": 176.38, "ZWL": 2959.73, "ETH": 0.00501297, "LTC": 0.11098363, "DOGE": 123.99061787, "DASH": 0.29568477, "BCH": 0.04051484, "ZEC": 0.31233151, "ETC": 0.51252969, "XRP": 13.94632462, "TRX": 118.36066918, "XLM": 65.99332558, "WAVES": 4.94463261, "USDT": 9.20218423, "USDTTRC20": 0, "USDT20": 0}, "direction": "outgoing", "created_datetime": "2023-08-04 09:13:00", "access_key": "FQ9jMwrNSkFbyMNqYFf6Ed4xeKmjHK", "additional_data": [ { "activated_datetime": "", "exchanger_identifier": "", "comment": "", "amount": "20000", "currency_code": "PKR", "wallet_type": "easypaisa", "stockpiling_id": null, "transaction_id": "", "transaction_type": null, "plugin_custom_order_id": "", "withdrawal_id": "10319", "withdrawal_status": 1, "account_number": "56432467654", "account_name": "", "account_email": "[email protected]", "bank_details": { "bank_code": null, "branch_code": null } } ] }
Repeated postbacks must also be answered with {"status":"ok"} response code 200.
Withdrawal statuses
1 | SUCCESS | Status for withdrawal when the withdrawal request has been successfully processed. |
5 | FAIL | Status for withdrawal when the withdrawal request was rejected. |
Creating withdrawal request in Paykassma BO
To create a withdrawal request, you need to go to the Withdrawals page Payments → Withdrawals and perform the following steps
- Press the button "Add withdrawal request".
- Select payment system from list.
- Fill in the fields to create the request in the next window (the list of fields is standardized and not all fields are required. To create a request for a specific PS, you should fill in the required fields for this PS).
Required fields for EasyPaisa withdrawal:
- Label (user ID);
- Amount;
- Currency;
- Wallet recipient.
4. After payment the withdrawal status will change.
Paykassma does not send postback for withdrawals created manually.