commerce

POST /v1/orders/{orderId}/customer-action

Reopen the checkout for a payment that is waiting on the customer.

所有 commerce 端点

身份验证

请将 API 密钥作为 bearer 令牌发送。此端点在规范中未指明具体的权限,因此请为您的密钥赋予所需的最小权限,并通过检查响应来确认,而不是盲目假设。

此端点不需要组织 ID。您的密钥已用于识别其所属的组织,且响应范围也仅限于该组织。

免费试用

将尖括号中的内容替换为您自己的值,并将键占位符替换为您仪表板中的一个键。

curl -X POST https://api.zinndigital.com/v1/orders/{orderId}/customer-action \
  -H "Authorization: Bearer zdk_live_…"

已登录?您仪表板中的 API 控制台会自动填入您真实的组织 ID 和您自己的密钥,并针对实时 API 运行请求,以便您查看实际的响应。 在 API 控制台中打开此端点

详细信息

Returns where the customer finishes paying an order that is already part-way through a payment — the NOWPayments hosted crypto invoice, a PayPal approval page, or a fresh Stripe SCA credential. This is what makes a crypto order payable: the gateway supplies that link once, at the instant the invoice is opened, and until this endpoint existed nothing gave it to the customer. **It never charges.** `POST /v1/orders/{orderId}/pay` is the guarded surface that opens a payment; this one only reopens the checkout for a payment already in progress, so it sits behind none of the card-testing defences and needs none. Call `/pay` first; come back here to send the customer to the checkout, and again whenever they return to it later. **A crypto action always returns the SAME invoice.** The confirming IPN is matched on the invoice id recorded against the payment, so a second invoice for one order would take the customer's money against a record that does not exist. NOWPayments has no read-invoice endpoint either, so the link captured when the invoice was opened is the only one there is.

参数

名称类型必填内容简介
orderId (path)UuidThe order's id.

响应

名称类型必填内容简介
kindstring<pay, approve, authenticate>What the customer is being asked to do. `pay` — open a crypto invoice and send payment; `approve` — approve the payment in their PayPal account; `authenticate` — confirm the pay…
urlstringThe hosted page to send the customer to, or `""` when this action is a credential instead. For crypto this is the NOWPayments invoice and it is **stable for the life of the orde…
tokenstringA short-lived client-side credential for the gateway's browser SDK (Stripe's client secret), or `""`. Never stored by the platform — it is re-read from the gateway each time thi…
providerstringThe payments driver that owns this action (`nowpayments`, `paypal`, `stripe`).

此端点可能返回的错误

401 · 403 · 404 · 422 · 429