Payin Integration Guide
Accept UPI payments through a simple server-to-server API. Create an order, present the payment response to the customer, and process the final transaction result through callbacks or status checks.
Authentication Methods
Every API request must include both authentication headers. Keep the API key only on your secure backend and never expose it in browser or mobile application source code.
Merchant Identity
merchant-id
Identifies the merchant account making the request. This value is issued by PeBlaze.
API Credential
api-key
Authenticates the request. Treat this value as confidential and rotate it immediately if compromised.
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | Must be application/json |
| merchant-id | Yes | Your PeBlaze merchant identifier |
| api-key | Yes | Your confidential API credential |
Content-Type: application/json merchant-id: YOUR_MERCHANT_ID api-key: YOUR_API_KEY
Integration Flow
The recommended payment flow keeps sensitive credentials on your backend and treats callbacks as the final source of truth.
Your backend sends the order and customer details.
Use the returned payment response or intent in your app.
PeBlaze posts the final status to your callback URL.
Use the status API when reconciliation or confirmation is required.
Create Order
Creates a new payin transaction and returns the payment response required to continue the customer payment journey.
Request Fields
| Field | Type | Required |
|---|---|---|
| order_id | String | Yes |
| amount | Number | Yes |
| username | String | Yes |
| name | String | Yes |
| String | Yes | |
| mobile_number | String | Yes |
| user_id | String | Yes |
| channel_id | String | Yes |
curl --request POST \
--url https://api.peblaze.com/api/v1/payin/create-order \
--header 'Content-Type: application/json' \
--header 'merchant-id: YOUR_MERCHANT_ID' \
--header 'api-key: YOUR_API_KEY' \
--data '{
"order_id": "ORD1018",
"amount": 1,
"username": "testuser01",
"name": "Test User",
"email": "testuser@example.com",
"mobile_number": "9876543210",
"user_id": "USER101",
"channel_id": "TST"
}'Order Status
Retrieves the current state of an existing transaction using the PeBlaze transaction ID.
Request
Send the transaction ID returned during order creation.
curl --request POST \
--url https://api.peblaze.com/api/v1/payin/order-status \
--header 'Content-Type: application/json' \
--header 'merchant-id: YOUR_MERCHANT_ID' \
--header 'api-key: YOUR_API_KEY' \
--data '{
"transaction_id": "TST17837600783976870"
}'Callback Handling
Your callback endpoint should accept JSON, return HTTP 200 quickly, and process each transaction idempotently.
Implementation Rules
Store every callback payload, verify the transaction reference, avoid duplicate wallet or order updates, and acknowledge the request only after safely recording it.
Final Status
Treat the callback or verified order-status response as the final result. Do not mark the order successful only because the payment intent was generated.
The exact callback fields may vary by channel. Your integration should safely ignore unknown fields and preserve the complete raw payload.
{
"status": "SUCCESS",
"order_id": "ORD1018",
"transaction_id": "TST17837600783976870",
"amount": 1,
"utr": "123456789012"
}TST Channel Behaviour
Use the TST channel for predictable end-to-end testing before enabling a live payment channel.
Successful Test
An order number ending in an even digit, such as ORD1018, receives a successful callback.
Failed Test
An order number ending in an odd digit, such as ORD1017, receives a failed callback.
Transaction Statuses
| Status | Meaning | Merchant Action |
|---|---|---|
| INITIATED / PENDING | Payment is not yet final. | Wait for callback or verify using order-status. |
| SUCCESS | Payment completed successfully. | Fulfil the order exactly once. |
| FAILED | Payment was unsuccessful. | Mark the order failed and allow retry. |