swiggy-pay

Installation
SKILL.md

swiggy-pay

A UPI order is created in PENDING_PAYMENT and becomes PLACED only after payment succeeds and confirm_order runs. The CLI does the whole loop for you; your job is to hand the user the link and report the terminal state truthfully.

The one command

swiggy <server> payment-status --paas-id <paasId> --order-id <orderId> --wait --json --no-interactive
# Food additionally REQUIRES the echo values from the place-order response:
swiggy food payment-status --paas-id <paasId> --order-id <orderId> --address-id <addressId> --lat <lat> --lng <lng> --wait --json --no-interactive

meta.payment.next on the pending checkout response is this exact command — copy it. Without addressId/lat/lng, Swiggy cannot reconcile a Food order and it stays pending forever.

--wait polls check_payment_status every pollingIntervalInMs (a ~19 s server long-poll) up to maxTimeToPollForInMs, then calls confirm_order once on success (or once at the cap). It blocks; that is intended. Never poll faster than the server's interval by hand — it stresses Swiggy's payment cache and buys nothing.

Before waiting

Give the user meta.payment.bridgeUrl from the checkout response: "Pay here — scan on desktop, tap on mobile: ". That link renders a QR plus an "open in UPI app" button, so you never need the device type or a UPI ID.

Installs
1
First Seen
2 days ago
swiggy-pay — hktitan/swiggy-cli