SX Digital Pay
  1. PaymentLinks
SX Digital Pay
  • Getting started
  • Authentication
  • Webhook Validation
  • Webhook Delivery System
  • Recommended workflows
  • Merchant
    • Get merchant profile
      GET
  • PaymentLinks
    • Create single-use payment link
      POST
    • List single-use payment links
      GET
    • Get link details
      GET
  • Webhooks
    • Link created
    • Link status changed
    • Link paymentStatus changed
  1. PaymentLinks

Get link details

Sandbox
https://sandbox.sxdigitalpay.com/api/v1
Sandbox
https://sandbox.sxdigitalpay.com/api/v1
GET
https://sandbox.sxdigitalpay.com/api/v1
/payment-links/{id}
Returns a single-use payment link, its payments, and an aggregated paymentStatus field that tells whether the link has any completed payment.

Request

Authorization
API Key
Add parameter in header
x-api-key
Example:
x-api-key: ********************
or
Path Params

Responses

🟢200
application/json
Link found.
Headers

Body

🟠401Unauthorized
🟠403Forbidden
🟠404NotFound
🟠429TooManyRequests
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://sandbox.sxdigitalpay.com/api/v1/payment-links/' \
--header 'x-api-key: <api-key>'
Response Response Example
200 - Success
{
    "success": true,
    "paymentLink": {
        "id": "01KDKKVSH6NDQPBZ5E1F54G8Q6",
        "externalReference": "1b4db7eb-4057-5ddf-91e0-36dec72071f5",
        "title": "Payment Title",
        "description": "Payment Description",
        "amount": 129.9,
        "currency": "USD",
        "status": "INACTIVE",
        "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",
        "webhookUrl": "https://merchant.com/webhooks/sxpay",
        "paymentStatus": "COMPLETED",
        "paymentsSummary": {
            "total": 2,
            "byStatus": {
                "PENDING": 1,
                "COMPLETED": 1
            }
        },
        "payments": [
            {
                "id": "01KDKKX5W57ZJGR0RAVERADSZ4",
                "status": "PENDING",
                "createdAt": "2024-12-05T18:25:00.000Z",
                "completedAt": null,
                "availableAt": null,
                "customer": {
                    "name": "Jane Doe",
                    "email": "jane@example.com"
                },
                "quote": {
                    "amount": 129.9,
                    "currency": "USD",
                    "paymentMethod": "CREDIT_CARD",
                    "installments": 1,
                    "totalBRL": 658.35
                }
            },
            {
                "id": "01KDKKXTCFV7KVJV14XBM9ASEG",
                "status": "COMPLETED",
                "createdAt": "2024-12-05T18:15:00.000Z",
                "completedAt": "2024-12-05T18:18:00.000Z",
                "availableAt": "2024-12-07T12:00:00.000Z",
                "customer": null,
                "quote": {
                    "amount": 129.9,
                    "currency": "USD",
                    "paymentMethod": "PIX",
                    "installments": 1,
                    "totalBRL": 658.35
                }
            }
        ],
        "createdAt": "2024-12-05T18:20:00.000Z"
    }
}
Previous
List single-use payment links
Next
Link created
Built with