Bank transfers in Pakistan

Overview

Bank transfers in Pakistan is a payment method that allows customers to perform purchases and payouts by using bank transfers. With Bank transfers in Pakistan, your customers can perform purchases by using Payment Page and Gate.

In Bank transfers in Pakistan, payments are processed by using one of the two channels: channel 1—without customer redirection, or channel 2—with redirection of the customer to the provider service. For the information on which of the channels to use, refer to your Monetix key account manager.

Download the logo in vector format here.

Payment method type Bank transfers
Countries and regions Pakistan
Payment currencies PKR
Currency conversion On the Monetix side
Purchases
Payouts Available by using the Banks of Pakistan payment method
COF payments
Full refunds
Partial refunds
Chargebacks
Special considerations

When making a purchase, the customer can specify a payment amount which is different from the one specified in the request. Information on how to handle such cases is provided in Handling payments with amount changed by customer

Channel 1:
  • Payment may take as long as 24 hours.
  • If within one hour a customer fails to enter the valid transaction ID after the payment starts, the payment is automatically declined.
Channel 2:

If the customer does not make all required steps to complete the payment within 25 minutes after the payment was initiated, the payment is declined on the provider's service side.

Onboarding and access fee Refer to your key account manager at Monetix.

Interaction diagram

Payment processing by using the Bank transfers in Pakistan payment method requires merchant web service, one of Monetix interfaces, and the Monetix payment platform, as well as provider's technical facilities.

Operations support

Interfaces Amounts, PKR Times
Payment Page Gate Dashboard minimum maximum basic threshold
Purchases (chanel 1) 2,000.00 100,000.00 5 minutes 24 hours
Purchases (channel 2) 2,000.00 870,000.00 10 minutes 25 minutes

You can check the payment amount limits in your project by using Dashboard. To check your payment amount limits, go to Dashboard, select the Projects section and click the Payment methods tab.

Processing scenarios

Depending on the channel you use, the purchase scenario in Bank transfers in Pakistan may be one of the following:

  • Channel 1—the customer completes the payment by following the payment instructions
  • Channel 2—the customer is redirected to the provider service to complete the payment

For the information on which of the channels to use, refer to your Monetix key account manager.

The sections that follow provide more information about what you need to perform payments and how you can analyze payments and operations information.

Purchase by using Payment Page. Channel 1: no customer redirection

General information

In the Bank transfers in Pakistan method, when processing a purchase by using Payment Page, the merchant web service sends a request with all the required parameters and signature to the Monetix URL and accepts the callback with the payment result from the payment platform. When opening Payment Page, you can have Payment Page opened with the Bank transfers in Pakistan method pre-selected. (For more information about pre-selecting payment methods, see in Preselecting payment methods.)

The full sequence of the purchase workflow is provided below.

Figure 5. Purchase workflow when using Payment Page
  1. Customer initiates purchase on the merchant's web service.
  2. The web service sends the request for Payment Page opening to the Monetix URL.
  3. The request for opening Payment Page is redirected to the payment platform.
  4. The payment platform performs initial request processing that includes validation whether all required parameters are available and signature is correct.
  5. The requested Payment Page is generated by the Monetix payment platform as specified in the project settings and request parameters.
  6. Payment Page is displayed to the customer.
  7. The customer selects Bank transfers in Pakistan as payment method.
  8. The payment platform receives the purchase request for payment processing from Payment Page.
  9. The payment platform performs the internal purchase request processing and forwards it to the Bank transfers in Pakistan service.
  10. The purchase request is processed on the Bank transfers in Pakistan service side.
  11. The Bank transfers in Pakistan service generates the data for displaying payment instructions and sends it to the payment platform.
  12. The payment platform sends to Payment Page the payment instructions data.
  13. The payment instructions are displayed to the customer.
  14. The customer completes all the steps required to complete the payment.
  15. The payment is processed on the Bank transfers in Pakistan side.
  16. The Bank transfers in Pakistan service sends a transaction ID to the customer.
  17. The customer enters the transaction ID on Payment Page.
  18. Payment Page sends the request to resume the payment along with the transaction ID to the payment platform.
  19. The payment platform forwards the request with the transaction ID to the Bank transfers in Pakistan service.
  20. The Bank transfers in Pakistan service processes the request.
  21. The Bank transfers in Pakistan service sends the result notification to the payment platform.
  22. The payment platform sends callback with the payment result to the web service.
  23. The payment platform sends the result to Payment Page.
  24. The page with the payment result information is displayed to the customer on Payment Page.

The sections that follow discuss in more details the request format and the Payment Page parameters to use in the Bank transfers in Pakistan payment method and provide the information about format of callbacks with payment results. For the general information about how to use the Payment Page API, see Payment Page API Description.

Request format

There are several things you need to consider when dealing with purchase requests in the Bank transfers in Pakistan method:

  1. You must provide values for the basic minimum of parameters. Listed below are the parameters that are required for any payment method:
    • project_id—project ID you obtained from Monetix
    • payment_id—payment ID unique within the project
    • customer_id—unique ID of the customer within your project
    • payment_currency—payment currency in ISO-4217 alpha-3 format
    • payment_amount—payment amount in minor currency units without any decimal point or comma except for cases where the currency does not have any minor currency units. If the currency has no minor units (that is, the number of digits for minor currency units is zero), then you must set this parameter to the amount in the major currency units. For the information on whether the currency has any minor units, see Currency codes.
    • customer_email—customer email address
  2. You must also provide values for the following parameters:
    • customer_account_number—customer account number
    • account_customer_name—customer full name
  3. If you need to have payment form displayed with the Bank transfers in Pakistan method pre-selected, set the force_payment_method parameter to the code on the bank-transfer-pakistan payment method.
  4. You can also add any other additional parameters Payment Page supports. For more information about parameters supported by Payment Page, see Payment Page invocation parameters.
  5. After you specify all the parameters you need, you must create the signature for the request. For instructions on how to sign payment requests, see Signature generation and verification.

Here is an example of data from a purchase request.

EPayWidget.run(
    {
        project_id: 1234, 
        payment_id: 'payment_47',
        customer_id: 'customer_123',
        customer_email: 'example@email.com',
        customer_account_number: '12345678901',
        account_customer_name: 'John Doe',
        payment_currency: 'PKR',
        payment_amount: 1000000,      
        signature: "kUi2x9dKHAVNU0FYldJrxh4yo+52Kt8KU+Y19vySO\/RLUkDJrOcZzUCwX6R\/ekpZhkIQg=="
    }
)

Callback format

The Bank transfers in Pakistan method uses the standard format for callbacks to deliver purchase results. For more information about callbacks, see Callbacks in Payment Page.

The following is an example of a callback with an information about successful 10,000.00 PKR purchase.

Figure 6. Example of data from a successful purchase callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "purchase",
        "status": "success",
        "date": "2022-03-25T11:08:45+0000",
        "method": "Pakistan bank-transfer",
        "sum": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 28,
        "type": "sale",
        "status": "success",
        "date": "2022-03-25T11:08:45+0000",
        "created_date": "2022-03-25T11:08:05+0000",
        "request_id": "9e32835fb27907e0b08569d7d150e387a16a80e336c5117242b5cf60a4e17839",
        "sum_initial": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "sum_converted": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "code": "0",
        "message": "Success",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-321",
            "auth_code": ""
        }
    },
    "signature": "U7HQO7ToISZhMPKdM4Xr4DSX2UuHp99rHrtaxkUKQtoYzFvoB3cs9CRd4xeYG2Q=="
}

The following is the example of a callback for a declined purchase.

Figure 7. Example of data from a declined purchase callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "purchase",
        "status": "decline",
        "date": "2022-03-25T11:20:30+0000",
        "method": "Pakistan bank-transfer",
        "sum": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 31,
        "type": "sale",
        "status": "decline",
        "date": "2022-03-25T11:20:30+0000",
        "created_date": "2022-03-25T11:19:53+0000",
        "request_id": "fff3d5f8d5d31bc460b68b57dc63f4b482e906eb",
        "sum_initial": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "sum_converted": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "code": "20000",
        "message": "General decline",
        "provider": {
            "id": 15923,
            "payment_id": "0cf4215c-8978",
            "auth_code": ""
        }
    },
    "signature": "J7W15rkqrLzTCD4HkoM4qoEnlVlfqz8155QSlXJKR4m8C4z2iFYv58P4VnHANu445/jmY+g=="
}

Related topics

The following topics might be useful when implementing payments through Payment Page:

Purchase by using Payment Page. Channel 2: customer redirection

General information

In the Bank transfers in Pakistan method, when processing a purchase by using Payment Page, the merchant web service sends a request with all the required parameters and signature to the Monetix URL and accepts the callback with the payment result from the payment platform.

When opening Payment Page, you can have Payment Page opened with the Bank transfers in Pakistan method pre-selected. (For more information about pre-selecting payment methods, see Preselecting payment methods.)

The full sequence of the purchase workflow is provided below.

Figure 8. Purchase workflow when using Payment Page
  1. The customer initiates a purchase on the merchant's web service.
  2. The web service sends the request for the Payment Page opening to the Monetix URL.
  3. The request for opening Payment Page is redirected to the payment platform.
  4. The payment platform performs the initial request processing that includes validation whether all the required parameters are available and signature is correct.
  5. The requested Payment Page is generated by the Monetix payment platform as specified in the project settings and request parameters.
  6. Payment Page is displayed to the customer.
  7. The customer selects Bank transfers in Pakistan as the payment method.
  8. The payment platform receives the purchase request for the payment processing from Payment Page.
  9. The payment platform processes the request and generates the redirection data.
  10. The payment platform sends the customer redirection data to Payment Page.
  11. The customer is redirected to the provider website.
  12. The customer completes all the steps required to complete the payment.
  13. The provider service processes the payment.
  14. The customer is redirected to Payment Page.
  15. The provider service sends the result notification to the payment platform.
  16. The payment platform sends a callback with the payment result to the web service.
  17. The payment platform sends the result to Payment Page.
  18. The page with the payment result information is displayed to the customer on Payment Page.

The sections that follow discuss in more details the request format and the Payment Page parameters to use in the Bank transfers in Pakistan payment method and provide the information about the format of callbacks with payment results. For the general information about how to use the Payment Page API, see Payment Page API Description.

Request format

There are several things you need to consider when dealing with purchase requests in the Bank transfers in Pakistan method:

  1. You must provide values for the basic minimum of parameters. Listed below are the parameters that are required for any payment method:
    • project_id—project ID you obtained from Monetix
    • payment_id—payment ID unique within the project
    • customer_id—the unique ID of the customer within your project
    • customer_email—customer email
    • customer_first_name—customer first name
    • customer_last_name—customer last name
    • payment_currency—payment currency in ISO-4217 alpha-3 format
    • payment_amount—payment amount in minor currency units without any decimal point or comma except for cases where the currency does not have any minor currency units. If the currency has no minor units (that is, the number of digits for minor currency units is zero), then you must set this parameter to the amount in the major currency units. For the information on whether the currency has any minor units, see Currency codes.
  2. If you need to have the payment form displayed with the Bank transfers in Pakistan method pre-selected, set the force_payment_method parameter to the code on the bank-transfer-pakistan payment method.
  3. You can also add any other additional parameters Payment Page supports. For more information about parameters supported by Payment Page, see Payment Page invocation parameters.
  4. After you specify all the parameters you need, you must create the signature for the request. For instructions on how to sign payment requests, see Signature generation and verification.

Here is an example of the data from a request for the Payment Page opening:

EPayWidget.run(
    {
        project_id: 1234,
        payment_id: 'payment_47',
        customer_id: 'customer_123',
        customer_first_name: 'John',
        customer_last_name: 'Doe',
        customer_email: 'johndoe@example.com',
        payment_currency: 'PKR',
        payment_amount: 1000000,    
        signature: "kUi2x9dKHAVNU0FYldJrxh4yo+52Kt8KU+Y19vySO\/RLUkDJrOcZzUCwX6R\/ekpZhkIQg=="
    }
)

Callback format

The Bank transfers in Pakistan method uses the standard format for callbacks to deliver purchase results. For more information about callbacks, see Callbacks in Payment Page.

The following is an example of a callback with information about a successful 10,000.00 PKR purchase.

Figure 9. Example of the data from a successful purchase callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "purchase",
        "status": "success",
        "date": "2022-03-25T11:08:45+0000",
        "method": "Pakistan bank-transfer",
        "sum": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 28,
        "type": "sale",
        "status": "success",
        "date": "2022-03-25T11:08:45+0000",
        "created_date": "2022-03-25T11:08:05+0000",
        "request_id": "9e32835fb27907e0b08569d7d150e387a16a80e336c5117242b5cf60a4e17839",
        "sum_initial": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "sum_converted": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "code": "0",
        "message": "Success",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-321",
            "auth_code": ""
        }
    },
    "signature": "U7HQO7ToISZhMPKdM4Xr4DSX2UuHp99rHrtaxkUKQtoYzFvoB3cs9CRd4xeYG2Q=="
}

The following is the example of a callback for a declined purchase.

Figure 10. Example of the data from a declined purchase callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "purchase",
        "status": "decline",
        "date": "2022-03-25T11:20:30+0000",
        "method": "Pakistan bank-transfer",
        "sum": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 31,
        "type": "sale",
        "status": "decline",
        "date": "2022-03-25T11:20:30+0000",
        "created_date": "2022-03-25T11:19:53+0000",
        "request_id": "fff3d5f8d5d31bc460b68b57dc63f4b482e906eb",
        "sum_initial": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "sum_converted": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "code": "20000",
        "message": "General decline",
        "provider": {
            "id": 15923,
            "payment_id": "0cf4215c-8978",
            "auth_code": ""
        }
    },
    "signature": "J7W15rkqrLzTCD4HkoM4qoEnlVlfqz8155QSlXJKR4m8C4z2iFYv58P4VnHANu445/jmY+g=="
}

Related topics

The following topics might be useful when implementing payments through Payment Page:

Purchase by using Gate. Channel 1: no customer redirection

General information

In the Bank transfers in Pakistan method, the merchant web service is required to do the following when processing a purchase by using Gate:

  1. Send request with all the required parameters and signature to the Monetix URL.
  2. Show the screen with the payment instructions to the customer.
  3. Accept the callback with the payment result from the payment platform.

The following diagram provides the detailed picture of the payment processing procedure.

Figure 11. Purchase by using Gate
  1. Customer initiates purchase with Bank transfers in Pakistan on the merchant's web service side.
  2. The web service sends a request for processing the purchase by using Gate to the Monetix URL.
  3. The payment platform receives the request for processing the purchase from Gate.
  4. The payment platform performs initial request processing that includes validation whether all required parameters are available and signature is correct.
  5. The payment platform sends the response with request receipt confirmation and validation result to the web service. For more information about the response format, see Response structure.
  6. The payment platform performs the internal payment request processing and redirects the request to the Bank transfers in Pakistan service.
  7. The request is processed on the Bank transfers in Pakistan service side.
  8. The Bank transfers in Pakistan service generates the data for displaying payment instructions and sends it to the payment platform.
  9. The payment platform sends the callback with the payment instructions data inside the display_data array to the web service.
  10. The payment instructions are displayed to the customer.
  11. The customer completes all the payment steps required.
  12. The payment is processed on the Bank transfers in Pakistan service side.
  13. The Bank transfers in Pakistan service sends a transaction ID to the customer.
  14. The customer enters the transaction ID on the web service side.
  15. The web service sends the request to resume the payment along with the transaction ID to the Monetix URL.
  16. The payment platform receives the request for resuming the payment from Gate.
  17. The payment platform performs initial request processing that includes validation whether all required parameters are available and signature is correct.
  18. The payment platform sends the response with request receipt confirmation and validation result to the web service. For more information about the response format, see Response structure.
  19. The payment platform performs the internal payment request processing and redirects the request to resume the payment along with the transaction ID to the Bank transfers in Pakistan service.
  20. The Bank transfers in Pakistan service processes the request.
  21. The Bank transfers in Pakistan service sends the payment result notification to the payment platform.
  22. The payment platform sends the callback with the payment result to the web service.
  23. The web service sends the payment result to the customer.

The sections that follow discuss in more details the request format and the Gate parameters to use in the Bank transfers in Pakistan payment method and provide the information about the format of callbacks with purchase results. For the general information on how to use the Gate API, see API Description.

Request format

There are several things you need to consider when dealing with purchase requests in the Bank transfers in Pakistan method:

  1. You initiate purchase by submitting a purchase request to the /v2/payment/bank-transfer/pakistan/sale endpoint by using HTTP method POST. This endpoint belongs to the following group of endpoints for bank transfer payments: /v2/payment/bank-transfer/{payment_method}/sale
  2. The following objects and parameters must be specified in any request:
    • general—object with general request identification information:
      • project_id—the project ID you obtained from Monetix
      • payment_id—payment ID unique within the project
      • signature—signature created after you specify all the required parameters. For more information about signature generation, see Signature generation and verification.
    • customer—object with customer information:
      • id—the unique ID of the customer within your project
      • ip_address—customer device IP
      • email—customer email address
    • account—object with customer account information:
      • number—customer account number
      • customer_name—customer full name
    • payment—object with purchase information:
      • amount—purchase amount in minor currency units without any decimal point or comma except for cases where the currency does not have any minor currency units. If the currency has no minor units (that is, the number of digits for minor currency units is zero), then you must set this parameter to the amount in the major currency units. For the information on whether the currency has any minor units, see Currency codes.
      • currency—code of purchase currency in the ISO-4217 alpha-3 format
  3. If required, you can add any other additional (optional) parameters Gate supports.

Here is an example of data from a purchase request in the Bank transfers in Pakistan method.

Figure 12. Example of data from a purchase request
{
    "general": {
        "project_id": 1234,
        "payment_id": "payment_47",
        "signature": "PJkV8ej\/UG0Di8hTng6JvC7vQsaC6tajQVVfBaNIipTv+AWoXW\/9MTO8yJA=="
    },
    "customer": {
        "id": "customer_123",
        "ip_address": "198.51.100.47",
        "email": "example@email.com"
    },
    "account": {
        "number": "1234567890123456",
        "customer_name": "John Doe"
    },
    "payment": {
        "amount": 1000000,
        "currency": "PKR"
    }
}

Format of data for displaying the payment instruction

Before displaying the screen with payment instructions to the customer, you must accept a callback from the payment platform with the payment data in the in the display_data array—only after this you can display the screen with payment instructions to the customer.

Each element of the display_data array contains the following parameters:

  • type—element type (always add_info)
  • title—the name of the payment instruction data, can take the following values:
    • receiver_name—name of the payment method
    • account_number—account number of the payment recipient
  • data—payment instruction data

Here is a sample of a callback with a display_data object.

"display_data": [
    {
        "type": "add_info",
        "title": "receiver_name",
        "data": "example" 
    },
    {
        "type": "add_info",
        "title": "account_number",
        "data": "12133234424"
    }
]
Here is an example of the text from the payment instruction that can be used in the web service.
Instruction text in Urdu Instruction text in English

ادائیگی کے لیے اہم ہدایات

  1. براہ کرم اس صفحہ پر دکھائی گئی رقم کے مطابق سختی سے فنڈز منتقل کریں،اور رقم میں ترمیم نہ کریں۔
  2. جب آپ ٹرانسفر کرتے ہیں تو آپ کو یہ یقینی بنانا ہوگا کہ ہمیں کل رقم بغیر کسی کٹوتی کے ملے۔
  3. غلطی کی صورت میں ہمیں کم یا زیادہ رقم مل جاتی ہے، ہم اس کے مطابق آپ کے اکاؤنٹ میں کریڈٹ کر دیں گے۔
  4. براہ کرم پہلے سے استعمال شدہ اکاؤنٹ میں براہ راست رقم نہ بھیجیں۔ ہم اس طرح کے ٹرانزیکشن کے ذمہ دار نہیں ہوں گے۔ ادائیگی کرتے وقت ہمیشہ ایک نیا آرڈر بنائیں۔
  5. براہ کرم 1 گھنٹے کے اندر ادائیگی مکمل کریں۔ اگر آپ 1 گھنٹے کے بعد ادائیگی کرتے ہیں تو براہ کرم کسٹمر سپورٹ سے رابطہ کریں۔
  6. براہ کرم مندرجہ بالا ادائیگی کی ہدایات کی سختی سے پابندی کریں۔ اگر کوئی خلاف ورزی ہوتی ہے، تو اکاؤنٹ میں کریڈٹ نہیں کیا جائے گا، اور پلیٹ فارم کسی بھی نقصان کے لیے ذمہ دار نہیں ہوگا۔
  7. براہ کرم بینک ٹرانزیکشن آئی ڈی درج کریں۔
  8. براہ کرم درست رقم درج کریں۔
  9. براہ کرم ہمیں درست معلومات فراہم کریں جیسے کامیاب ٹرانزیکشن آئی ڈی اور رقم آپ کے اکاؤنٹ میں رقم جمع کرنے کے لیے۔

Payment Instructions

  1. Please transfer funds strictly in accordance with the amount displayed on this page,and do not modify amount.
  2. When you Transfer you have to make sure we receive the same amount without any deduction.
  3. In case of mistake we receive less or more amount, we will credit to your account accordingly.
  4. Please do not send money directly to the previously deposit accounts. It may not be trackable and we will not responsible for such transactions. Always place a new order before you like to pay.
  5. Please complete the payment within 1 hour. If you pay such transaction after 1 hour please contact with the customer support.
  6. *Please strictly abide by the above payment instructions. If there is any violation, the account will not be credited, and the platform will not be responsible for any losses caused. :
  7. Please enter bank transaction id
  8. Please Enter Correct Amount
  9. Please provide us correct information such as successful transaction ID and amount in order to funds credit to your account.

Request format for resuming the payment

To submit the transaction ID, you need to resume the payment processing by sending a request with the transaction ID to the /v2/payment/clarification endpoint by using HTTP method POST. The following objects and parameters must be specified in the request:

  • general—object with general request identification information:
    • project_id—the project ID you obtained from Monetix
    • payment_id—payment ID unique within the project
    • signature—signature created after you specify all the required parameters. For more information about signature generation, see Signature generation and verification.
  • additional_data—object that contains:
    • additional_data—object with additional payment information that payment platform requests:
      • txref—the transaction ID your customer obtained from the Bank transfers in Pakistan service

Here is an example of the data from a request to resume the payment:

Figure 13. Example of data from a request for resuming payment processing
{
    "general": {
        "project_id": 1234,
        "payment_id": "payment_47",
        "signature": "PJkV8ej\/UG0Di8hTng6JvC7vQsaC6tajQVVfBaNIipTv+AWoXW\/9MTO8yJA=="
    },
    "additional_data": {
      "additional_data": {
            "txref": "1234567890"
       }
    }
}

Callback format

The Bank transfers in Pakistan method uses the standard format for callbacks to deliver purchase results. For more information about callbacks, see Callbacks in Gate.

The following is an example of a callback with an information about successful 10,000.00 PKR purchase.

Figure 14. Example of data from a successful purchase callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "purchase",
        "status": "success",
        "date": "2022-03-25T11:08:45+0000",
        "method": "Pakistan bank-transfer",
        "sum": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 28,
        "type": "sale",
        "status": "success",
        "date": "2022-03-25T11:08:45+0000",
        "created_date": "2022-03-25T11:08:05+0000",
        "request_id": "9e32835fb27907e0b08569d7d150e387a16a80e336c5117242b5cf60a4e17839",
        "sum_initial": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "sum_converted": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "code": "0",
        "message": "Success",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-321",
            "auth_code": ""
        }
    },
    "signature": "U7HQO7ToISZhMPKdM4Xr4DSX2UuHp99rHrtaxkUKQtoYzFvoB3cs9CRd4xeYG2Q=="
}

The following is the example of a callback for a declined purchase.

Figure 15. Example of data from a declined purchase callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "purchase",
        "status": "decline",
        "date": "2022-03-25T11:20:30+0000",
        "method": "Pakistan bank-transfer",
        "sum": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 31,
        "type": "sale",
        "status": "decline",
        "date": "2022-03-25T11:20:30+0000",
        "created_date": "2022-03-25T11:19:53+0000",
        "request_id": "fff3d5f8d5d31bc460b68b57dc63f4b482e906eb",
        "sum_initial": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "sum_converted": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "code": "20000",
        "message": "General decline",
        "provider": {
            "id": 15923,
            "payment_id": "0cf4215c-8978",
            "auth_code": ""
        }
    },
    "signature": "J7W15rkqrLzTCD4HkoM4qoEnlVlfqz8155QSlXJKR4m8C4z2iFYv58P4VnHANu445/jmY+g=="
}

Related topics

The following topics might be useful when implementing payments through Gate:

Purchase by using Gate. Channel 2: customer redirection

General information

In the Bank transfers in Pakistan method, the merchant web service is required to do the following when processing a purchase by using Gate:

  1. Send a request with all the required parameters and signature to the Monetix URL.
  2. Redirect the customer to the provider service.
  3. Accept the callback with the payment result from the payment platform.

The following diagram provides the detailed picture of the payment processing procedure.

Figure 16. Purchase by using Gate
  1. The customer initiates a purchase with Bank transfers in Pakistan on the merchant's web service side.
  2. The web service sends a request for processing the purchase by using Gate to the Monetix URL.
  3. The payment platform receives the request for processing the purchase from Gate.
  4. The payment platform performs the initial request processing that includes validation whether all the required parameters are available and signature is correct.
  5. The payment platform sends the response with the request receipt confirmation and validation result to the web service. For more information about the response format, see Response structure.
  6. The payment platform processes the request and generates the redirection data.
  7. The payment platform sends the callback with the redirection data inside the redirect_data object to the web service.
  8. The customer is redirected from the web service to the provider service.
  9. The customer completes all the payment steps required.
  10. The provider service processes the payment.
  11. The customer is redirected to the merchant web service.
  12. The provider service sends the payment result notification to the payment platform.
  13. The payment platform sends the callback with the payment result to the web service.
  14. The web service sends the payment result to the customer.

The sections that follow discuss in more details the request format and the Gate parameters to use in the Bank transfers in Pakistan payment method and provide the information about the format of callbacks with purchase results. For the general information on how to use the Gate API, see API Description.

Request format

There are several things you need to consider when dealing with purchase requests in the Bank transfers in Pakistan method:

  1. You initiate a purchase by submitting a purchase request to the /v2/payment/bank-transfer/pakistan/sale endpoint by using the HTTP method POST. This endpoint belongs to the following group of endpoints for the bank transfer payments: /v2/payment/bank-transfer/{payment_method}/sale.
  2. The following objects and parameters must be specified in any request:
    • general—object with general request identification information:
      • project_id—the project ID you obtained from Monetix
      • payment_id—payment ID unique within the project
      • signature—signature created after you specify all the required parameters. For more information about signature generation, see Signature generation and verification.
    • customer—object with customer information:
      • id—the unique ID of the customer within your project
      • ip_address—IP address of the customer's device
      • email—customer email
      • first_name—customer first name
      • last_name—customer last name
    • payment—object with purchase information:
      • amount—purchase amount in minor currency units without any decimal point or comma except for cases where the currency does not have any minor currency units. If the currency has no minor units (that is, the number of digits for minor currency units is zero), then you must set this parameter to the amount in the major currency units. For the information on whether the currency has any minor units, see Currency codes.
      • currency—code of the purchase currency in the ISO-4217 alpha-3 format
  3. The following parameters with the return URLs are optional, but we strongly advise you to specify them in the request to provide your customer a better user experience. If you don't specify any parameters of the return_url object in the request, by default Gate will redirect the customer to the URL specified in your project in Monetix.
    • return_url—object with the information where to redirect the customer to when the payment is completed or prematurely terminated by the customer:
      • success—the URL to redirect the customer to after the payment is successfully completed.
      • decline—the URL to redirect the customer to after the payment is declined.
      • return—the URL to redirect the customer to when they prematurely terminate the payment. This URL is also used if the success and decline parameters are not specified in the request.
  4. If required, you can add any other additional (optional) parameters Gate supports.

Here is an example of the data from a purchase request in the Bank transfers in Pakistan method.

Figure 17. Example of the data from a purchase request
{
    "general": {
        "project_id": 1234,
        "payment_id": "payment_47",
        "signature": "PJkV8ej\/UG0Di8hTng6JvC7vQsaC6tajQVVfBaNIipTv+AWoXW\/9MTO8yJA=="
    },
    "customer": {
        "id": "customer_123",
        "ip_address": "198.51.100.47",
        "first_name": "John",
        "last_name": "Doe",
        "email": "johndoe@example.com"
    },
    "payment": {
        "amount": 1000000,
        "currency": "PKR"
    },
    "return_url": {
        "success": "https://example.com/success/",
        "decline": "https://example.com/decline/",
        "return": "https://example.com/return/"
    }
}

Format of customer redirection data

After receiving and processing your purchase request, the payment platform sends a callback to your web service containing the data to redirect the customer to the provider service.

To redirect the customer, use the values of the following parameters in the redirect_data object:

  • url—the URL to redirect the customer to
  • body—the data to be sent in the request body
  • method—the HTTP method to get an HTML page of the website (for example, POST or GET)
  • encrypted—this is the service parameter. Ignore the data it contains.

Here is an example of a piece of callback containing the data to redirect the customer.

"redirect_data": {
    "method": "GET",
    "body": [],
    "encrypted": [],
    "url": "https://example.com/redirect"
}

Callback format

The Bank transfers in Pakistan method uses the standard format for callbacks to deliver purchase results. For more information about callbacks, see Callbacks in Gate.

The following is an example of a callback with information about a successful 10,000.00 PKR purchase.

Figure 18. Example of the data from a successful purchase callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "purchase",
        "status": "success",
        "date": "2022-03-25T11:08:45+0000",
        "method": "Pakistan bank-transfer",
        "sum": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 28,
        "type": "sale",
        "status": "success",
        "date": "2022-03-25T11:08:45+0000",
        "created_date": "2022-03-25T11:08:05+0000",
        "request_id": "9e32835fb27907e0b08569d7d150e387a16a80e336c5117242b5cf60a4e17839",
        "sum_initial": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "sum_converted": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "code": "0",
        "message": "Success",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-321",
            "auth_code": ""
        }
    },
    "signature": "U7HQO7ToISZhMPKdM4Xr4DSX2UuHp99rHrtaxkUKQtoYzFvoB3cs9CRd4xeYG2Q=="
}

The following is the example of a callback for a declined purchase.

Figure 19. Example of the data from a declined purchase callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "purchase",
        "status": "decline",
        "date": "2022-03-25T11:20:30+0000",
        "method": "Pakistan bank-transfer",
        "sum": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 31,
        "type": "sale",
        "status": "decline",
        "date": "2022-03-25T11:20:30+0000",
        "created_date": "2022-03-25T11:19:53+0000",
        "request_id": "fff3d5f8d5d31bc460b68b57dc63f4b482e906eb",
        "sum_initial": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "sum_converted": {
            "amount": 1000000,
            "currency": "PKR"
        },
        "code": "20000",
        "message": "General decline",
        "provider": {
            "id": 15923,
            "payment_id": "0cf4215c-8978",
            "auth_code": ""
        }
    },
    "signature": "J7W15rkqrLzTCD4HkoM4qoEnlVlfqz8155QSlXJKR4m8C4z2iFYv58P4VnHANu445/jmY+g=="
}

Related topics

The following topics might be useful when implementing payments through Gate:

Analysis of payments results

As with other payment methods Monetix offers, when using this method, you have several options to analyze the information about payments and operations.

You can load and analyze all the necessary information in Dashboard (dash-light.trxhost.com), for instance you can use the analytic panels in the Analytics section for this purpose.

Also, you can export the information for further analysis by using third party analytical tools. The following options are available:

  • Dashboard allows you to download reports in CSV format by using the tools in the Reports section. You can perform export as a one-time or regular download of data to your local computer.
  • Data API allows you to have payment information exported in JSON format and delivered to a URL you specify. The payment information is exported by means of sending requests to the /operations/get endpoint.

If you have any further questions regarding payment data analysis, contact Monetix technical support.