docs
ဤစာမျက်နှာတွင်

Payment link များ

Payment link https://<your domain>/l/<slug> ကို ထပ်ခါထပ်ခါ သုံးနိုင်သည် — chat၊ email၊ poster ပေါ်ရှိ QR၊ invoice PDF ထဲ ထည့်နိုင်သည်။ ဖွင့်လိုက်လျှင် "Pay" စာမျက်နှာကို ပြသည်။ Customer က ခလုတ်ကို နှိပ်မှသာ invoice (ကိုယ်ပိုင် လိပ်စာအသစ်ဖြင့်) ကို ဖန်တီးပြီး customer သည် ငွေပေးချေရန် စာမျက်နှာ သို့ ဆက်သွားသည်။ Link preview များ (Telegram၊ Viber၊ Facebook၊ …) က စာမျက်နှာကို ဖွင့်ရုံသာ ဖွင့်ပြီး ဘာမှ မဖန်တီးပါ။

Dashboard (API → Payment links)၊ polysiad paylink create သို့မဟုတ် API ဖြင့် ဖန်တီးနိုင်သည်။

ဖန်တီးခြင်း — POST /v1/payment-links (scope invoices:write၊ Idempotency-Key မဖြစ်မနေ)

Field
amountပုံသေ ပမာဏ (USDT string) — သို့မဟုတ် customer ကိုယ်တိုင် ပမာဏ ရိုက်ထည့်စေရန် ချန်ထားပါ —
min_amount, max_amountcustomer ပမာဏ၏ အပိုင်းအခြား (မူလ: business ၏ invoice ကန့်သတ်ချက်များ)
descriptionlink စာမျက်နှာနှင့် ငွေပေးချေရန် စာမျက်နှာတွင် ပြသည် (≤ 500)
invoice_expires_ininvoice တစ်ခုစီ၏ သက်တမ်း စက္ကန့် (300–86,400)၊ မူလ = business ၏ မူလတန်ဖိုး
redirect_urlငွေပေးချေပြီးနောက် ငွေပေးချေရန် စာမျက်နှာက ပြန်သွားမည့် https URL
curl -sS "$API/v1/payment-links" -H "Authorization: Bearer $POLYSIA_API_KEY" \
  -H "Idempotency-Key: $(cat /proc/sys/kernel/random/uuid)" -H "Content-Type: application/json" \
  -d '{"amount":"15.00","description":"Yoga class (1 session)","redirect_url":"https://shop.example.com/thanks"}'
{"object":"payment_link","id":"plink_…","url":"https://pay.example.com/l/9f…","path":"/l/9f…","active":true,
 "amount":"15.000000","min_amount":null,"max_amount":null,"description":"Yoga class (1 session)",
 "invoice_expires_in":null,"redirect_url":"https://shop.example.com/thanks","created_at":"…","deactivated_at":null,"livemode":true}

Customer ရိုက်ထည့်သော ပမာဏ: -d '{"min_amount":"5","max_amount":"500","description":"Donation"}'။

ကြည့်ခြင်း / စာရင်း / ပိတ်ခြင်း (invoices:read / invoices:write)

  • GET /v1/payment-links/{id}၊ GET /v1/payment-links?active=true|false (+ limit၊ starting_after)
  • POST /v1/payment-links/{id}/deactivate — idempotent ဖြစ်သည်။ ထို့နောက် link စာမျက်နှာက "no longer active" ဟု ပြမည်။ ၎င်းဖန်တီးပြီးသား invoice များ ဆက်လက် အကျုံးဝင်ပြီး ငွေပေးချေနိုင်သေးသည်။

၎င်းတို့သည် ပုံမှန် invoice များ (GET /v1/invoices၊ invoice.* webhook များ) ဖြစ်ပြီး "payment_link": "plink_…"၊ link ၏ description / redirect_url၊ order_id: null ပါပြီး metadata မပါပါ။ သင့်မှတ်တမ်းများနှင့် payment_link ဖြင့် ကိုက်ညီအောင် တွဲပါ။

ကန့်သတ်ချက်များ

Client IP တစ်ခုလျှင် invoice ၁၀ ခု၊ ထို့နောက် တစ်မိနစ် ၁ ခု။ Link တစ်ခုလျှင် ၃၀ ခု၊ ထို့နောက် တစ်စက္ကန့် ၁ ခု။ Business ၏ ဖွင့်ထားသော invoice အများဆုံး ကန့်သတ်ချက် (မူလ 10,000၊ dashboard → API → Invoice settings)။ Link က invoice မဖန်တီးနိုင်သောအခါ (ကန့်သတ်ချက် ပြည့်သွား၍ သို့မဟုတ် business ၏ ကန့်သတ်ချက် ပြောင်းသွားသဖြင့် link ၏ ပမာဏကို ခွင့်မပြုတော့၍) customer က "cannot accept new payments right now" ဟု မြင်ရမည်။