Tokenization Verify Easypaisa
Once the payment is initiated, the mobile wallet triggers an OTP on the customer's account, leading to a flash-message or in-app approval. If the customer approves, the amount is deducted from their account.
Endpoint
| Method | POST |
| Path | /v2/wallets/transaction/verify |
| Sandbox | https://sandbox.simpaisa.com/v2/wallets/transaction/verify |
| Production | https://payin.simpaisa.com/v2/wallets/transaction/verify |
Headers
| Header | Required | Description |
|---|---|---|
Content-Type | Yes | application/json |
mode | Yes | payin |
region | Yes | PK |
operatorId | Yes | 100007 |
version | Yes | 3.0 |
Request Parameters
| Parameter | Required | Type | Length | Description |
|---|---|---|---|---|
merchantId | Yes | String | 7 | A unique ID provided by Simpaisa to represent each merchant |
operatorId | Yes | String | 6 | Payment channel ID |
amount | Yes | String | — | Amount to charge |
userKey | Yes | String | — | A key generated by the merchant to track the transaction |
transactionType | Yes | String | 2 | Payment type — one-time charge, recurring, or tokenized |
msisdn | Yes | String | 10 | Customer contact number linked to the wallet account |
productReference | Yes | String | — | A brief description of the product being sold |
otp | Yes | String | 10 | A one-time password sent via SMS to validate the transaction |
Response Parameters
| Parameter | Description |
|---|---|
status | A Simpaisa response code indicating whether your request succeeded or failed |
message | A human-readable explanation corresponding to the status code |
msisdn | Customer contact number linked to the wallet account |
operatorId | Payment channel ID |
merchantId | A unique ID provided by Simpaisa to represent each merchant |
sourceId | A Simpaisa-issued token referencing the customer's saved wallet credentials, used in follow-up tokenized payments to charge the account without re-authentication |
transactionId | Uniquely generated ID to track every transaction |
Sample
curl --location 'https://sandbox.simpaisa.com/v2/wallets/transaction/verify' \
--header 'Content-Type: application/json' \
--header 'mode: payin' \
--header 'region: PK' \
--header 'operatorId: 100007' \
--header 'version: 3.0' \
--data '{
"merchantId": "2000XXX",
"operatorId": "100007",
"amount": "100",
"userKey": "XXXX",
"transactionType": "8",
"msisdn": "3XXXXXX",
"productReference": "xxxx",
"otp": "XXXX"
}'
- Request
- Successful response
{
"merchantId": "2000XXX",
"operatorId": "10000X",
"amount": "100",
"userKey": "XXXX",
"transactionType": "8",
"msisdn": "3XXXXXX",
"productReference": "xxxx",
"otp": "XXXX"
}
{
"status": "xxxxxx",
"message": "xxxxxx",
"msisdn": "xxxxxxxxx",
"amount": "100",
"operatorId": "xxxxxxxx",
"merchantId": "xxxxxxxx",
"sourceId": "sp_xxxxxxxxxxxxxxxx",
"transactionId": "xxxxxxxxx"
}
info
The sourceId (SP token) is used for Direct Charge or Delink of the customer's account.