Skip to main content
POST
/
cabinet
/
gift
/
purchase
Create Gift Purchase
curl --request POST \
  --url https://api.example.com/cabinet/gift/purchase \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "tariff_id": 123,
  "period_days": 123,
  "payment_mode": "<string>",
  "recipient_type": "<string>",
  "recipient_value": "<string>",
  "gift_message": "<string>",
  "payment_method": "<string>"
}
'
{
  "status": "<string>",
  "purchase_token": "<string>",
  "payment_url": "<string>",
  "warning": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
tariff_id
integer
required
period_days
integer
required
Required range: x <= 3650
payment_mode
string
required
Pattern: ^(balance|gateway)$
recipient_type
string | null
Pattern: ^(email|telegram)$
recipient_value
string | null
Maximum string length: 255
gift_message
string | null
Maximum string length: 1000
payment_method
string | null
Maximum string length: 50

Response

Successful Response

status
string
required
purchase_token
string
required
payment_url
string | null
warning
string | null