PayTR icon

PayTR

Interact with PayTR Link API

Actions4

Overview

This node integrates with the PayTR Link API to manage payment links. It supports creating payment links, deleting them, and sending these links to customers via email or SMS. This is useful for businesses that want to generate payment requests dynamically and send them directly to customers for quick and easy payments.

For example:

  • Creating a payment link for a product or service and sharing it with a customer.
  • Deleting an expired or invalid payment link.
  • Sending a payment link reminder via email.
  • Sending a payment link via SMS to a customer's phone number.

The "Send SMS" operation specifically sends an existing payment link to a specified phone number, ensuring the number format is valid before making the request.

Properties

Name Meaning
Link ID The unique identifier of the payment link to delete or send (required for delete/send ops).
Phone Number The recipient's phone number to send the SMS to; must start with "05" and be 11 digits long.
Debug Mode Enables debug mode for testing purposes, which may provide additional information in responses.

Output

The node outputs JSON data returned from the PayTR API for each operation. The structure varies depending on the operation but generally includes status and message fields indicating success or failure of the requested action.

For the "Send SMS" operation, the output JSON contains the API response confirming whether the SMS was sent successfully or if there were errors.

No binary data is output 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 using URL-encoded form data.
  • Uses SHA256 hashing to generate a security token (paytr_token) required by the API.
  • The node expects proper configuration of credentials within n8n to access the PayTR service.

Troubleshooting

  • Invalid Phone Number Format: The phone number must start with "05" and be exactly 11 digits. If this validation fails, the node throws an error before making the API call.
  • API Authentication Errors: Incorrect or missing merchant credentials will cause authentication failures. Ensure the API key credential is correctly set up.
  • Network or API Errors: Issues connecting to the PayTR API or unexpected responses should be checked by enabling debug mode to get more detailed error messages.
  • Missing Required Parameters: Operations like "Send SMS" require both Link ID and Phone Number; missing these will cause errors.

Links and References

Discussion