Skip to content

Payment Endpoint Documentation

General Information

  • You can set your personal payment endpoint in the user settings. This must be a valid URL.
  • Ensure you only listen to incoming SecPaid Webhooks for security reasons.
  • This attribute is inherited by ALL links you create, whether through the UI or the API.
  • It is included in the response after creating a payment link.

Event Types

SecPaid supports two types of events:

  1. Successful Payment
  2. Payment Cancellation

Each event type has its own structure and purpose.

Successful Payment Event

Description

After a payment is successfully processed, SecPaid sends a notification to your Callback URL.

Webhook Structure

json { "ResponseCode": 1, "data[pay_id]": 1466, "data[amount]": 100, "data[user_id]": "0XXXXX28a-f8c8-416f-ab5e-39fadc7ec910", "data"[status]: "success" }

Payment Cancellation Event

Description

If a payment is cancelled (e.g., by pressing the cancel button), SecPaid sends a cancellation notification to your Callback URL.

Webhook Structure

json { "ResponseCode": 1, "data[pay_id]": 1466, "data[amount]": 100, "data[user_id]": "0XXXXX28a-f8c8-416f-ab5e-39fadc7ec910", "data[Status]": "cancel" }

Important Considerations

  • Replace 0XXXXX28a-f8c8-416f-ab5e-39fadc7ec910 with your actual user ID.
  • Ensure your server can handle HTTPS requests securely.
  • Implement proper error handling and logging for incoming webhooks.
  • Validate the ResponseCode before processing the webhook data.
  • Use the transaction_id for tracking purposes in your system.
  • Handle both success and cancellation events appropriately in your application logic.