Campaigns

Confirm and get the payment instruction

Changed on

Lock the list and the price, and move the draft to awaiting_payment. Rows still pending are billed as unverified (fail-open: they are re-checked live before sending); rejected rows are excluded and never billed. The answer says exactly what to pay: amount of currency to pay_to with memo (the campaign id) before expires_at, plus the full payment block (asset, decimals, smallest-unit amount, transfer kind).

The price is your wholesale terms for ONE recipient (for star_gift, the list's total Stars quoted once and divided per gift, rounded up), multiplied by the deliverable count (ok + unverified). A list with nothing deliverable answers 409 conflict. Confirming again while awaiting_payment returns the same instruction. Where USDT payments are not offered, confirming a usdt_ton campaign answers 422 currency_not_available, even when the campaign is already awaiting payment.

422 product_not_available for a star_gift campaign: the gift is no longer sendable (sold out or withdrawn since the draft), or it is a limited gift with fewer copies left than the recipients this confirm would bill (ok, unverified and still pending rows; the message names both numbers). 503 unavailable: no delivery capacity is available right now, or — for a usdt_ton Stars or Premium campaign — no live price source. 503 gift_catalog_unavailable: the star-gift catalog cannot be read right now. Nothing is locked on a refused confirm. A 503 is retryable. A 422 is not: for a gift that is no longer sendable, create a new campaign with another gift; for too few copies, cancel the draft and create one with at most the remaining copies.

Payment. One on-chain transfer, matched by memo, with the same −1% … +2% tolerance as an order. A payment outside it still funds floor(received / unit_price) recipients in submission order; the rest are skipped insufficient_payment and their value is returned in the settlement reversal. A payment that funds nobody ends the campaign failed with a full reversal.

Pay only a campaign that reads awaiting_payment, before its expires_at, in the asset of its payment block, with the memo. A transfer that does not fit is never credited to the campaign. It is returned to the address it came from, in the asset received, minus the reversal fee (currently 0.01 GRAM for GRAM; for USDT, the USDT value of 0.15 GRAM at the current rate, or 0.30 USDT when no rate is available). Amounts below 0.1 GRAM or 0.5 USDT, or that the fee would consume entirely, are not returned. A transfer sent from a smart contract rather than a plain wallet (a DEX, for example) is not returned automatically; it is returned by hand after review. These figures may change. The cases:

  • Before confirm (a draft, whose id is already the memo) — the draft is unchanged; confirm it, then pay the instruction it returns.
  • After you cancelled — the campaign stays cancelled.
  • After it expired — the campaign stays expired; create a new one. A payment that lands just after expires_at, before the campaign has turned expired, may still be credited.
  • In the other asset (for example USDT to a ton campaign) — not converted; the campaign is still awaiting_payment and can be paid correctly until expires_at.
  • A second payment to a campaign that is already paid.
  • Without the memo — it matches no campaign.

These returns are separate from the campaign's own settlement reversal: they do not appear in its reversal_tx. If one has not arrived, contact support with the campaign_id and the transaction hash.

403 tenant_review_required: new confirms are paused while your account is under review; existing campaigns and direct orders are unaffected. Contact support.

post/v1/campaigns/{id}/confirm

Request

  • Base URL
    https://api.mystars.tg
  • Auth
    API key in header X-Api-Key

Path parameters

idstring uuid required

The campaign id (UUID, also the on-chain payment memo).

Response

The list and price are locked; pay before expires_at.

campaign_idstring uuid required
status'awaiting_payment' required
recipient_countinteger required
unit_pricestring required
amountstring required

The total to pay, decimal string in currency.

currency'ton' | 'usdt_ton' required

The asset the order is paid in. ton = the native coin GRAM (ex TON), sent as a plain transfer — it is not USDT on TON. usdt_ton = USDT (TON), sent as a jetton transfer. Required on every create and pricing request: a request without it is rejected with 400 bad_request.

pay_tostring required

The address to pay.

memostring required

The comment the payment must carry (the campaign id).

expires_atstring date-time required

Example response

{
  "payment": {
    "chain": "ton"
  }
}

Changes