پرش به محتوا

حساب، کیف پول و پرداخت | مرجع API

← همهٔ بخش‌های مرجع · آدرس پایه: https://trendism.ir/api/v3

GET /balance

موجودی کیف پول

Wallet balance (the test wallet for test keys)

دسترسی لازم: read

پاسخ 200 (Balance)
نامنوعتوضیح
object *string (balance)
livemode *boolean
balance_irr *integer (int64)
credit_limit_irr *integer (int64)
available_irr *integer (int64)

POST /coupons/redeem

ثبت کد هدیه یا پاداش شارژ

Redeem a voucher (credited now) or a deposit coupon (applied to the next deposit)

دسترسی لازم: payments

پارامترها
نامنوعتوضیح
Idempotency-Key (header) stringA unique string (for example a UUID). Replays the stored response for 24 hours.
بدنهٔ درخواست (CouponRedeem)
نامنوعتوضیح
code *string
پاسخ 200 (CouponRedemption)
نامنوعتوضیح
object *string (coupon_redemption)
kind *string (voucher | deposit_bonus)
credited_irr *integer (int64)Credited now (vouchers); deposit coupons apply to the next deposit

GET /me

مشخصات کاربر و کلید فعلی

The signed-in user and the current credential

دسترسی لازم: read

پاسخ 200 (Me)
نامنوعتوضیح
object *string (user)
id *integer (int64)
phone *string
display_name *string | null
email *string | null
tier *Tier
ref_code *string
credential *Credential
created_at *string (date-time)

GET /notifications

اعلان‌های داخل پنل

In-app notifications, newest first

دسترسی لازم: read

پارامترها
نامنوعتوضیح
limit (query) integer1–100, default 25
cursor (query) stringThe next_cursor of the previous page (opaque)
پاسخ 200 (NotificationList)
نامنوعتوضیح
object *string (list)
data *Notification[]
next_cursor *string | null
unread *integer (int64)

POST /notifications/read

خوانده شدن اعلان‌ها

Mark one notification (id) or all of them read

دسترسی لازم: read

پارامترها
نامنوعتوضیح
Idempotency-Key (header) stringA unique string (for example a UUID). Replays the stored response for 24 hours.
بدنهٔ درخواست (MarkRead)
نامنوعتوضیح
id integer (int64)Omit to mark everything read
پاسخ 200 (MarkReadResult)
نامنوعتوضیح
object *string (notifications_read)
marked *integer (int64)

POST /payments

شروع شارژ کیف پول از درگاه

Start a wallet top-up through the gateway

دسترسی لازم: payments

پارامترها
نامنوعتوضیح
Idempotency-Key (header) stringA unique string (for example a UUID). Replays the stored response for 24 hours.
بدنهٔ درخواست (PaymentCreate)
نامنوعتوضیح
amount_irr *integer (int64)
gateway string
return_url string | nullWhere to send the user after paying (https)
پاسخ 201 (Payment)
نامنوعتوضیح
object *string (payment)
id *integer (int64)
status *stringcreated, redirected, verified, credited, failed, expired
gateway *string
amount_irr *integer (int64)
redirect_url *string | nullOpen this in the user's browser (only while unpaid)
return_url *string | null
created_at *string (date-time)
updated_at *string (date-time)
verified_at *string (date-time) | null

GET /payments/{id}

وضعیت یک پرداخت

A payment

دسترسی لازم: read

پارامترها
نامنوعتوضیح
id (path) *integer (int64)
پاسخ 200 (Payment)
نامنوعتوضیح
object *string (payment)
id *integer (int64)
status *stringcreated, redirected, verified, credited, failed, expired
gateway *string
amount_irr *integer (int64)
redirect_url *string | nullOpen this in the user's browser (only while unpaid)
return_url *string | null
created_at *string (date-time)
updated_at *string (date-time)
verified_at *string (date-time) | null

GET /referrals

معرفی دوستان و پاداش‌ها

Your referral link, totals and recent commissions

دسترسی لازم: read

پاسخ 200 (Referrals)
نامنوعتوضیح
object *string (referrals)
link *string
ref_code *string
commission_bps *integer (int64)
hold_days *integer
held_irr *integer (int64)
released_irr *integer (int64)
commissions *Commission[]

GET /request-logs

گزارش درخواست‌های API شما

Your API request log (writes and errors, 14 days)

دسترسی لازم: read

پارامترها
نامنوعتوضیح
limit (query) integer1–100, default 25
cursor (query) stringThe next_cursor of the previous page (opaque)
پاسخ 200 (RequestLogList)
نامنوعتوضیح
object *string (list)
data *RequestLog[]
next_cursor *string | null

GET /transactions

تراکنش‌های کیف پول

Wallet ledger lines, newest first

دسترسی لازم: read

پارامترها
نامنوعتوضیح
kind (query) string
created_after (query) string (date-time)
created_before (query) string (date-time)
limit (query) integer1–100, default 25
cursor (query) stringThe next_cursor of the previous page (opaque)
پاسخ 200 (TransactionList)
نامنوعتوضیح
object *string (list)
data *Transaction[]
next_cursor *string | null