Get a payment link by ID
Retrieves a payment link with all related data including: - Line items with prices and products - Custom fields with dropdown options - After-completion settings
Retrieves a payment link with all related data including:
- Line items with prices and products
- Custom fields with dropdown options
- After-completion settings
Authorization
api-key API key for merchant integrations. Send as Authorization: Bearer <your key>.
In: header
Path Parameters
Payment link ID
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/payment-links/string"{ "id": "plink_abc123", "object": "payment_link", "merchantId": "mer_xyz789", "active": true, "expiresAt": "string", "currency": "EGP", "computedAmount": 100000, "nameCollection": false, "billingAddressCollection": false, "shippingAddressCollection": false, "phoneNumberCollection": false, "allowPromotionCodes": false, "submitType": "PAY", "customerCreation": "always", "afterCompletion": { "type": "redirect", "redirect": { "url": "string" }, "hostedConfirmation": { "customMessage": "string", "returnUrl": "string" } }, "lineItems": [ { "id": "string", "quantity": 0, "price": {}, "adjustableQuantity": {}, "amountSubtotal": 0, "amountTotal": 0, "amountDiscount": 0, "amountTax": 0, "currency": "EGP", "description": "string", "presentmentDetails": {} } ], "customFields": [ { "key": "string", "label": "string", "type": "TEXT", "isOptional": true, "hasLimits": true, "limitType": "AT_MOST", "minCharacters": 0, "maxCharacters": 0, "dropdownOptions": [ null ], "text": {}, "numeric": {}, "dropdown": {} } ], "feeConfig": { "feesPassThrough": true, "vatCollectionEnabled": true, "vatCollectionRate": 0 }, "metadata": { "property1": null, "property2": null }, "brandingSettings": { "colorMode": "light", "borderStyle": "rounded", "spacing": "condensed", "inputSize": "small", "inputStyle": "flat", "formLayout": "compact", "colors": { "primary": "string", "primaryForeground": "string", "background": "string", "foreground": "string", "border": "string", "input": "string", "ring": "string", "muted": "string", "mutedForeground": "string", "accent": "string", "accentForeground": "string", "destructive": "string" }, "fontFamily": "string" }, "paymentMethodConfigurationId": "string", "createdAt": "string", "updatedAt": "string"}Create a payment link POST
Creates a new payment link — a shareable URL you can send to customers. Features: - Supports multiple line items with adjustable quantities - Custom fields for collecting additional customer information - After-completion settings (redirect or hosted confirmation) - Automatic amount calculation from line items - Validates currency consistency across line items
Update a payment link PATCH
Partially updates an existing payment link. Only provided fields will be updated. Features: - Partial updates: only send fields you want to update - Updates line items with adjustable quantities (if provided, replaces all existing line items) - Updates custom fields (if provided, replaces all existing custom fields) - Updates after-completion settings (if provided, replaces existing settings) - Recalculates amount from line items when line items are updated - Validates currency consistency across line items when line items are updated Notes: - If `lineItems` is provided, all existing line items are replaced - If `customFields` is provided, all existing custom fields are replaced - If `customFields` is an empty array, all custom fields are removed - `expiresAt` can be set to `null` to remove expiration