Admin Panel
...
Admin settings
Payment methods (Global)
Custom PG Documentation
this guide helps you integrate your payment provider with our system using our custom payment gateway setup we support redirect based checkout for customers webhook based confirmation for payment status π step 1 setup & authentication to integrate with our system, you need to provide key description url base url of your payment api auth token token used for authentication (both api & webhook) youβll set these values in the admin panel while configuring your payment gateway π note the auth token is used as a bearer token in the authorization header during payment creation the authorization header when your system sends the webhook π§Ύ step 2 creating a payment when a customer places an order, weβll call your url with the following request βΆοΈ sample request we will send this payload to your system { "amount" 25000, // in minor units (e g , paise, cents) "currency" "inr", "customer name" "john doe", "customer email" "john\@example com" "customer phone" "+911234567890", "reference id" "order123 intent456", // unique reference "return url" "https //example com/payment/success", "cancel url" "https //example com/payment/fail" } π headers authorization bearer your auth token content type application/json your system should return a payment url where we redirect the user β
expected response { "payment url" "https //yourpaymentgateway com/checkout/txn123" } the user is redirected to this payment url to complete the payment π step 3 sending webhooks (required) once the transaction is complete (either success or failure), your system must notify us via webhook π¬ webhook url your unique webhook url is auto generated and visible in the admin panel under the βenvironmentβ tab it looks like https //api hyperzod app/public/v1/payment/pg/webhook/custompg/{tenant id} π¦ webhook payload send a post request to the webhook url with the following structure { "transaction id" "txn123456", "transaction status" "completed", // completed / failed "reference id" "order123 intent456", "currency code" "inr", "amount" 25000, "tenant id" "your tenant id" } π webhook headers authorization bearer your auth token content type application/json π transaction status values value description completed payment successful failed payment failed any other status will be treated as pending β
webhook validation we validate the authorization header in the webhook request if the token doesnβt match what you set in the panel, weβll reject the request β
make sure your webhook server handles retries in case of temporary failure