Skip to main content

Initiate E-Bill (Payment Via Voucher)

Generate a payment voucher (token) for the customer to pay via their bank portal or mobile banking app. See the E-Billing overview for the P2B/B2B concept, operator ID, and how tokens work.


Endpoint

MethodPOST
Path/v2/payment/transaction/initiate
Sandboxhttps://sandbox.simpaisa.com/v2/payment/transaction/initiate
Productionhttps://ibft.simpaisa.com/v2/payment/transaction/initiate

Request Body

ParameterRequiredTypeLengthDescription
merchantIdYesString07Unique merchant ID
amountYesStringN/ATotal amount to be paid
userKeyYesStringN/AMerchant key to track the transaction
msisdnYesString10Customer contact number
transactionTypeYesString01Payment type — one-time, recursive, or tokenized
expiryDurationYesStringN/AToken expiry, e.g. 2d or 6h
operatorIdYesString06Payment channel ID (100011)

Response Body

ParameterDescription
statusSimpaisa response code
messageHuman-readable explanation
merchantIdMerchant identifier
operatorIdPayment channel ID
paymentTokenUnique token the customer uses to pay via e-banking or mobile wallet
transactionIdSimpaisa transaction ID — store for Inquire
amountTransaction amount
dateCreatedTimestamp when the payment token was generated
paymentTokenExpiryDateTimeTimestamp when the token expires

Samples

Sample Request

{
"merchantId": "xxxxxxx",
"amount": "xxxx",
"userKey": "xxxxxx",
"msisdn": "xxxxxxxxx",
"transactionType": "3",
"expiryDuration": "2d",
"operatorId": 100011
}

Successful Response

{
"status": "0000",
"message": "Success",
"merchantId": "xxxxxx",
"operatorId": "100011",
"paymentToken": "xxxxxxxxxxxxxxxxxxxx",
"transactionId": "xxxxxxxx",
"amount": "xxxx",
"dateCreated": "xxxxxxx",
"paymentTokenExpiryDateTime": "xxxxxxx"
}

E-Billing Postback (IPN)

When the customer pays, Simpaisa sends an async notification to your configured postback URL:

{
"status": "0000",
"message": "Success",
"merchantId": "20000XX",
"operatorId": "100011",
"paymentToken": "10007714409644242324",
"transactionId": "xxxxxxxx",
"amount": "xxxx",
"dateCreated": "xxxxxxx",
"paymentTokenExpiryDateTime": "xxxxxxx",
"datePaid": "xxxxxx"
}

Return HTTP 200 to acknowledge receipt.