Tokenization Initiate Easypaisa
Initiate a tokenization payment using the customer's msisdn and amount.
Endpoint
| Method | POST |
| Path | /v2/wallets/transaction/initiate |
| Sandbox | https://sandbox.simpaisa.com/v2/wallets/transaction/initiate |
| Production | https://payin.simpaisa.com/v2/wallets/transaction/initiate |
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 |
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 |
transactionId | Uniquely generated ID to track every transaction |
Sample
curl --location 'https://sandbox.simpaisa.com/v2/wallets/transaction/initiate' \
--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"
}'
- Request
- Successful response
{
"merchantId": "2000XXX",
"operatorId": "10000X",
"amount": "100",
"userKey": "XXXX",
"transactionType": "8",
"msisdn": "3XXXXXX",
"productReference": "xxxx"
}
{
"status": "0000",
"message": "Success",
"msisdn": "3xxxxxxxxxx",
"amount":"100",
"operatorId": "10000x",
"merchantId": "200000x",
"transactionId": "xxxxxxx"
}
After Initiate, an OTP is sent to the customer. Proceed to Verify.