Record a transaction on a credit line

​

Record a transaction (purchase, payment or rebate) in real time. Slate assigns it to the billing period its transaction date belongs to. Applies to revolving credit lines only — feed lines report through the transaction feed instead.

Path Parameters

  • Credit line UUID

Body

required
application/json
  • Transaction amount in cents

  • Transaction date (YYYY-MM-DD)

  • Transaction type. purchase = customer spend (rejected while the line is suspended or the period is closed); payment = customer money (applies fees-first, counts toward the minimum, can auto-reactivate a suspended line); rebate = partner-funded credit (reduces the balance only — never fees, never the minimum)

  • Transaction description

  • Partner-side transaction identifier for reconciliation

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/credit-lines/{creditLineId}/period-transactions
curl https://api-sandbox.tryslatehq.com/credit-lines/123e4567-e89b-12d3-a456-426614174000/period-transactions \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: YOUR_SECRET_TOKEN' \
  --data '{
  "type": "purchase",
  "amount": 50000,
  "transactionDate": "2025-01-01",
  "externalId": "txn_abc123",
  "description": "Fuel purchase"
}'
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "creditLineId": "123e4567-e89b-12d3-a456-426614174000",
  "periodId": "123e4567-e89b-12d3-a456-426614174000",
  "type": "payment",
  "amount": 50000,
  "transactionDate": "2025-01-01",
  "description": null,
  "notes": null,
  "createdAt": "2025-01-01T00:00:00Z"
}