Actions4
- Link Actions
Overview
This node integrates with the PayTR Link API to manage payment links. It supports operations such as creating a new payment link, deleting an existing link, and sending the payment link via email or SMS. This is useful for businesses that want to generate payment requests dynamically and distribute them to customers through different channels.
Typical use cases include:
- Creating a payment link for a product or service and sharing it with customers.
- Deleting obsolete or incorrect payment links.
- Sending payment links directly to customers by email or SMS for quick payment processing.
For example, a merchant can create a payment link for a specific product, then send that link to a customer’s email or phone number to facilitate payment without needing a full e-commerce setup.
Properties
Name | Meaning |
---|---|
Link ID | The unique identifier of the payment link to delete or send (required for Delete, Send Email, Send SMS operations). |
Debug Mode | Enable debug mode for testing purposes; when enabled, additional debug information may be returned. |
Output
The node outputs JSON data representing the response from the PayTR API for each operation:
- Delete Operation: Returns the API response confirming whether the deletion was successful.
- Send Email Operation: Returns the API response indicating the status of the email sending request.
- Send SMS Operation: Returns the API response indicating the status of the SMS sending request.
The output JSON structure depends on the PayTR API's response format but generally includes success status and any relevant messages.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for authenticating with the PayTR API (merchant ID, key, and salt).
- Makes HTTP POST requests to PayTR endpoints:
https://www.paytr.com/odeme/api/link/delete
https://www.paytr.com/odeme/api/link/send-email
https://www.paytr.com/odeme/api/link/send-sms
- Uses SHA256 hashing to generate authentication tokens for API requests.
- Requires n8n HTTP Request helper and cryptographic functions.
Troubleshooting
Invalid Phone Number Format:
The phone number for sending SMS must start with "05" and be exactly 11 digits long. If this validation fails, the node throws an error:"Phone number must start with 05 and have 11 digits"
To fix, ensure the phone number matches the required pattern.API Authentication Errors:
If the merchant credentials are incorrect or missing, API calls will fail. Verify that the API key credential is correctly configured in n8n.Link ID Missing or Invalid:
For delete, send email, and send SMS operations, the Link ID is mandatory. Omitting it or providing an invalid ID will cause the API call to fail.Debug Mode:
Enabling debug mode may provide more detailed error messages from the API, which can help diagnose issues during development or testing.
Links and References
- PayTR Official API Documentation (general reference for API endpoints and parameters)
- SHA256 Hashing (used for token generation)