Integration Components
To integrate with VTPE, you must build and expose two endpoints:- Product Information API VTPE calls your GET endpoint to retrieve payment details before initiating a payment session. You return the amount, currency, and optional details to present to the customer.
- Webhook Endpoint VTPE POSTs payment lifecycle events to your Webhook URL. You receive events such as
payment.initialized,payment.success, andpayment.fail, and update your order records accordingly.
Configuration
You provide VTPE with the following two URLs during setup:
Both URLs must be publicly accessible over HTTPS. VTPE will append a reference identifier to the API URL when making payment detail requests.
End-to-End Flow
The following flow describes a full VTPE payment:- The customer initiates a payment through a VTPE-powered experience.
- VTPE calls
GET {API_URL}/{reference}to retrieve payment details from your system. - Your Product Information API returns the total amount, currency, and optional details.
- VTPE presents the payment experience to the customer using the returned information.
- The customer completes, fails, or cancels the payment.
- VTPE sends a
payment.successorpayment.failwebhook to your Webhook URL.
If the customer has already paid for a reference, return
409 Conflict with code ALREADY_PAID so VTPE can surface a clear error message.Authentication Flow
Both API calls from VTPE include authentication headers:Authorization: Bearer YOUR_API_SECRETX-Timestamp: 1717344000
X-Signature: GENERATED_SIGNATURE
