Sign in
भुगतान और निकासी/Payment API

Payment API

2328.io Payment API के साथ क्रिप्टोकरेंसी भुगतान session बनाएँ और प्रबंधित करें।

Payment API आपको भुगतान session बनाने, customer को hosted checkout पर redirect करने, और भुगतान status track करने की सुविधा देता है।

भुगतान बनाएँ

एक भुगतान session बनाता है और customer को pay करने के लिए एक URL लौटाता है।

Request parameters

FieldTypeआवश्यकDescriptionValues
amountdecimalहाँcurrency में भुगतान राशि, जैसे 100.00
currencystringहाँFiat currency (USD, EUR, RUB, …) या क्रिप्टोकरेंसी (USDT, TRX, BTC, …)
order_idstringहाँआपका order ID, जैसे ORDER-12345 (अधिकतम 128 chars)
to_currencystringनहींपहले से चुनी हुई क्रिप्टोकरेंसी
networkstringनहीं*Network code (आवश्यक यदि to_currency set है या currency एक क्रिप्टोकरेंसी है)
url_returnstringनहींभुगतान के बाद redirect URL, जैसे https://your-site.com/return
url_successstringनहींurl_return का विकल्प
url_callbackstringनहींwebhook notifications के लिए URL, जैसे https://your-site.com/webhook
invite_codestringनहींReferrer code
fee_splitdecimalनहींMerchant fee का वह हिस्सा जो payer पर डाला गया है, 0–100 (%)। 0 = merchant पूरी तरह भरता है, 100 = payer पूरी तरह भरता है। Project-level setting को override करता है। उदाहरण: 30 (payer fee का 30% कवर करता है)।
price_markupdecimalनहींInvoice राशि पर markup या discount, −99 से 100 (%)। Project-level setting को override करता है। उदाहरण: 5 (+5%) या -10 (10% discount)।
descriptionstringनहींवैकल्पिक invoice description (अधिकतम 200 chars)। भुगतान page पर payer को दिखाया जाता है। उदाहरण: Premium plan — Order #12345
ttl_secondsintनहींInvoice की वैधता seconds में, 300 (5 मिनट) से 86400 (24 घंटे) तक। इस अवधि के बाद invoice expire हो जाता है और इसका भुगतान नहीं किया जा सकता। Default: 3600 (1 घंटा)। उदाहरण: 3600

Response

JSON
{
  "state": 0,
  "result": {
    "uuid": "abc123-def456-...",
    "order_id": "ORDER-12345",
    "amount": "100.00",
    "currency": "USD",
    "amount_usd": "100.00",
    "exchange_rate": null,
    "url": "https://2328.io/pay/abc123-def456-...",
    "tg_deeplink": "https://t.me/my2328bot?start=pay_abc123-def456-...",
    "expires_at": "2026-01-11T21:00:00Z",
    "created_at": "2026-01-11T20:00:00Z",
    "payer_currency": "USDT",
    "payer_amount": "100.50",
    "network": "TRX-TRC20",
    "address": "TXYZabc123...",
    "payment_status": "check",
    "txid": null,
    "payment_amount": null,
    "qr": "data:image/png;base64,iVBORw0..."
  }
}
  • भुगतान पूरा करने के लिए customer को result.url पर redirect करें।
  • tg_deeplink — Telegram MiniApp के माध्यम से भुगतान के लिए Telegram bot deeplink।
  • qr — deposit address का Base64-encoded QR code (data URI)। तब उपस्थित रहता है जब address पहले से assigned हो (जब network, to_currency के साथ set हो, या जब currency एक क्रिप्टोकरेंसी हो); अन्यथा null
  • txid, payment_amount — customer के pay करने तक null रहते हैं। On-chain transaction detect होने पर भर जाते हैं। यह कब हुआ जानने के लिए payment_status: paid webhook को सुनें।
  • exchange_ratenull यदि conversion अभी लागू नहीं है (जैसे fiat → crypto rate अभी lock नहीं हुआ है)। Payer currency चुने जाने पर भर जाता है।
Credentials
RequestPOST/v1/payment
curl -X POST https://api.2328.io/api/v1/payment \
  -H "Content-Type: application/json" \
  -H "User-Agent: MyShop/1.0 (+https://myshop.example)" \
  -H "project: YOUR_PROJECT_UUID" \
  -H "sign: YOUR_HMAC_SIGNATURE"
Response
Click Try it to see the response here.

भुगतान की जानकारी

uuid या order_id से वर्तमान भुगतान status प्राप्त करें।

Request parameters

FieldTypeआवश्यकDescriptionValues
uuidstringहाँ*Payment UUID (creation पर result.uuid से)
order_idstringहाँ*आपका order ID

uuid या order_id में से कम से कम एक आवश्यक है।

RequestPOST/v1/payment/info
curl -X POST https://api.2328.io/api/v1/payment/info \
  -H "Content-Type: application/json" \
  -H "User-Agent: MyShop/1.0 (+https://myshop.example)" \
  -H "project: YOUR_PROJECT_UUID" \
  -H "sign: YOUR_HMAC_SIGNATURE"
Response
Click Try it to see the response here.

भुगतान सूची

filtering और pagination के साथ सभी भुगतानों की सूची प्राप्त करें।

Request parameters

FieldTypeआवश्यकDescriptionValues
statusstringनहींभुगतान status के अनुसार filter (देखें References)
date_fromdateनहींप्रारंभिक तिथि (YYYY-MM-DD), जैसे 2026-01-01
date_todateनहींअंतिम तिथि (YYYY-MM-DD), जैसे 2026-01-31
pageintनहींPage संख्या, default 1
per_pageintनहींप्रति page items, default 15, अधिकतम 5000
RequestPOST/v1/payment/list
curl -X POST https://api.2328.io/api/v1/payment/list \
  -H "Content-Type: application/json" \
  -H "User-Agent: MyShop/1.0 (+https://myshop.example)" \
  -H "project: YOUR_PROJECT_UUID" \
  -H "sign: YOUR_HMAC_SIGNATURE"
Response
Click Try it to see the response here.