POST
/
v4
/
purchases
curl --request POST \
  --url https://api.kit.com/v4/purchases \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "purchase": {
    "email_address": "[email protected]",
    "transaction_id": "796-92-4892",
    "status": "paid",
    "subtotal": 78.66,
    "tax": 7.87,
    "shipping": 0,
    "discount": 5,
    "total": 81.53,
    "currency": "USD",
    "transaction_time": "2023-02-17T11:43:55Z",
    "products": [
      {
        "name": "Phantom Hourglass",
        "pid": "804-02-4430",
        "lid": "811-75-7900",
        "quantity": 1,
        "unit_price": 23.22,
        "sku": "SM21-SH-M02-RD-S-001"
      },
      {
        "name": "Twilight Princess",
        "pid": "833-51-1151",
        "lid": "766-49-1241",
        "quantity": 1,
        "unit_price": 32.22,
        "sku": "WT21-JK-M03-BK-L-012"
      },
      {
        "name": "Four Swords",
        "pid": "217-99-4325",
        "lid": "563-95-8878",
        "quantity": 1,
        "unit_price": 23.22,
        "sku": "FL21-TS-M01-BL-M-020"
      }
    ]
  }
}'
{
  "purchase": {
    "id": 1336,
    "transaction_id": "796-92-4892",
    "status": "paid",
    "email_address": "[email protected]",
    "currency": "USD",
    "transaction_time": "2023-02-17T11:43:55Z",
    "subtotal": 78.66,
    "discount": 5,
    "tax": 7.87,
    "total": 81.53,
    "products": [
      {
        "quantity": 1,
        "lid": "811-75-7900",
        "unit_price": 23.22,
        "sku": "SM21-SH-M02-RD-S-001",
        "name": "Phantom Hourglass",
        "pid": "804-02-4430"
      },
      {
        "quantity": 1,
        "lid": "766-49-1241",
        "unit_price": 32.22,
        "sku": "WT21-JK-M03-BK-L-012",
        "name": "Twilight Princess",
        "pid": "833-51-1151"
      },
      {
        "quantity": 1,
        "lid": "563-95-8878",
        "unit_price": 23.22,
        "sku": "FL21-TS-M01-BL-M-020",
        "name": "Four Swords",
        "pid": "217-99-4325"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Authenticate API requests via an OAuth token

Body

application/json

Response

201
application/json

Creates a purchase for the provided subscriber and returns its details. It also creates products if they don't exist.

The response is of type object.