RaastQR
Receive payments from customers using their RaastQR wallet.
Available through Checkout and H2H integrations.
Raast QR is Pakistan's national instant person-to-merchant (P2M) digital payment system. Customers can scan a single national QR code using any banking app/e-wallet in Pakistan.
For purchases, customers can pay using their RaastQR wallet through Checkout or H2H integration.
Purchase
RaastQR purchases are available through Amanpay Checkout and Host-to-Host (H2H) integration.
Request endpoint
| Parameter | Value |
|---|---|
| URL | https://gateway.amanpay.io |
| API endpoint | /payments/purchases/initiate |
| HTTP request method | POST |
| Request body format | JSON |
Purchase · Checkout
To initiate a purchase with the RaastQR payment method using Amanpay Checkout, add the following parameters to your request.
Request parameters
| Header | Value | Required | Description |
|---|---|---|---|
Content-Type | application/json | Required | HTTP header indicating the media type of the resource sent in the request body. |
Authorization | calculated | Required | For more details about request signature generation, see the About the signature section. |
| Parameter | Type | Required | Description |
|---|---|---|---|
merchantId | integer | Required | Your unique merchant ID that you got from Amanpay when integrating. |
paymentId | string | Required | Payment ID unique within your system. |
amount | number | Required | The amount is specified in major units and may include decimal places, for example, 500.50. |
currency | string | Required | Code of the purchase currency in the ISO-4217 alpha-3 format. |
customerId | string | Conditional | Customer's ID unique within your system. If not passed in the request, the value from the customerEmail parameter is used.Either customerEmail or customerId must be provided. |
customerEmail | string | Conditional | Customer's email. Either customerEmail or customerId must be provided. |
customerIp | string | Optional | Customer's IP address. |
paymentMethod | string | Optional | Payment method's code. Pass raastqr in this parameter to preselect this payment method for your customer on the checkout page. If not passed, the customer will have to choose the payment method themselves on the checkout page. |
raastQRNumber | string | Optional | Customer's mobile phone number associated with their RaastQR e-wallet. If not passed in the request, the customer will have to enter their mobile phone number themselves on the checkout page. Pass this parameter together with the paymentMethod parameter. |
returnUrl | string | Optional | URL to redirect the customer to after they've completed a payment. |
notifyUrl | string | Optional | URL for receiving callbacks for a specific payment. |
{
"merchantId": 123,
"paymentId": "payment_812",
"amount": 250.00,
"currency": "PKR",
"customerId": "customer174",
"customerEmail": "mark_cooper@example.com"
}
{
"transactionId": "1003592",
"paymentID": "payment_812",
"status": "PENDING",
"amount": 250,
"currency": "PKR",
"redirectUrl": "https://page.amanpay.io/checkout/8d797e24-b1bd-11f1-9cc1-caa1979cef0f",
"paymentType": "purchase"
}
{
"result_code": "DUPLICATE_PAYMENT_ID",
"result_message": "Payment ID already exists"
}
For the full list of possible responses, see Responses & Callbacks.
Purchase · H2H
RaastQR purchases are available through Host-to-Host integration.
Request parameters
To initiate a purchase with the RaastQR payment method via H2H integration, add the following parameters to your request.
| Header | Value | Required | Description |
|---|---|---|---|
Content-Type | application/json | Required | HTTP header indicating the media type of the resource sent in the request body. |
Authorization | calculated | Required | For more details about request signature generation, see the About the signature section. |
| Parameter | Type | Required | Description |
|---|---|---|---|
merchantId | integer | Required | Your unique merchant ID that you got from Amanpay when integrating. |
paymentId | string | Required | Payment ID unique within your system. |
amount | number | Required | The amount is specified in major units and may include decimal places, for example, 500.50. |
currency | string | Required | Code of the purchase currency in the ISO-4217 alpha-3 format. |
customerId | string | Conditional | Customer's ID unique within your system. If not passed in the request, the value from the customerEmail parameter is used.Either customerEmail or customerId must be provided. |
customerEmail | string | Conditional | Customer's email. Either customerEmail or customerId must be provided. |
customerIp | string | Optional | Customer's IP address. |
paymentMethod | string | Required | Payment method's code. Pass raastqr. |
RaastQRNumber | string | Optional | Customer's mobile phone number. |
returnUrl | string | Optional | URL to redirect the customer to after they've completed a payment. |
notifyUrl | string | Optional | URL for receiving callbacks for a specific payment. |
{
"merchantId": 123,
"paymentId": "payment_812",
"amount": 2000.00,
"currency": "PKR",
"customerId": "customer174",
"customerEmail": "mark_cooper@example.com",
"paymentMethod": "raastqr"
}
{
"transactionId": "1002858",
"paymentID": "payment_812",
"status": "PENDING",
"amount": 2000,
"currency": "PKR",
"paymentType": "purchase"
}
{
"result_code": "DUPLICATE_PAYMENT_ID",
"result_message": "Payment ID already exists"
}
For the full list of possible responses, see Responses & Callbacks.
Channel 1 · QR code
P2C
H2H
RaastQR QR code
H2H only
The following table contains the callback parameters.
| Header | Value | Required | Description |
|---|---|---|---|
Content-Type | application/json | Required | HTTP header indicating the media type of the resource sent in the request body. |
Authorization | calculated | Required | For more details about request signature generation, see the About the signature section. |
| Parameter | Type | Required | Description |
|---|---|---|---|
transactionId | integer | Required | Payment ID within the AmanPay payment platform. |
operationId | integer | Optional | Operation ID within the AmanPay payment platform. |
additional_data | object | Required | Additional data required to continue the purchase flow. |
additional_data.QrData | string | Required | QR data for payment. |
status | string | Required | Purchase status. PENDING means no additional data is required to continue the purchase flow. |
{
"additional_data": {
"QrData": "00020101021226480014A00000072701240011PKRAASTQR0112MOCK12345678952044111530358654061000.005802PK5912AMANPAY TEST6008KARACHI6304ABCD"
},
"operationId": 103315,
"transactionId": 103597,
"status": "PENDING"
}