You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

Payment

  1. The user is provided with wallet details to which payment must be made.
  2. The user makes a payment in their wallet app and receives a unique transaction number.
  3. Next, the user enters a unique transaction number in the payment window, after which the transaction is activated.
  4. Paykassma sends a postback to the merchant's side.
  5. Funds are credited to the user’s balance on the merchant platform.

Payment window integration (plugin)

Example of a link to open a JazzCash business payment window:

https://plugin.{server_URL}/?
label=label
&currency_code=PKR
&lang=en
&wallet_type=jazzcash_business
&custom_transaction_id=custom_transaction_id
&fixed_amount=fixed_amount
&payment_url_success_id=2
&payment_url_pending_id=3
&payment_url_fail_id=1
&success_url=hash
&fail_url=hash
&pending_url=hash


wallet_type=jazzcash_business
currency_code=PKR 
Available languages (lang): en, ur

Pay attention to the description of the parameters payment_url_success_id / payment_url_fail_idpayment_url_pending_id and success_url / fail_url pending_url.
To use payment_url_success_id / payment_url_fail_idpayment_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_urlpending_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.{ URL server }/api/v1/transaction/create/jazzcash_business?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

currencystringyes3Currency code.

label

string

yes

190

The unique identifier (ID) of the user who makes the payment.


Request
{
  "currency": "PKR",
  "label": "eligendi"
}
Response Success
{
    "status": "ok",
    "params": {
        "identifier": "00123456",
        "qr_data": "0002010102112606000205520456915802PK5915Rehmani clothes6010Sillanwali530358662420211032602162990611030419910590708004809246304EF63"
    }
}
Response Fail
{
    'status': 'fail',
    'message': 'MESSAGE'
}

Activation request

URL: http://api.{ URL server }/api/v1/transaction/activate?secret={pluginapi_secret}

Request method:

POST

Format:

JSON

Parameters:

Name

Type

Required

Max Length

Description

currency_codestringyes3PKR

wallet_type

string

yes

190

jazzcash_business
labelstringyes190The unique identifier (ID) of the user who makes the payment.
key1stringyes190

Transaction ID received from the user (12 digits).

amountfloatyes256Payment amount.
custom_transaction_id

string

yes190

The identifier of the transaction in the Client's system.

Must be unique.

Request
{
    "currency_code": "PKR",
    "wallet_type": "jazzcash_business",
    "label": "55",
    "key1": "473811134684",
	"amount": 500,
    "custom_transaction_id": "123465477897"
}


Response Success
{
    "status": "ok",
    "deposit": true,
    "deposit_amount": 500,
    "currency": {
        "code": "PKR",
        "symbol": "PKR"
    }
}
Response Pending For suspect transactions
{
    "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"
}
Response Possible Transaction Created (if the "Possible transactions" functionality is enabled)
{
    "status": "possible_transaction_created",
    "message": "Transaction not found. Possible transaction created"
}
Response fail
{
    'status': 'fail',
    'message': 'MESSAGE'
}

Deposit postback

For the general documentation on post backs click here.

Example of a deposit postback for a JazzCash business

{
    "signature": "0d8103294d3457bd4d22d0ff94c859d45ff9abb1",
    "wallet_type": "jazzcash_business",
    "amount": 700,
    "currency_code": "PKR",
    "label": "631317234",
    "converted_amount": {"USD": 4.61, "INR": 380, "EUR": 4.2, ... ,  "USDT": 4.60787289, "USDTTRC20": 0, "USDT20": 0},
    "direction": "ingoing",
    "created_datetime": "2023-08-25 10:47:40",
    "access_key": "FQ9jMwrNSkFbyMNqYFf6Ed4xeKmjHK",
    "additional_data": [
        {
            "activated_datetime": "2023-08-25 13:47:40",
            "exchanger_identifier": "99xxxx6690",
            "comment": "",
            "amount": "700",
            "currency_code": "PKR",
            "wallet_type": "jazzcash_business",
            "stockpiling_id": 1430926,
            "transaction_id": "047752123519",
            "transaction_type": 0,
            "plugin_custom_order_id": "h8JxcM123DbmAvfn",
            "withdrawal_id": null,
            "withdrawal_status": null,
            "account_number": "",
            "account_name": "",
            "account_email": "",
            "bank_details": {
                "bank_code": "",
                "branch_code": ""
        }
    ]
}

The Paykassma server is waiting for a response in json {"status": "ok"} response code 200, otherwise, when receiving a different response, Paykassma will forward the postback with a certain frequency.
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.{ URL server}/v2/withdrawal/create

Request method:

POST

Format:
JSON

Parameters:

Name

Type

Required

Description

withdrawal_idstring(1-36) yes Withdrawal ID, if the parameter is not passed, then the system generates withdrawal _id.
payment_systemstring yesPayment system.
amount

int


yes

Additional requirements:

  1. amount >= The value of the set minimum value;
  2. amount <= The value of the set maximum value.
currency_codestring(3) yesCurrency code.

is_test

booleanyes

The is_test parameter can take one of two values:

  • true - if the withdrawal is test;
  • false - if the withdrawal is real.

label

string(1-36)

yes

The unique identifier (ID) of the user who makes the payment.

account_emailstring optionalEmail of the account holder.
bank_details.bank_codestringyesCNIC (national id card) - 13 digits, the CNIC number that the user used to verify his JazzCash wallet. If indicated incorrectly, the payment will be rejected.
account_numberstring 

yes

Name of account holder.

signaturestringyesSignature formed with private_key.
Request
{
    "withdrawal_id": "297",
    "payment_system": "jazzcash",
    "amount": 1000,
    "currency_code": "PKR",
    "label": "125199",
    "account_number": "03278516234",
    "account_name": "TestNameAcc",
    "payments_details": {},
    "bank_details": {
        "bank_code": "3460342887803"
    },
    "is_test": false,
    "signature": "2237e83a44bba650d982edc043fc5dd39e9b816c"
}
Response Success
{
    "status": "ok",
}
Response Fail
{
    '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).

Response Fail (if the balance is insufficient)
{
    "status": "fail",
    "message": {
        "withdrawals_sum_amount": [
            "Insufficient balance"
        ]
    }
}

Example of a withdrawal postback for a JazzCash business

{
    "signature": "72ba3abd715986f6ba3b9d558c17074498f53d2c",
    "wallet_type": "jazzcash_business",
    "amount": 20000,
    "currency_code": "PKR",
    "label": "1237916",
    "converted_amount": {"USD": 9.19, "INR": 762, "EUR": 8.4, ... , "USDT": 9.20218423, "USDTTRC20": 0, "USDT20": 0},
    "direction": "outgoing",
    "created_datetime": "2023-08-24 16:52:02",
    "access_key": "FQ9jMwrNSkFbyMNqYFf6Ed4xeKmjHK",
    "additional_data": [
        {
            "activated_datetime": "",
            "exchanger_identifier": "",
            "comment": "",
            "amount": "20000",
            "currency_code": "PKR",
            "wallet_type": "jazzcash_business",
            "stockpiling_id": null,
            "transaction_id": "",
            "transaction_type": null,
            "plugin_custom_order_id": "",
            "withdrawal_id": "1071620",
            "withdrawal_status": 1,
            "account_number": "8541235719",
            "account_name": "",
            "account_email": "[email protected]",
            "bank_details": {
                "bank_code": null,
                "branch_code": null
            }
        }
    ]
}

The Paykassma server is waiting for a response in json {"status": "ok"} response code 200, otherwise, when receiving a different response, Paykassma will forward the postback with a certain frequency.
Repeated postbacks must also be answered with {"status":"ok"} response code 200.

After processing the withdrawal, Paykassma will send a postback about the withdrawal result with the status, signed with the signature.

Withdrawal statuses

1SUCCESSStatus for withdrawal when the withdrawal request has been successfully processed.
5FAILStatus 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

  1. Press the button "Add withdrawal request".



  2. Select payment system from list.


  3. 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 JazzCash business payout:
- Label (user ID);
- Amount;
- Currency code;
- Wallet recipient.

     4. After payment the withdrawal status will change.
     

Paykassma does not send postback for withdrawals created manually.