---
title: "Billing Webhook Alipay"
method: POST
path: "/api/billing/webhook/alipay"
---

# Billing Webhook Alipay

`POST /api/billing/webhook/alipay`

Alipay 当面付 async-notify endpoint.

Verifies RSA2 signature over the urlencoded form using the
Alipay public key, then on `trade_status in {TRADE_SUCCESS,
TRADE_FINISHED}` finalizes the order via the shared
`_finalize_order_paid()` helper.

Idempotent on re-delivery (Alipay retries up to 25 times across
~24h with backoff). The handler must return the literal text
body `success` (HTTP 200) for Alipay to stop retrying — any
other body, status, or even a JSON `{"status":"success"}`
triggers indefinite retries until the 25-attempt window expires.

## Response `200`

Successful Response

- unknown

---

[API](https://skmtc.dev/omicos/apis/omicos-server.md) · [All operations](https://skmtc.dev/omicos/apis/omicos-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/omicos/omicos-server/revisions/a00b94573ffe/schema)
