Payin Reconciliation
This API endpoint allows authorized users to retrieve payment transactions based on a specific pid (Partner ID) and date. The API performs authentication using a token and signature verification to ensure secure communication.
Authentication
Token-based Authentication: The API expects a
Tokenheader with a predefined token value.Signature Verification: A
signatureparameter in the request body is used to verify the authenticity of the request.
Retrieve payment transaction
POST {Domain}/api/reconcile_polling.php
Headers
Content-Type
application/json
Token: A required header for authentication. Must be set to:
Body
pid
string
Partner ID provided to you.
Yes
date
string
Date in DD-MM-YYYY format.
Yes
signature
string
SHA256 hash for signature verification (see below).
Yes
Signature Generation
To generate the signature, compute a SHA256 hash of the concatenated string:
signature = SHA256(pid + secret_key + date)Example Signature Generation in PHP
Response
Success Response
Response Data Fields
orderCreateDateTime
String
The date and time when the order was created.
statusChangeDateTime
String
The date and time when the transaction status changed.
order_id
String
The unique identifier for the customer's order.
ref_code
String
A reference code associated with the transaction.
amount_requested
Integer
The amount requested in the transaction (in smallest currency unit).
amount_received
Integer
The actual amount received (in smallest currency unit).
transaction_status
String
The current status of the transaction (e.g., Approved).
bank_ref
String
Bank reference number or UTR (Unique Transaction Reference).
Error Responses
Unauthorized Access
Verification Failed
Invalid User
Missing Parameters
Invalid Date Format
Example Request
cURL Example
Notes
Placeholders: Replace
"your_pid","your_secret_key", and other placeholders with actual values provided to you.Date Format: The
dateparameter must be in the formatDD-MM-YYYY. For example,31-12-2023.
Rate Limiting
Each
pidis allowed a maximum of 10 API calls per day for this endpoint.If the limit is reached, the API will respond with:
Status Code:
400 Bad Request
Troubleshooting
Invalid Token: Verify that the
Tokenheader is correctly set and matches the required token.Signature Mismatch: Ensure that the
signatureis correctly computed using the SHA256 hash of the concatenated string ofpid,secret_key, anddate.Date Format Issues: Double-check that the
dateparameter follows theDD-MM-YYYYformat and represents a valid date.
Security Considerations
Keep the
secret_keyconfidential: Do not expose it in client-side code or logs.Use HTTPS: Ensure that all requests to the API are made over HTTPS to protect data in transit.
Validate Responses: Always check the
statusfield in the response to determine if the request was successful.
Change Log
Version 1.0: Initial release of the API documentation.
FAQs
Q1: What should I do if I receive a "Verification failed" message?
Ensure that you're generating the
signaturecorrectly using the concatenation ofpid,secret_key, anddatein that exact order.Verify that the
secret_keyused matches the one associated with yourpid.
Q2: How can I reset my API limit if I reach the maximum number of calls?
The API limit resets every day at midnight.
Q3: What time zone is used for the date and time fields?
All date and time fields are in the IST time zone. Please adjust accordingly.
Last updated