Payment Links in Modem Pay are designed to help businesses collect payments effortlessly through a hosted checkout page. With a unique link, customers can be directed to pay for items or services without requiring code-intensive solutions or complicated integrations. Primary Use Cases:Documentation Index
Fetch the complete documentation index at: https://docs.modempay.com/llms.txt
Use this file to discover all available pages before exploring further.
- Single-Charge Payments: One-time payments, perfect for items or services.
- Recurring Payments (Subscriptions): Set up links for ongoing payments.
- Donations: Enable variable amounts for donation collections.
How it Works in Real Life
Payment Link Properties
Each Payment Link object includes the following fields:- id (string): Unique identifier.
- payment_link (string): URL to share with customers for payment.
- unique_code (string): Code used for tracking and managing the link.
- status (string):
"active"or"inactive", indicating availability. - type (string): Payment link type, such as
"single-charge","subscriptions", or"donations". - title (string): Title displayed on the checkout page.
- description (string): Brief description of the item or service.
- amount (number): Amount to be charged; leave blank to let customers enter their preferred amount.
- currency (string): Payment currency.
- redirect_url (string): URL for successful payments.
- cancel_url (string): URL if the customer cancels the payment.
- custom_fields (string[]): Fields to collect additional customer data.
Payment Link Operations
Modem Pay’s Payment Link API provides tools to create, retrieve, update, list, and delete links. Here’s how each operation works:1. Create a Payment Link
To create a Payment Link for course enrollment: Parameters:- title (optional): Title that appears on the checkout page.
- description (optional): Details of what’s being paid for (e.g., course title).
- amount (optional): Set payment amount, or leave blank to let customers enter their preferred amount.
- currency: Set the currency (e.g.,
"GMD"). - redirect_url: URL for successful payment redirection.
- cancel_url: URL for canceled payments.
- custom_fields (optional): Extra fields to collect additional data, such as the specific course name and student ID.
2. Retrieve a Payment Link
Retrieve details for a specific Payment Link by using its uniqueid:
3. Update a Payment Link
To modify an existing Payment Link, such as updating the amount, title, or status:- status:
"active"or"inactive". - title: Update the title shown on the checkout page.
- description: Modify the course details or description.
- amount: Adjust the payment amount.
- currency: Change the currency.
- redirect_url: Change the redirect URL.
- cancel_url: Change the cancel URL.
- custom_fields: Edit or add data fields.
4. List Payment Links
Get a list of all Payment Links for easy management:5. Delete a Payment Link
Remove an outdated or invalid Payment Link:Key Benefits of Using Payment Links
- Flexible: Customize details like amount, title, and form fields to fit each payment need.
- Reusable: Payment Links can be set to active or inactive and reused as necessary.
- Easy Sharing: Share the link through emails, SMS, or embed it on a website.
