"Payment gateway integration into your application"
✍️ Naresh Dhamu
📅 02/03/2025
URL: https://payapi.zezo.in/api/v1/payments/checkout
Method: POST
Headers:
Content-Type
: application/json
api-key
: {your_api_key}
secret-key
: {your_secret_key}
The request body should include the necessary details for creating a payment request.
{
"userId": "[userId in string format]", // required
"price": "[price in number format]", // required
"provider": "[provider in string format]", // required (stripe, razorpay, phonepe, ccavenue)
"metadata": {
"isPaymentInitiatedEnabled": true,
"userInfo": {
"name": "[name in string format]", // required
"email": "[email in string format]" // required
}
}
}
{
"userId": "66d2e734c67cf10fd3b46b86",
"price": 200,
"provider": "stripe",
"metadata": {
"isPaymentInitiatedEnabled": true,
"userInfo": {
"name": "John Doe",
"email": "john.doe@example.com"
}
}
}
Code : 200 OK
{
"price": 200,
"currency": "INR",
"provider": "stripe",
"real_price": 200,
"orderId": "23456789",
"publicKey": "123243566767899",
"status": true
}
Code : 400 Bad Request
{
"error": {
"type": "BadRequestError",
"msg": "message",
"path": "",
"location": ""
}
}
Code : 401 Unauthorized
{
"error": {
"type": "UnauthorizedError",
"status": 401,
"message": "error message",
"path": "",
"location": ""
}
}
Code : 500 Internal Server Error
{
"error": {
"type": "InternalServerError",
"status": 500,
"message": "error message",
"path": "",
"location": ""
}
}