Skip to main content

JazzCash

Accept payments

Receive payments from customers using their JazzCash wallet.

Send payouts

Send funds directly to a recipient's JazzCash wallet.

Integration

Available through Checkout and H2H integrations.

TypeE-wallet
CountryPakistan
CurrencyPKR
RefundNo
Changed amount

P2C - No
P2P - Yes

Operations

Purchase · Payout

Payment typesP2C · P2P
Purchase integrations

Checkout · H2H

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​

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 JazzCash 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 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.
jazzcashNumberstringOptionalCustomer'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.
returnUrlstringOptionalURL to redirect the customer to after they've completed a 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

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.

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 JazzCash.
jazzcashNumberstringOptionalCustomer's mobile phone number associated with their JazzCash e-wallet.
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": "JazzCash",
"JazzCashNumber": "03123456789"
}
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 — JazzCash App Confirmation​

Type

P2C

Integration

H2H

Channel

JazzCash App Confirmation

note

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​

Type

P2P

Integration

H2H

Channel

P2P Deposits

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.
additionalDataobjectRequiredContains payment details required to complete the purchase.
additionalData.receiverNamestringRequiredName of the recipient to whom the customer must transfer the funds.
additionalData.receiverAccountstringRequiredJazzCash wallet number to which the customer must transfer the funds.
additionalData.additionalFieldsstringRequiredAdditional field required to complete the purchase. Returns TrxId.
statusstringRequiredSPECIFICATION means additional payment details are required to continue the purchase flow.
Callback example
{
"additionalData": {
"receiverName": "Zaibun Nisa",
"receiverAccount": "03123456789",
"additionalFields": "TrxId"
},
"operationId": 1787315,
"transactionId": 1423544,
"status": "SPECIFICATION"
}
Check status example with payment details
{
"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.

ParameterValue
URLhttps://gateway.amanpay.io
API endpoint/payments/purchases/specify/{operationId}
HTTP request methodPOST
Request body formatJSON
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.
merchantIdintegerRequiredYour unique merchant ID provided by Amanpay during integration.
additionalFieldsobjectRequiredContains additional data required to complete the purchase.
additionalFields.TrxIdstringRequiredTransaction ID provided by the customer after completing the payment.
Specify request example
{
"transactionId": 102540,
"merchantId": 1758378,
"additionalFields": {
"TrxId": "12345678901"
}
}
Specify success response
{
"result_code": "OK"
}

Payout​

To initiate a payout with the JazzCash payment method, add the following parameters to your request.

ParameterValue
URLhttps://gateway.amanpay.io
API endpoint/payments/payouts/initiate
HTTP request methodPOST
Request body formatJSON
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 payout 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.
customerNamestringRequiredCustomer's full name.
paymentMethodstringRequiredPayment method's code. Pass jazzcash in this parameter.
recipientTypestringRequiredCustomer's account type. Pass mobile_wallet in this parameter.
recipientMobileNumberstringRequiredCustomer's mobile phone number associated with their JazzCash e-wallet.
note

For JazzCash, provide the recipient's mobile number in the following format: 03XXXXXXXXX (11 digits)

Request
{
"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"
}
Success response
{
"transactionId": "1003685",
"paymentID": "payment_812",
"status": "PENDING",
"amount": 500,
"currency": "PKR",
"paymentType": "payout"
}
Error response
{
"result_code": "DUPLICATE_PAYMENT_ID",
"result_message": "Payment ID already exists"
}

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