POST

/purchases

Bearer*

Scope required: purchases.write

Response

merchant_id
string

Merchant ID

location_id
string

Location ID

user_id
string

User ID

card_id
string

Card ID that the user used, if it is registered in Thanx

amount
decimal

The purchase amount

purchased_at
string

Time the purchase was made in ISO8601 format

curl https://api.thanxsandbox.com/purchases \
  -X POST \
  $STANDARD_HEADERS
  -d '{
    "purchase": {
      "merchant_id":  "weoru",
      "location_id":  "hljkfd2345",
      "user_id":      "wgljsdwer23",
      "card_id":      null
      "amount":       13.45,
      "purchased_at": "2020-09-15T00:52:10.655+00:00",
    }
  }'
{}