Skip to content
HisarPay

API reference

Payment links

Reusable payment pages with QR codes: create, limit, pause and archive them. Details in the guide →

POST/v1/payment-links

Create a reusable payment link

Scope: invoicesKey: live or test

Request body

  • titlestringrequired

    1–80 chars

  • kindstringrequired

    Values:fixedopen

  • price_usdstringoptional

    pattern ^(0|[1-9]\d{0,11})(\.\d{1,2})?$

  • min_usdstringoptional· nullable

    pattern ^(0|[1-9]\d{0,11})(\.\d{1,2})?$

  • max_usdstringoptional· nullable

    pattern ^(0|[1-9]\d{0,11})(\.\d{1,2})?$

  • suggested_amountsarray<string>optional

    ≤ 6 items

  • descriptionstringoptional· nullable

    ≤ 500 chars

  • tokensarray<string>optional

    Values:TRXUSDT

    ≥ 1 items

  • success_urlstring (url)optional· nullable

    ≤ 2048 chars

  • fee_paid_by_customerbooleanoptional· nullable
  • activebooleanoptional
  • expires_atstring (date-time)optional· nullable

    No new payment is started after this time; null for no end

    pattern ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$

  • max_usesintegeroptional· nullable

    How many invoices may be paid or be open in all; null for no limit

    1–100000

  • askobjectoptional· nullable

    What the payer is asked for before paying

    • namestring

      Values:offoptionalrequired

    • emailstring

      Values:offoptionalrequired

    • notestring

      Values:offoptionalrequired

    • note_labelstring· nullable

      ≤ 40 chars

  • archivedbooleanoptional

    An archived link takes no payments and is not listed

Responses

Example request
curl -X POST https://hisarpay.com/v1/payment-links \
  -H "Authorization: Bearer $HISARPAY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "title": "Support us",
    "kind": "open",
    "min_usd": "10.00",
    "suggested_amounts": [
      "10.00",
      "25.00",
      "50.00"
    ]
  }'

Details in the guide