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 PhonePe payment window:

https://plugin.{server_URL}/?
label=label
&currency_code=INR
&lang=en
wallet_type=phone_pe
&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=phone_pe
currency_code=INR 
Available languages (lang): en, hi (Hindi)

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.{server_URL}/api/v1/transaction/create/phone_pe?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': 'INR', 
  'label': 'eligendi'
}
Response Success
{ 
    'status': 'ok', 
    'params':  { 
        'identifier': '6234234234'
    } 
}
Response Fail
{
    '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_codestringyes3Currency code - INR.

wallet_type

string

yes

190

Method - phone_pe.
labelstringyes190The unique identifier (ID) of the user who makes the payment.
key1stringyes190

Transaction ID received from the user.

"key1" - 12 digits in numbers.

amountfloatyes256Amount of payment.
custom_transaction_id

string

yes190

Transaction ID in the Client's system.

Must be unique.


Request
{
    "currency_code": "INR",
    "wallet_type": "phone_pe",
    "label": "55",
    "key1": "321302038123",
	"amount": 500,
    "custom_transaction_id": "123465477897"
}
Response Success
{
    "status": "ok",
    "deposit": true,
    "deposit_amount": 500,
    "currency": {
        "code": "INR",
        "symbol": "INR"
    }
}
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
{
    "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 deposit postback for PhonePe

{
    "signature": "36311443ceb305fcdff1e9f82be6605dedff5e50",
    "wallet_type": "phone_pe",
    "amount": 700,
    "currency_code": "INR",
    "label": "1230142",
    "direction": "ingoing",
    "created_datetime": "2023-08-25 15:12:49",
    "access_key": "FQ9jMwrNSkFbyMNqYFf6Ed4xeKmjHK",
    "additional_data": [
        {
            "activated_datetime": "2023-08-25 18:12:46",
            "exchanger_identifier": "81230207429",
            "comment": "",
            "amount": "700",
            "currency_code": "INR",
            "wallet_type": "phone_pe",
            "stockpiling_id": 1431219,
            "transaction_id": "323748622123",
            "transaction_type": 0,
            "plugin_custom_order_id": "ikDhBnLY123tx3G6H",
            "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

Payments to users are made by using IMPS method ( for more details on IMPS method click here).