Zopping

Set up Razorpay

Accept online card/UPI/netbanking payments on a Zopping store through Razorpay.

Payments are powered by ZopPay. ZopPay is Zopping's separate payment product; it owns the gateway connections (Razorpay, PayU, Cashfree, …), credentials, callbacks and signature verification. On the Zopping side you initiate a payment on an order and verify the result — you don't call Razorpay (or ZopPay's gateway API) directly. This page covers the Zopping side; configure the gateway itself in ZopPay.

Prerequisite: the OnlinePaymentSupport extension must be enabled.

1. Configure the Razorpay gateway (in ZopPay)

Add the merchant's Razorpay credentials (key id + secret, optional webhook secret) in ZopPay — see ZopPay's developer docs at zoppay.in. Once configured, Razorpay is available to Zopping checkout for that organization.

2. Take payment on an order

Initiate an online payment against the order; the response carries what the storefront needs to open Razorpay checkout. Fetch the client key with GET /api/payment-key.

curl -X POST https://zopping.com/api/order-service/order/55012/payment \
  -H "Authorization: Bearer $ZOPPING_TOKEN" -H "Content-Type: application/json" \
  -d '{ "organizationId": "<org-id>", "orderReferenceNumber": "ORD-55012", "mode": "ONLINE", "amount": "512.00" }'

Redirect the shopper to complete payment on Razorpay.

3. Confirm the payment

After the gateway returns, confirm server-side — never mark an order paid off the client redirect alone:

curl -X POST https://zopping.com/api/order-service/verify-payment \
  -H "Authorization: Bearer $ZOPPING_TOKEN" -H "Content-Type: application/json" \
  -d '{ "organizationId": "<org-id>", "transactionId": "pay_xxx", "transactionAmount": "512.00", "udf1": "ORD-55012", "transactionStatus": "SUCCESS" }'

The storefront equivalent is the /api/payment-response callback. Match on gatewayTransactionId so a duplicate callback doesn't double-credit.

4. Reconcile

Read settled payments from the billing ledger (GET /api/billing-service/transaction), matching on gatewayTransactionId. See Payments & Billing.

Notes

  • The underlying gateway calls (creating the Razorpay payment, signature verification, webhooks) are handled by ZopPay — on Zopping you initiate and verify, not the raw Razorpay API.
  • The same Zopping flow applies to the other built-in gateways (PayU, Cashfree, Paytm, PhonePe, …); only the ZopPay-side configuration differs.