REST API JSON Version v1
PeBlaze Developer Platform

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.

Production Base URLhttps://api.peblaze.com
AuthenticationMerchant ID + API Key
Content Typeapplication/json

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.

Required Request Headers
HeaderRequiredDescription
Content-TypeYesMust be application/json
merchant-idYesYour PeBlaze merchant identifier
api-keyYesYour 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.

1Create Order

Your backend sends the order and customer details.

2Show Payment

Use the returned payment response or intent in your app.

3Receive Callback

PeBlaze posts the final status to your callback URL.

4Verify Status

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.

POST https://api.peblaze.com/api/v1/payin/create-order

Request Fields

FieldTypeRequired
order_idStringYes
amountNumberYes
usernameStringYes
nameStringYes
emailStringYes
mobile_numberStringYes
user_idStringYes
channel_idStringYes
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.

POST https://api.peblaze.com/api/v1/payin/order-status

Request

Send the transaction ID returned during order creation.

Recommended useUse this endpoint for reconciliation, delayed callback checks, or transaction confirmation. Do not continuously poll at a high frequency.
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.

Illustrative Callback Payload

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.

Automatic test callback For channel_id: TST, PeBlaze sends a callback within approximately 10 seconds. The callback result is determined by the last digit of your order_id.
EVEN → SUCCESS

Successful Test

An order number ending in an even digit, such as ORD1018, receives a successful callback.

ODD → FAILED

Failed Test

An order number ending in an odd digit, such as ORD1017, receives a failed callback.

Transaction Statuses

StatusMeaningMerchant Action
INITIATED / PENDINGPayment is not yet final.Wait for callback or verify using order-status.
SUCCESSPayment completed successfully.Fulfil the order exactly once.
FAILEDPayment was unsuccessful.Mark the order failed and allow retry.
Production Checklist Use HTTPS for all API and callback traffic, whitelist trusted PeBlaze traffic where applicable, keep credentials on the server, implement idempotency, log raw callbacks, and reconcile transaction status before settling customer orders.