Coinland Payمستندات
مرجع API

پرداخت‌ها

GET/api/pay/v1/payments

از جدید به قدیم، با صفحه‌بندی مکان‌نما.

Authorization

bearerKey
AuthorizationBearer <token>

Authorization: Bearer clpay_live_<64 hex> for the checkout routes, Authorization: Bearer clpay_payout_<64 hex> for the payout routes. The wrong class on a route is PAY_WRONG_KEY_KIND (403).

In: header

Query Parameters

limit?integer

تعداد رکورد در هر صفحه.

Range1 <= value <= 100
Default25
cursor?string

مقدار next_cursor از صفحه قبل.

currency?string

فیلتر بر اساس نماد ارز (مثلاً usdt).

from?string

کران پایین paid_at به قالب ISO 8601.

Formatdate-time
to?string

کران بالای paid_at به قالب ISO 8601.

Formatdate-time

Response Body

application/json

curl -X GET "https://example.com/api/pay/v1/payments"
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "receipt_no": "string",      "session_id": "1ffd059c-17ea-40a8-8aef-70fd0307db82",      "reference_id": "string",      "status": "completed",      "currency": "string",      "amount": "string",      "charged_amount": "string",      "fee_amount": "string",      "fee_bearer": "merchant",      "net_amount": "string",      "usd_value": "string",      "payer_id": "7bded2ff-6743-4a0e-a147-77540fb16606",      "metadata": {},      "receipt": "string",      "paid_at": "2019-08-24T14:15:22Z"    }  ],  "next_cursor": "string"}
GET/api/pay/v1/payments/{id}

رکورد معتبر — همان چیزی که وب‌هوک به شما می‌گوید بیایید و بخوانید.

Authorization

bearerKey
AuthorizationBearer <token>

Authorization: Bearer clpay_live_<64 hex> for the checkout routes, Authorization: Bearer clpay_payout_<64 hex> for the payout routes. The wrong class on a route is PAY_WRONG_KEY_KIND (403).

In: header

Path Parameters

id*string

شناسه پرداخت (UUID) یا شماره رسید (CLP-…).

Response Body

application/json

application/json

curl -X GET "https://example.com/api/pay/v1/payments/string"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "receipt_no": "string",  "session_id": "1ffd059c-17ea-40a8-8aef-70fd0307db82",  "reference_id": "string",  "status": "completed",  "currency": "string",  "amount": "string",  "charged_amount": "string",  "fee_amount": "string",  "fee_bearer": "merchant",  "net_amount": "string",  "usd_value": "string",  "payer_id": "7bded2ff-6743-4a0e-a147-77540fb16606",  "metadata": {},  "receipt": "string",  "paid_at": "2019-08-24T14:15:22Z"}
POST/api/pay/v1/receipts/verify

امضای توکن را با کلید مخفی وب‌هوک شما بررسی می‌کند و اینکه پرداختی با همان مشخصات وجود دارد. اعتبارسنجی آفلاین ترجیح دارد (همان HMAC، با کلید خودتان، بدون رفت‌وبرگشت شبکه) — این اندپوینت برای پیاده‌سازی‌هایی است که ترجیح می‌دهند خودشان آن را ننویسند.

Authorization

bearerKey
AuthorizationBearer <token>

Authorization: Bearer clpay_live_<64 hex> for the checkout routes, Authorization: Bearer clpay_payout_<64 hex> for the payout routes. The wrong class on a route is PAY_WRONG_KEY_KIND (403).

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/pay/v1/receipts/verify" \  -H "Content-Type: application/json" \  -d '{    "receipt": "string"  }'
{  "valid": true,  "payment": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "receipt_no": "string",    "session_id": "1ffd059c-17ea-40a8-8aef-70fd0307db82",    "reference_id": "string",    "status": "completed",    "currency": "string",    "amount": "string",    "charged_amount": "string",    "fee_amount": "string",    "fee_bearer": "merchant",    "net_amount": "string",    "usd_value": "string",    "payer_id": "7bded2ff-6743-4a0e-a147-77540fb16606",    "metadata": {},    "receipt": "string",    "paid_at": "2019-08-24T14:15:22Z"  }}