Overview
The Create Payment Link endpoint generates a unique URL that customers can use to make payments. You can customize the payment amount, currency, expiration date, and collect additional information from customers during the payment process.Request Parameters
| Field | Type | Description | Required |
|---|---|---|---|
currency | string | The currency code for the payment (e.g., “USD”) | Required |
expiredAt | string | The expiration date and time for the payment link | Required |
name | string | The name or title of the payment link | Required |
amount | number | The payment amount | Required |
redirectTo | string | URL to redirect to after successful payment | Required |
amountLocked | boolean | Whether the amount is locked and cannot be changed | Optional |
customerPays | boolean | Whether the customer pays the processing fee | Optional |
customUrlPath | string | Custom URL path for the payment link | Optional |
dataCollections | array | Array of data collection fields for the payment form. Email, first name and last name are added by default | Optional |
customFields | array | Array of custom fields for the payment form | Optional |
isOpenLink | boolean | If set to false, the payment link will expire after first use | Optional |
acceptedPaymentOptions | array | Array of accepted payment methods | Optional |
externalId | string | End user account ID | Optional |
cartItems | object | List of cartItems | Required for ecommerce checkout |
Example Request
Example Response
Payment Link Features
Data Collection
You can collect additional information from customers during payment:- Default fields: Email, First Name, Last Name (automatically included)
- Additional fields: Phone, Address, Company, etc.
- Custom fields: Any additional information you need
Payment Options
Configure which payment methods to accept:- Card payments: Credit and debit cards
- Bank transfers: Direct bank transfers
- Mobile money: Mobile payment solutions
Link Behavior
- Single-use links: Set
isOpenLink: falseto expire after first payment - Reusable links: Set
isOpenLink: truefor multiple payments - Amount flexibility: Allow or prevent customers from modifying amounts
Use Cases
Invoice Payments
Ecommerce Checkout
Best Practices
- Set appropriate expiration dates - Give customers enough time to complete payment
- Use descriptive names - Help customers identify what they’re paying for
- Always provide redirectTo - Ensure customers know where they’ll be taken after payment
- Collect relevant data - Only ask for information you actually need
- Test payment flows - Always test in sandbox before going live
- Monitor payment status - Set up webhooks to track payment completion
- Use single-use links for invoices - Set
isOpenLink: falsefor one-time payments - Use reusable links for donations - Set
isOpenLink: truefor ongoing campaigns
Integration Tips
- Account linking: Use
externalIdto link payments to specific end user accounts - Seamless experience: Use
redirectToto provide a smooth post-payment flow - Webhook handling: Implement webhook processing to handle successful payments
- Custom branding: Use
customUrlPathfor branded, memorable payment URLs - Data management: Leverage the default email/name collection for user identification
Common Scenarios
E-commerce Checkout
- Use single-use links with locked amounts
- Input fields for shipping info are added by default