# Refresh an order's payment result

Source: https://checkslip.com/en/docs/sync-order

POST `https://api.checkslip.com/api/billing/orders/{order_id}/sync`

API key

Checks the payment result now instead of waiting for it to arrive. If it is paid, the credits arrive then; if the payment page is closed but the money has not arrived, the order shows as confirming. Asking again within a few seconds returns the same result. Needs an API key with billing:read.

## Parameters

| Field | In | Type | Required |
| --- | --- | --- | --- |
| `order_id` | path | `string (uuid)` | yes |

## Responses

### 200 `application/json`

| Field | Type | Required |
| --- | --- | --- |
| `id` | `string (uuid)` | yes |
| `status` | `PENDING \| PAID \| CANCELLED \| FLAGGED` | yes |
| `package_code` | `string` | yes |
| `package_name_th` | `string` | yes |
| `credits` | `integer` | yes |
| `amount` | `Money` | yes |
| `amount.satang` | `integer` | yes |
| `amount.currency` | `string = THB` | yes |
| `payment_method` | `CARD \| PROMPTPAY \| null` | no |
| `receipt_id` | `string (uuid) \| null` | no |
| `created_at` | `string (date-time)` | yes |
| `paid_at` | `string (date-time) \| null` | no |
| `cancelled_at` | `string (date-time) \| null` | no |
| `confirming` | `boolean` | no |
| `review_reason` | `string \| null` | no |

### Possible errors

401 403 404 500 503

An error as Problem Details. All codes are listed at [Error codes](https://checkslip.com/en/docs/errors)

**cURL**

```bash
curl -X POST https://api.checkslip.com/api/billing/orders/0b6c2f5e-8a41-4d1e-9c3a-5f7e2d18a6b4/sync \
  -H "Authorization: Bearer $CHECKSLIP_API_KEY"
```

**Node.js**

```javascript
const res = await fetch("https://api.checkslip.com/api/billing/orders/0b6c2f5e-8a41-4d1e-9c3a-5f7e2d18a6b4/sync", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.CHECKSLIP_API_KEY}`,
  },
});
const data = await res.json();
```

**Python**

```python
import os

import requests

res = requests.post(
    "https://api.checkslip.com/api/billing/orders/0b6c2f5e-8a41-4d1e-9c3a-5f7e2d18a6b4/sync",
    headers={
        "Authorization": f"Bearer {os.environ['CHECKSLIP_API_KEY']}",
    },
)
data = res.json()
```

```json
{
  "id": "0b6c2f5e-8a41-4d1e-9c3a-5f7e2d18a6b4",
  "status": "PENDING",
  "package_code": "string",
  "package_name_th": "string",
  "credits": 1,
  "amount": {
    "satang": 5000,
    "currency": "THB"
  },
  "payment_method": "CARD",
  "receipt_id": "0b6c2f5e-8a41-4d1e-9c3a-5f7e2d18a6b4",
  "created_at": "2026-11-05T09:30:00+07:00",
  "paid_at": "2026-11-05T09:30:00+07:00",
  "cancelled_at": "2026-11-05T09:30:00+07:00",
  "confirming": true,
  "review_reason": "string"
}
```
