Initiate token purchase

Initiate a new token purchase - exchange real currency for virtual tokens.

Request
Security:
tilia_auth (write_tokens)
Request Body schema: application/json

Create Token Purchase request

payment_method_id
required
string <UUID4>

The payment method id to charge for purchasing tokens.

amount
required
integer

The number of virtual tokens to purchase. Specified in your virtual currency.

currency
required
string

Your virtual currency code.

destination_account_id
string <UUID4>

An optional account ID for who should receive the tokens upon purchase. If this field is omitted, the funds will go the payment method owner. This field allows you to purchase tokens for somebody else.

Responses
201

Successfully created token purchase.

400

Invalid input

401

Unauthorized access.

403

Disallowed from transacting.

500

Service unavailable or server error.

post/v2/token/purchase
Request samples
application/json
{
  • "payment_method_id": "d3da84e7-a203-4453-a016-407e91eeeeee",
  • "amount": 250,
  • "currency": "VCD",
  • "destination_account_id": "4ba04731-9f66-4123-a8a1-7ef815444444"
}
Response samples
application/json
{
  • "status": "Success",
  • "payload": {
    }
}