创建客户
POST
/v1/customers 请求头
Idempotency-Key必填 | string | 商户生成的唯一串(建议 UUID/ULID)。24 小时内重放同一 key 返回首次结果,不会产生第二笔。 |
请求体
reference_id必填 | string | |
email | string | |
phone | string | |
name | string | |
country | string |
响应 201
uid | string | |
reference_id | string | 你系统里的用户 ID |
email | string | |
phone | string | |
name | string | |
country | string | |
created_at | string<date-time> |
请求
curl -X POST https://api.baton.example/v1/customers \
-H "Authorization: Bearer sk_live_xxx" \
-H "Idempotency-Key: 01J8ZQ4T7M2K9F3B" \
-H "X-Timestamp: 1763280000" -H "X-Nonce: 7f3a" -H "X-Signature: v1=..." \
-H "Content-Type: application/json" \
-d '{
"reference_id": "user_90213",
"email": "[email protected]",
"country": "US"
}'