Sandbox and live credentials
Each connection can hold a set of sandbox (test) credentials and a set of live credentials. On the gateway page, choose Sandbox or Live under Environment, fill in the fields and click Connect. The label (saved: Live) or (saved: Sandbox) shows which environment the connection is using.
- Saved values are never shown again. A saved field is marked
(saved): leave it blank to keep it, or type a new value to replace it. - Click Test Connection to check the values you typed with the gateway before you save them.
- A live account only uses connections saved in
Live. A test-mode account never charges a live connection.
Register the webhook URL
Webhooks are how your gateway tells PaymentHooks that a payment succeeded, failed or was refunded. Without them, payment statuses may not update.
- 1Open the gateway's page in Gateways > Marketplace.
- 2In
Webhook & routing, click Copy next toWebhook URL. - 3Paste it into the webhook settings of your account in the gateway's own dashboard.
- 4If the gateway gives you a signing secret, paste it into the connection's secret field, for example
Webhook Signing Secret, and save.
Webhook signing secret not set, that gateway's webhooks for this connection are rejected until you save the secret.Razorpay is different: the secret is optional. Without it, PaymentHooks confirms each webhook by reading the payment back from Razorpay with your keys. The Razorpay page lists the events to select.
Return URL
PhonePe, CCAvenue and PayU India also show a Return URL. Set it as the return or redirect URL in that gateway's dashboard, because the gateway sends the payment result there after the customer pays.