1. 支付接入
简体中文
  • English
  • 简体中文
  • TLY Pay API
    • 快速开始
    • HTTP 约定和支付状态
    • Webhook 验签和恢复
    • 支付接入
      • 创建 Payment
        POST
      • 查询 Payment 状态
        GET
      • 取消 Payment
        POST
      • 关闭 Checkout 访问
        DELETE
      • 检查计价配置
        GET
      • 配置 Webhook
        POST
      • 验证 Webhook 签名密钥
        POST
  • Schemas
    • BootstrapWebhook
    • CreatePayment
    • CreatedPayment
    • ErrorResponse
    • MerchantPaymentView
    • MerchantSourceAmountView
    • MerchantStoreSourceView
    • MerchantStoreView
    • OneTimeSecretResponse
    • SourceAmount
    • VerifyWebhookBinding
    • WebhookBindingView
  1. 支付接入

创建 Payment

POST
/v1/payments
需要 API 密钥具备 payment:write 作用域.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Header Params

Body Params application/jsonRequired

Examples

Responses

🟢200OK
application/json
Payment 已创建, 或幂等复用已有 Payment
Headers

Bodyapplication/json

🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🟠409
🟠429
Request Request Example
Shell
JavaScript
Java
Swift
curl --location '/v1/payments' \
--header 'Idempotency-Key;' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "checkout_origin": "string",
    "order_ref": "string",
    "return_url": "string",
    "source_amount": {
        "amount_raw": "string",
        "currency": "string",
        "kind": "fiat"
    }
}'
Response Response Example
200 - Example 1
{
    "payment_id": "string"
}
Previous
Webhook 验签和恢复
Next
查询 Payment 状态
Built with