Description: Initiates a transaction from customer to merchant via secure channel.
https://stanzape.com/api/uat/payin/init/
Content-Type: application/json
"X-Signature: " . base64_encode(hash_hmac('sha256', $json_body, $shared_secret, true))
| Language | Core Logic |
|---|---|
| Node.js | crypto.createHmac('sha256', key).update(message).digest('base64') |
| Python | base64.b64encode(hmac.new(key, msg, hashlib.sha256).digest()).decode() |
| Java | Base64.getEncoder().encodeToString(mac.doFinal(message.getBytes())) |
| PHP | base64_encode(hash_hmac('sha256', $message, $key, true)) |
{
"orderdata": {
"orderid": "ORD2025010112562223",
"userid": "1111199999",
"mobile": "1111199999",
"name": "Sahil",
"email": "test@gmail.com"
},
"paymentdata": {
"amount": 100.00,
"currency": "INR",
"mode": "PAY"
},
"merchantdata": {
"mid": "XXXXXX02",
"authkey": "XXXXXXXXXXXXXXstanzakey"
}
}
| Field | Type | Required | Description |
|---|---|---|---|
| orderid | String | Yes | Unique order reference |
| userid | String | Yes | Customer or User ID |
| mobile | String | Yes | Customer phone number |
| name | String | Yes | Customer Name |
| String | Yes | Email address of customer | |
| amount | Decimal | Yes | Amount to charge |
| currency | String | Yes | Currency (e.g., INR) |
| mode | String | Yes | Payment mode (UPI_INTENT) |
| mid | String | Yes | Merchant ID issued by StanzaPe |
| authkey | String | Yes | Authentication token for API access |
{
"status": "STANZA001",
"message": "Transaction successful",
"transactionid": "TXN1234567890",
"orderid": "ORD2025010112562223",
"amount": 100.00,
"currency": "INR",
"timestamp": "2025-07-23T22:15:00+05:30",
"paymenturl": "upi://pay?pa=xxx@upi&pn=Merchant&am=100" / "https://stanzape.com/pay?id=ORD2025010112562223"
}
{
"message": "STANZA002", /*Status Code*/
"message": "Error Msg"
}
| Status | Code | Meaning |
|---|---|---|
| ✅ | STANZA001 | Request processed successfully |
| ⚠️ | STANZA002 | Bad Request – Invalid or missing params |
| 🔐 | STANZA003 | Unauthorized – Invalid auth key |
| 💥 | STANZA004 | Server error – try again later |
All API calls must include an X-Signature header. The value should be an HMAC SHA256 hash of the raw JSON body using your shared secret key.
"X-Signature: " . base64_encode(hash_hmac('sha256', $json_body, $shared_secret, true))
X-Signature before processingAfter a successful transaction, StanzaPe will send a webhook notification to your registered webhook URL.
{
"status": "STANZA001",
"message": "Callback Sent Successfully",
"data": {
"orderid": "ORD2025010112562223",
"status": "TXN_SUCCESS",/"TXN_FAILURE",/"PENDING",
"amount": "100.00",
"utr": "287314698139"
}
}
Description: Check the transaction status using the orderid.
https://stanzape.com/api/uat/payin/status/
Content-Type: application/json
"X-Signature: " . base64_encode(hash_hmac('sha256', $json_body, $shared_secret, true))
{
"request": {
"orderid": "ORD2025010112562223"
},
"merchantdata": {
"mid": "XXXXXX02",
"authkey": "XXXXXXXXXXXXXXstanzakey"
}
}
{
"status": "STANZA001",
"message": "Order Found",
"order": {
"orderid": "ORD2025010112562223",
"amount": "100.00",
"status": "TXN_SUCCESS",/"TXN_FAILURE",/"PENDING",
"created_at": "2025-07-23T22:15:00+05:30",
"utr": "287314698139"
}
}
{
"status": "STANZA002",
"message": "Error Msg"
}
If you're facing issues or need integration support, Email: support@stanzape.com or connect with our team.