Skip to main content

RaastQR

Accept payments

Receive payments from customers using their RaastQR wallet.

Integration

Available through Checkout and H2H integrations.

TypeQR
CountryPakistan
CurrencyPKR
RefundNo
Changed amountNo
OperationsPurchase
Payment typesP2C
Purchase integrations

Checkout · H2H

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​

ParameterValue
URLhttps://gateway.amanpay.io
API endpoint/payments/purchases/initiate
HTTP request methodPOST
Request body formatJSON

Purchase · Checkout​

CHECKOUT

To initiate a purchase with the RaastQR payment method using Amanpay Checkout, add the following parameters to your request.

Request parameters​
HeaderValueRequiredDescription
Content-Typeapplication/jsonRequiredHTTP header indicating the media type of the resource sent in the request body.
AuthorizationcalculatedRequiredFor more details about request signature generation, see the About the signature section.
ParameterTypeRequiredDescription
merchantIdintegerRequiredYour unique merchant ID that you got from Amanpay when integrating.
paymentIdstringRequiredPayment ID unique within your system.
amountnumberRequiredThe amount is specified in major units and may include decimal places, for example, 500.50.
currencystringRequiredCode of the purchase currency in the ISO-4217 alpha-3 format.
customerIdstringConditionalCustomer'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.
customerEmailstringConditionalCustomer's email.
Either customerEmail or customerId must be provided.
customerIpstringOptionalCustomer's IP address.
paymentMethodstringOptionalPayment 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.
raastQRNumberstringOptionalCustomer'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.
returnUrlstringOptionalURL to redirect the customer to after they've completed a payment.
notifyUrlstringOptionalURL for receiving callbacks for a specific payment.
Request example
{
"merchantId": 123,
"paymentId": "payment_812",
"amount": 250.00,
"currency": "PKR",
"customerId": "customer174",
"customerEmail": "mark_cooper@example.com"
}
Success response
{
"transactionId": "1003592",
"paymentID": "payment_812",
"status": "PENDING",
"amount": 250,
"currency": "PKR",
"redirectUrl": "https://page.amanpay.io/checkout/8d797e24-b1bd-11f1-9cc1-caa1979cef0f",
"paymentType": "purchase"
}
Error response

{
"result_code": "DUPLICATE_PAYMENT_ID",
"result_message": "Payment ID already exists"
}

For the full list of possible responses, see Responses & Callbacks.


Purchase · H2H​

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.

HeaderValueRequiredDescription
Content-Typeapplication/jsonRequiredHTTP header indicating the media type of the resource sent in the request body.
AuthorizationcalculatedRequiredFor more details about request signature generation, see the About the signature section.
ParameterTypeRequiredDescription
merchantIdintegerRequiredYour unique merchant ID that you got from Amanpay when integrating.
paymentIdstringRequiredPayment ID unique within your system.
amountnumberRequiredThe amount is specified in major units and may include decimal places, for example, 500.50.
currencystringRequiredCode of the purchase currency in the ISO-4217 alpha-3 format.
customerIdstringConditionalCustomer'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.
customerEmailstringConditionalCustomer's email.
Either customerEmail or customerId must be provided.
customerIpstringOptionalCustomer's IP address.
paymentMethodstringRequiredPayment method's code. Pass raastqr.
RaastQRNumberstringOptionalCustomer's mobile phone number.
returnUrlstringOptionalURL to redirect the customer to after they've completed a payment.
notifyUrlstringOptionalURL for receiving callbacks for a specific payment.
Request example
{
"merchantId": 123,
"paymentId": "payment_812",
"amount": 2000.00,
"currency": "PKR",
"customerId": "customer174",
"customerEmail": "mark_cooper@example.com",
"paymentMethod": "raastqr"
}
Success response
{
"transactionId": "1002858",
"paymentID": "payment_812",
"status": "PENDING",
"amount": 2000,
"currency": "PKR",
"paymentType": "purchase"
}
Error response
{
"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​

Type

P2C

Integration

H2H

Channel

RaastQR QR code

H2H only

The following table contains the callback parameters.

HeaderValueRequiredDescription
Content-Typeapplication/jsonRequiredHTTP header indicating the media type of the resource sent in the request body.
AuthorizationcalculatedRequiredFor more details about request signature generation, see the About the signature section.
ParameterTypeRequiredDescription
transactionIdintegerRequiredPayment ID within the AmanPay payment platform.
operationIdintegerOptionalOperation ID within the AmanPay payment platform.
additional_dataobjectRequiredAdditional data required to continue the purchase flow.
additional_data.QrDatastringRequiredQR data for payment.
statusstringRequiredPurchase status. PENDING means no additional data is required to continue the purchase flow.
Callback example
{
"additional_data": {
"QrData": "00020101021226480014A00000072701240011PKRAASTQR0112MOCK12345678952044111530358654061000.005802PK5912AMANPAY TEST6008KARACHI6304ABCD"
},
"operationId": 103315,
"transactionId": 103597,
"status": "PENDING"
}