Zopping

Accept payments

This guide is for collecting payment for an order — a channel, app or POS taking money from a shopper on Zopping's payment rails.

Building a payment gateway to offer to Zopping merchants instead? That's a different audience — see Integrate a payment gateway.

The flow attaches a payment to an order, sends the shopper to the gateway, then confirms the result.

Online payment processing (gateways, callbacks, signatures) is powered by ZopPay, Zopping's payment product. You initiate and verify on Zopping; gateway setup lives in ZopPay.

1. Record or initiate a payment on the order

For cash/collected payments, record it directly. For online payments, initiate one and you get back a redirectUrl / accessKey to send the shopper to the gateway.

# Cash on delivery — just record it
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":"CASH","amount":"52.00"}'
# Online — initiate, then redirect the shopper to the returned URL
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":"52.00"}'

2. Confirm the result

After the gateway redirects back, verify the payment so the order reflects it. Don't trust the 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":"TXN123","transactionAmount":"52.00","udf1":"ORD-55012","transactionStatus":"SUCCESS"}'

If you only need the current state, enquire instead of verifying:

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

3. Refunds

For returns or cancellations, issue a refund against the order — see Receive & fulfill orders and the Orders reference.

Good practices

  • Always verify server-side (verify-payment); never mark an order paid off the client redirect alone.
  • Idempotency — match on transactionId / gatewayTransactionId so a double callback doesn't double-credit.

Going further

Reference: Orders.