Link a payment to a bill

Changed on

Record a transfer or transaction you already made as a payment on the bill. Provide exactly one of transferId or transactionId; either must be one your key can read. To pay with a new transfer, pass billId when you create the transfer instead.

post/v2/bills/{billId}/payments

Request

  • Base URL
    https://api.slash.com
  • URL
    https://api.slash.com/v2/bills/{billId}/payments
  • Auth
    API key in header X-API-Key

Request body

transferIdstring

Transfer id with the transfer_intent_ prefix.

transactionIdstring

Transaction id with the agg_tx_ prefix.

Example request

{
  "transferId": "transfer_intent_2rj4l7hmrrrcv",
  "transactionId": "agg_tx_2rj4l7hmrrrcv"
}

Response

The bill with the payment linked.

idstring required

Bill id with the bill_ prefix.

status'draft' | 'pending_approval' | 'rejected' | 'scheduled' | 'payment_pending' | 'paid' | 'payment_failed' | 'partially_paid' required

Derived from the bill's payments. draft until a payment exists; pending_approval while a payment awaits approval; rejected when the latest approval was rejected; scheduled when a payment is scheduled; payment_pending while a payment is in flight; partially_paid when settled payments cover part of the total; paid when they cover all of it; payment_failed when the latest payment failed or was returned.

source'manual' | 'email' | 'carrier_account' | 'api' required

How the bill entered Slash. api for bills created through this API, manual for the dashboard, email for the accounts-payable inbox, carrier_account for bills pulled from a connected carrier portal. Carrier bills are read-only over the API.

recipientIdstring

The vendor, a recipient readable at GET /v2/recipients/{recipientId}.

destinationIdstring

The destination the bill is expected to be paid to, readable at GET /v2/destinations/{destinationId}.

ownerUserIdstring

The user responsible for the bill. Absent for bills that arrived by email and have not been assigned.

invoiceNumberstring

The vendor's invoice number.

invoiceDatestring date

Invoice date as YYYY-MM-DD.

dueDatestring date

Due date as YYYY-MM-DD.

currencystring required

Uppercase ISO 4217 currency code shared by every amount on the bill.

documentIdsstring[] required

Documents attached to the bill, readable at GET /v2/documents/{documentId}.

notesstring

Free-text notes visible to your organization.

createdAtstring date-time required

When the bill was created.

Example response

{
  "id": "bill_2rj4l7hmrrrcv",
  "recipientId": "le_c_2rj4l7hmrrrcv",
  "destinationId": "le_contact_destination_2rj4l7hmrrrcv",
  "ownerUserId": "u_2rj4l7hmrrrcv",
  "invoiceNumber": "INV-4471",
  "invoiceDate": "2026-09-01",
  "dueDate": "2026-10-01",
  "currency": "USD",
  "lineItems": [
    {
      "id": "bill_line_item_2rj4l7hmrrrcv",
      "name": "Hosting",
      "quantity": 1
    }
  ],
  "documentIds": [
    "st_2rj4l7hmrrrcv"
  ],
  "payments": [
    {
      "id": "bill_payment_2rj4l7hmrrrcv",
      "transferId": "transfer_intent_2rj4l7hmrrrcv",
      "transactionId": "agg_tx_2rj4l7hmrrrcv"
    }
  ]
}

Changes