---
title: "Paygo: order status"
method: GET
path: "/api/v1/paygo/order/{orderId}"
tags: ["Paygo"]
---

# Paygo: order status

`GET /api/v1/paygo/order/{orderId}`

## Request

- Base URL: `https://powersun.vip`
- URL: `https://powersun.vip/api/v1/paygo/order/{orderId}`
- Auth: API key in header `X-API-Key`

Poll order state: received → paying → paid → delegating → broadcasting → confirmed → completed. Failures after a confirmed payment are refunded on-chain in full; the refund txId appears in the response. Recommended polling interval: 2–3 s.

## Path parameters

- `orderId` string, required

## Response `200`

Order state

- object
  - `orderId` string
  - `status` 'received' | 'paying' | 'paid' | 'delegating' | 'broadcasting' | 'confirmed' | 'completed' | 'failed'
  - `paymentTxId` string, nullable
  - `broadcastTxId` string
  - `refund` object, nullable
    - `txId` string
    - `amountTrx` string
  - `refundPending` boolean: true when the order failed after the fee payment confirmed and the on-chain refund has not been sent yet (it is automatic — keep polling until `refund` is populated)
  - `failureCode` 'payment_failed' | 'tx_expired' | 'resim_failed' | 'delegation_failed' | 'broadcast_failed' | 'onchain_revert', nullable
  - `failureDescription` string, nullable: Human-readable explanation of the failure, safe to show to end users: what happened, whether funds moved, and what to do next
  - `errorMessage` string, nullable: Raw technical detail for debugging/support
  - `timestamps` object

## Other responses

- `404`: Unknown orderId

---

[API](https://skmtc.dev/powersun/apis/powersun-agent-api.md) · [All operations](https://skmtc.dev/powersun/apis/powersun-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/powersun/apis/powersun-agent-api/revisions/169cc1ebfd26?raw)
