Skip to content

Payments

An order has one payment_method:

ValueWhat happens
cashCollected by the rider (delivery) or at the counter (pickup). payment.status stays pending until the restaurant records it.
cardThe order is held until the customer pays on GoOrder’s hosted payment page.

You never handle card numbers. GoOrder’s payment provider hosts the page, so your integration stays out of PCI scope.

  1. Create the order with payment_method: "card". It is created as placed with payment.status: "pending", and is not sent to the restaurant until it is paid.

  2. Request a payment link:

    Terminal window
    curl -X POST https://back.goorder.com/api/partner/v1/orders/ORDER_ID/payment \
    -H "Authorization: Bearer $GOORDER_API_KEY" -H "Content-Type: application/json" -d '{}'
    { "data": { "order_id": "66f1…", "payment_url": "https://…", "environment": "live" } }
  3. Send the customer to payment_url (redirect, or open in an in-app browser).

  4. Wait for the result. GoOrder confirms payment server-to-server; you receive order.payment_updated with payment.status: "paid" and, a moment later, the restaurant starts receiving the order.

  • The link is single-use. If the customer comes back later, call the endpoint again for a fresh link.
  • Do not rely on the customer returning to your site — they may close the tab. The webhook (or polling GET /orders/{id}) is the source of truth.
  • A card order that is never paid is cancelled automatically after a period without payment. Treat cancelled as final.
  • Calling the endpoint for an already-paid order returns 409 already_paid; for a cash order, 409 invalid_payment_method.

payment on every order:

{ "method": "card", "status": "paid", "amount": 67.0, "refunded_amount": 0, "currency": "AED" }
statusMeaning
pendingNot paid yet
paidCaptured (card)
failedThe payment attempt failed — request a new link
partially_refundedPart returned (refunded_amount > 0)
refundedAll returned

Refunds are decided and executed by GoOrder (support or the restaurant) — there is no refund endpoint. You are told through order.refunded and by the order’s payment fields. A refund of a card payment returns to the customer’s card or their GoOrder wallet; a small payment-processing fee may be withheld by the processor.

In the sandbox, POST /sandbox/orders/{id}/advance with {"payment":"paid"} or {"payment":"failed"} simulates the customer’s result and fires order.payment_updated. The sandbox payment_url is a placeholder; no real page is involved.