To integrate the API, you will need a client ID and client secret, which will be provided during onboarding. Please follow the steps below to integrate.
base_url = https://pinelabs.paythrough.in/uat/api/v1
base_url = https://pinelabs.paythrough.in/api/v1
With the help of the client_id and client_secret, you can obtain an access token.
{{base_url}}/auth/get-token{
"client_id": "{{client_id}}",
"client_secret": "{{client_secret}}"
}
Status code: 200
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "bearer"
}
Status code: 401
{
"detail": "Invalid Credentials."
}
{{base_url}}/payments/by-upi/create{
"access_token": "your_access_token",
"token_type": "Bearer",
"order_reference": "{{random_order_reference}}",
"amount": {{required_amount}},
"firstname": "{{first_name}}",
"lastname": "{{last_name}}",
"phonenumber": "{{phone_number}}",
"email": "{{email}}"
}
Status code: 201
{
"message": "Intent created successfully",
"order_id": "",
"merchant_order_reference": "",
"status": "PENDING",
"intent_url": "",
"amount": 1.0,
"merchant_payment_reference": "",
"payment_id": "",
"timestamp": "",
"status_code": 201
}
Status code: 401
{
"detail": "Could not validate credentials"
}
Status code: 400 - 600
{
"code": "DUPLICATE_REQUEST",
"message": "Duplicate Merchant Reference ID received"
}
{
"code": "INVALID_REQUEST",
"message": "Amount must be an Integer value greater than or equal to 1"
}
{{base_url}}/orders/check-status-by-order-id/{{order_id}}Status code: 200
{
"order_id": "",
"merchant_order_reference": "",
"order_type": "",
"order_status": "",
"order_amount": 1,
"currency": "",
"payment_method": "",
"payer_vpa": ""
}
Status code: 400 - 600
{
"code": "INVALID_REQUEST",
"message": "Order ID is invalid"
}