POST
/
purchases
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",
      "products":     ["coffee", "pizza"]
    }
  }'
{}

Scope required: purchases.write

Parameters

merchant_id
string
required

Merchant ID

user_id
string
required

User ID

amount
decimal
required

The purchase amount

purchased_at
string
required

Time the purchase was made in ISO8601 format

location_id
string

Location ID

card_id
string

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

products
array(string)

Optionally specified array of product strings to associate with the purchase

Response