JazzCash
Receive payments from customers using their JazzCash wallet.
Send funds directly to a recipient's JazzCash wallet.
Available through Checkout and H2H integrations.
P2C - No
P2P - Yes
JazzCash is a digital wallet and mobile financial service available in Pakistan. Amanpay supports JazzCash for both customer payments and payouts.
For purchases, customers can pay using their JazzCash wallet through Checkout or H2H integration.
For payouts, funds are sent directly to the recipient's JazzCash wallet using their mobile number.
Purchase
JazzCash 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 JazzCash 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 jazzcash 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. |
jazzcashNumber | string | Optional | Customer's mobile phone number associated with their JazzCash 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. |
{
"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
JazzCash purchases are available through Host-to-Host integration.
Request parameters
To initiate a purchase with the JazzCash 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 JazzCash. |
jazzcashNumber | string | Optional | Customer's mobile phone number associated with their JazzCash e-wallet. |
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": "JazzCash",
"JazzCashNumber": "03123456789"
}
{
"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 — JazzCash App Confirmation
P2C
H2H
JazzCash App Confirmation
Provide the customer's JazzCash mobile number in the request. The customer will receive a payment notification in their JazzCash app and can confirm the payment directly in the app. No additional action is required from the merchant.
Channel 2 · JazzCash P2P
P2P
H2H
P2P Deposits
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. |
additionalData | object | Required | Contains payment details required to complete the purchase. |
additionalData.receiverName | string | Required | Name of the recipient to whom the customer must transfer the funds. |
additionalData.receiverAccount | string | Required | JazzCash wallet number to which the customer must transfer the funds. |
additionalData.additionalFields | string | Required | Additional field required to complete the purchase. Returns TrxId. |
status | string | Required | SPECIFICATION means additional payment details are required to continue the purchase flow. |
{
"additionalData": {
"receiverName": "Zaibun Nisa",
"receiverAccount": "03123456789",
"additionalFields": "TrxId"
},
"operationId": 1787315,
"transactionId": 1423544,
"status": "SPECIFICATION"
}
{
"transactionId": "1423544",
"paymentID": "ORDER_100001_459_917",
"status": "SPECIFICATION",
"amount": 2500,
"currency": "PKR",
"paymentType": "purchase",
"additionalData": {
"receiverName": "Zaibun Nisa",
"receiverAccount": "03123456789",
"additionalFields": "TrxId",
"operationId": 104018
}
}
Upon receiving this callback, display the payment details to the customer. After the customer completes the transfer and provides the transaction ID (TrxId), submit it to Amanpay using the following request.
| Parameter | Value |
|---|---|
| URL | https://gateway.amanpay.io |
| API endpoint | /payments/purchases/specify/{operationId} |
| HTTP request method | POST |
| Request body format | JSON |
| 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. |
merchantId | integer | Required | Your unique merchant ID provided by Amanpay during integration. |
additionalFields | object | Required | Contains additional data required to complete the purchase. |
additionalFields.TrxId | string | Required | Transaction ID provided by the customer after completing the payment. |
{
"transactionId": 102540,
"merchantId": 1758378,
"additionalFields": {
"TrxId": "12345678901"
}
}
{
"result_code": "OK"
}
Payout
To initiate a payout with the JazzCash payment method, add the following parameters to your request.
| Parameter | Value |
|---|---|
| URL | https://gateway.amanpay.io |
| API endpoint | /payments/payouts/initiate |
| HTTP request method | POST |
| Request body format | JSON |
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 payout 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. |
customerName | string | Required | Customer's full name. |
paymentMethod | string | Required | Payment method's code. Pass jazzcash in this parameter. |
recipientType | string | Required | Customer's account type. Pass mobile_wallet in this parameter. |
recipientMobileNumber | string | Required | Customer's mobile phone number associated with their JazzCash e-wallet. |
For JazzCash, provide the recipient's mobile number in the following format: 03XXXXXXXXX (11 digits)
{
"merchantId": 123,
"paymentId": "payment_812",
"amount": 500,
"currency": "PKR",
"customerId": "customer174",
"customerEmail": "mark_cooper@example.com",
"customerName": "Mark Cooper",
"paymentMethod": "JazzCash",
"recipientType": "mobile_wallet",
"recipientMobileNumber": "03121234567"
}
{
"transactionId": "1003685",
"paymentID": "payment_812",
"status": "PENDING",
"amount": 500,
"currency": "PKR",
"paymentType": "payout"
}
{
"result_code": "DUPLICATE_PAYMENT_ID",
"result_message": "Payment ID already exists"
}
For the full list of possible responses, see Responses & Callbacks.