Skip to content

Quickstart

Create your first payment link in under a minute.

Prerequisites

  • A SecPaid account with an API Key (request one)
  • curl or any HTTP client
curl -X POST https://app.secpaid.com/api/v2/createLink \
  -H "Content-Type: application/json" \
  -H "token: YOUR_API_KEY" \
  -d '{
    "amount": 49.99,
    "recipient_note": "Invoice #1234",
    "callback_url": "https://yoursite.com/payment/success"
  }'
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 = Http::withHeaders([
    'token' => 'YOUR_API_KEY',
])->post('https://app.secpaid.com/api/v2/createLink', [
    'amount' => 49.99,
    'recipient_note' => 'Invoice #1234',
    'callback_url' => 'https://yoursite.com/payment/success',
]);

$payLink = $response->json()['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

  1. Share the pay_link with your customer (email, embed, QR code)
  2. Customer opens the link and sees the SecPaid checkout page
  3. Customer pays via card or bank transfer
  4. You get notified:
    • Browser redirect → callback_url with ?pay_id=12345&status=Success
    • Server webhook → POST to your configured payment_endpoint

Next Steps

  • Webhooks & Callbacks


    Get notified in real-time when payments complete.

    Configure

  • Split Links


    Distribute payments across multiple recipients.

    Split Payments

  • Error Handling


    Understand error codes and handle failures gracefully.

    Errors

  • Try it Live


    Interactive Swagger UI to test all endpoints.

    API Explorer