MyTPE is getting a fresh new look! A simpler, faster platform is on the way. Learn more →
MyTPEMyTPE Pay
Webhooks

Webhook Overview

Receive real-time notifications when payment events occur on your MyTPE Pay instance.

Webhooks

Webhooks allow your application to receive real-time HTTP notifications when events occur on your MyTPE Pay instance — such as a successful payment, a failed transaction, or a link status change.

Instead of polling the API to check for updates, MyTPE Pay pushes data to your server the moment something happens.

Stripe-like Security

MyTPE Pay webhooks follow the same security model as Stripe and PayPal — every webhook is signed with HMAC-SHA256, includes a timestamp for replay protection, and a unique delivery ID for idempotency.

How It Works

Benefits

  • Real-time — Get notified instantly when a transaction status changes
  • Secure — Every request is signed with your unique secret key
  • Reliable — Automatic retries with exponential backoff (3 attempts)
  • Idempotent — Each delivery has a unique ID to prevent duplicate processing
  • Simple — Just provide a URL, we handle the rest

What You Can Track

Transaction Events

EventDescription
transaction.completedPayment was successful
transaction.failedPayment failed or timed out
transaction.refusedPayment was refused by the bank
transaction.pendingTransaction is awaiting payment
transaction.processingPayment is being processed
EventDescription
pay_link.createdNew payment link created
pay_link.updatedLink details changed
pay_link.activatedLink set to active
pay_link.deactivatedLink manually deactivated
pay_link.closedLink closed (max payments reached)
pay_link.expiredLink expired
pay_link.deletedLink deleted

Quick Start

Configure your webhook URL

Go to your MyTPE Pay instance settings and enter your HTTPS endpoint URL. A signing secret (whsec_...) is automatically generated.

Copy your signing secret

Store it securely in your server's environment variables.

Implement the endpoint

Create a POST endpoint on your server that receives JSON payloads and verifies the signature.

Process events

Parse the event type and transaction data to update your system accordingly.

Next Steps

On this page