Quickstart¶
Create your first payment link in under a minute.
Prerequisites¶
- A SecPaid account with an API Key (request one)
curlor any HTTP client
Create a Payment Link¶
const response = await fetch("https://app.secpaid.com/api/v2/createLink", {
method: "POST",
headers: {
"Content-Type": "application/json",
"token": "YOUR_API_KEY"
},
body: JSON.stringify({
amount: 49.99,
recipient_note: "Invoice #1234",
callback_url: "https://yoursite.com/payment/success"
})
});
const data = await response.json();
console.log(data.data.pay_link);
Response¶
{
"ResponseCode": 1,
"ResponseMsg": "Link created successfully",
"Result": "True",
"ServerTime": "CEST",
"data": {
"linktopay_id": 12345,
"pay_link": "https://app.secpaid.com/payment?link_id=MTIzNDU=",
"amount": "49.99",
"recipient_note": "Invoice #1234",
"status": "Unused",
"qr_img": "https://api.qrserver.com/v1/create-qr-code/?data=..."
}
}
What Happens Next¶
- Share the
pay_linkwith your customer (email, embed, QR code) - Customer opens the link and sees the SecPaid checkout page
- Customer pays via card or bank transfer
- You get notified:
- Browser redirect →
callback_urlwith?pay_id=12345&status=Success - Server webhook →
POSTto your configuredpayment_endpoint
- Browser redirect →
Next Steps¶
-
Webhooks & Callbacks
Get notified in real-time when payments complete.
-
Split Links
Distribute payments across multiple recipients.
-
Error Handling
Understand error codes and handle failures gracefully.
-
Try it Live
Interactive Swagger UI to test all endpoints.