curl --location --request POST 'https://sandbox.sxdigitalpay.com/api/v1/payment-links' \
--header 'x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"title": "Payment title",
"description": "Payment Description",
"amount": 129.9,
"expiresAt": "{{$date.future}}",
"externalReference": "{{$string.uuid}}",
"metadata": null,
"webhookUrl": "https://merchant.com/webhooks/sxpay",
"webhookSecret": "WebhookSecretForWebhookValidation",
"callbackUrl": "https://merchant.com/checkout/success"
}'{
"success": true,
"paymentLink": {
"id": "pl_123",
"externalReference": "1b4db7eb-4057-5ddf-91e0-36dec72071f5",
"title": "Payment Title",
"description": "Payment Description",
"amount": 129.9,
"currency": "USD",
"status": "ACTIVE",
"isMultiUse": false,
"isActive": true,
"isExpired": false,
"expiresAt": "2025-01-31T23:59:59.000Z",
"url": "https://app.sxdigitalpay.com/quote/[merchantShortName]/[paymentLinkId]",
"shortUrl": "https://sxpay.me/[paymentLinkShortId]",
"metadata": null,
"callbackUrl": "https://merchant.com/checkout/success",
"paymentStatus": "NOT_STARTED",
"paymentsSummary": {
"total": 0,
"byStatus": {}
},
"payments": [],
"webhookUrl": "https://merchant.com/webhooks/sxpay",
"webhookSecret": "8f2c58c1c9a34f7e8b1a2c3d4e5f6789"
}
}