This API endpoint creates a payment page request on the Paygic database with a unique reference.
We used here axios node library. You can use any http module like Fetch, Plain HTTP request and more.
await axios.post(
"https://server.paygic.in/api/v2/createPaymentPage",
{
"mid": "string", // Merchant ID
"merchantReferenceId": "string", // Unique reference ID for the merchant
"amount": "string", // Transaction amount
"customer_mobile": "string", // Customer's mobile number
"customer_name": "string", // Customer's name
"customer_email": "string", // Customer's email
"redirect_URL": "string",// URL to redirect after success payment
"failed_URL": "string" // URL to redirect after fail payment
},
{
headers: {
token: "Your Auth Token"
}
}
);
//Response
{
"status": true,
"statusCode": 200,
"msg": "Payment Page created successfully",
"data": {
"payPageUrl": "https://pay.paygic.in/{pageId}",
"expiry": "5 minutes",
"amount": "string",
"paygicReferenceId": "string",
"merchantReferenceId": "string"
}
}