get_payment_options

Fetch the live payment options for the current Food cart. Renders a payment picker (UPI apps + scan-QR, plus Cash when available) that auto-detects the user's device. Call this when the user is ready to pay.

Fetch the live payment options for the current Food cart — the source of truth for what the user can pay with. A single call fetches BOTH device surfaces (mobile UPI apps + desktop scan-QR) and merges them into one payment picker widget that auto-detects the user's device. You do NOT need to ask the user which device they're on. If UPI isn't available for this cart, only Cash is offered.

See get_payment_options in actionComing soon

Example

const result = await client.callTool({
  name: "get_payment_options",
  arguments: {
    addressId: "addr_01HXYZ",
  },
});

Parameters

ParameterTypeRequiredDescription
addressIdstringnoPass the same addressId you used for get_food_cart. It is echoed back so the payment picker widget can place the order directly. Recommended for Food UPI.

get_food_cart does NOT return the UPI payment methods, so this is the only source of them for Food.

Session credentials (user identity, access token) are supplied automatically by the authenticated MCP session - you do not pass them in the tool call. See Authenticate.

Response

All Swiggy MCP tools return:

{
  "success": true,
  "data": { /* tool-specific payload */ },
  "message": "optional human-readable message"
}

The data payload carries the picker model:

{
  "success": true,
  "data": {
    "platforms": {
      "mobile": { "methods": [ { "id": "com.google.android.apps.nbu.paisa.user", "label": "Google Pay" } ] },
      "desktop": { "methods": [ { "id": "PayWithQR", "label": "Scan QR to pay" } ] }
    },
    "cod": { "paymentMethod": "Cash", "label": "Cash on Delivery" },
    "allMethods": [ /* flat list across surfaces, for text rendering */ ],
    "addressId": "addr_01HXYZ",
    "paymentAmount": 349,
    "placeOrderToolName": "place_food_order",
    "imWidgetV2Eligible": true
  },
  "message": "human-readable list of payment options"
}
  • platforms.mobile.methods[] — UPI apps (intent). Each method id MUST be echoed byte-for-byte into place_food_order's intentApp argument. Absent when UPI is unavailable.
  • platforms.desktop.methods[] — desktop scan-QR. Set generateUPIQR=true on place_food_order (no intentApp). Absent when UPI is unavailable.
  • platforms is omitted entirely when UPI isn't available; only Cash is then offered via allMethods.
  • addressId — echoed from input; present only when addressId was passed.
  • paymentAmount — cart total in rupees.
  • placeOrderToolName — the tool the widget should invoke to place the order. Agents can read this if needed; typically always "place_food_order".
  • imWidgetV2Eligible — Instamart domain only.

No available methods: When the cart has no valid payment options, the tool returns success: false (not a tool error — a valid business state). Handle it as "no payment methods available for this cart", not as a failure to call the tool.

{
  "success": false,
  "error": { "message": "No payment methods available for this cart" }
}

On genuine tool failure:

{
  "success": false,
  "error": { "message": "description of what went wrong" }
}

See Error codes for the full catalogue.

Details

FieldValue
Nameget_payment_options
MCP ServerFood
EndpointPOST mcp.swiggy.com/food
StagePayment
Behaviourread-only

Agent guidance

How Swiggy agents and orchestration logic use this tool. Surface these expectations in your prompts or tool-selection policies.

WHEN TO CALL:

  • ALWAYS call this when the user is ready to pay — it renders the picker widget. For Food, get_food_cart does NOT return the UPI payment methods, so this is the ONLY way to obtain them.
  • When the user explicitly asks "what payment options are available?", wants UPI, or mentions GPay, PhonePe, Paytm, etc.

PASS THE ADDRESS: Provide the same addressId you used for get_food_cart. It is echoed back through the picker so place_food_order can fire directly without another round-trip.

HANDOFF TO PLACE ORDER: The user picks a method in the widget. Pass their choice straight into place_food_order:

  • UPI app → intentApp = the selected method id, byte-for-byte.
  • Desktop scan-QR → generateUPIQR=true (no intentApp).
  • Cash → the Cash method from cod / allMethods.

NPCI compliance: UPI Collect and saved VPAs are not surfaced. Do not attempt to collect a VPA from the user.

Next in this journey →

Continue with place_food_order to place the order with the selected payment method.