### Body example for payments.payment_intent.created Source: https://docs.slash.com/docs/payments/webhooks/payment-intent-created Example of the event body carrying metadata. Use entityId to fetch the current state with GET /payments/payment-intent/{paymentIntentId} and dedupe on eventId since deliveries are at-least-once and unordered. ```json { "event": "payments.payment_intent.created", "eventId": "", "entityId": "", "eventTimestamp": "2026-09-10T18:32:30.698Z" } ``` -------------------------------- ### Install Node.js SDK with npm Source: https://docs.slash.com/docs/sdks Install the official Node.js SDK slash-sdk from npm. ```bash npm install slash-sdk ``` -------------------------------- ### Node.js Quick Start: Initialize SlashClient and Get Legal Entity Source: https://docs.slash.com/docs/sdks Initialize SlashClient with your API key and retrieve your legal entity using the Node.js SDK. ```javascript import { SlashClient } from 'slash-sdk'; const client = new SlashClient({ apiKey: 'your-api-key' }); // Get your legal entity const legalEntity = await client.legalEntity.get(); ``` -------------------------------- ### Python Quick Start: Initialize SlashClient and Get Legal Entity Source: https://docs.slash.com/docs/sdks Initialize SlashClient with your API key and retrieve your legal entity using the Python SDK. ```python from slash_sdk import SlashClient client = SlashClient(api_key="your-api-key") # Get your legal entity legal_entity = client.legal_entity.get() ``` -------------------------------- ### Install Python SDK with pip Source: https://docs.slash.com/docs/sdks Install the official Python SDK slash-sdk from PyPI using pip. ```bash pip install slash-sdk ``` -------------------------------- ### Install @slashfi/elements-react Source: https://docs.slash.com/docs/payments/payment-elements Install the Payment Elements React SDK. Requires React 18 or 19. ```bash npm install @slashfi/elements-react ``` -------------------------------- ### expense_report.create example payload Source: https://docs.slash.com/docs/v2/webhooks/event-types Example payload for the expense_report.create webhook, emitted when a new expense report is created. ```json { "event": "expense_report.create", "eventId": "", "entityId": "expense_report_example", "eventTimestamp": "2023-11-07T05:31:56Z" } ``` -------------------------------- ### Body example for payments.refund.created Source: https://docs.slash.com/docs/payments/webhooks/refund-created Example body for the payments.refund.created webhook event. The body carries metadata about the event, not the entity itself. Use entityId to fetch the current state with GET /payments/refund/{refundId} and dedupe on eventId. ```json { "event": "payments.refund.created", "eventId": "", "entityId": "", "eventTimestamp": "2026-09-10T18:32:30.698Z" } ``` -------------------------------- ### POST /card (Agent Request Example) Source: https://docs.slash.com/docs/agent-requests Example of a write request made with a read-only API key, which is deferred for approval and returns a 403 with a deferred action ID. ```APIDOC ## POST /card ### Description Make a write request to create a card. When using a read-only API key, the request is deferred for approval instead of being executed immediately. ### Method POST ### Endpoint https://api.slash.com/card ### Headers - **X-API-Key** (string) - Required - Your read-only API key. - **Content-Type** (string) - Required - application/json ### Request Body - **name** (string) - Required - The name of the card. - **type** (string) - Required - The type of card (e.g., virtual). ### Request Example { "name": "Marketing Card", "type": "virtual" } ### Response #### Deferred Response (403) - **x-deferred-action-id** (header) - The ID of the deferred action. - **error** (string) - Error message containing the approval URL. #### Response Example HTTP/1.1 403 Forbidden x-deferred-action-id: dfa_abc123 {"error": "Action requires approval: https://app.slash.com/home?modal=/deferred-action/dfa_abc123"} ``` -------------------------------- ### aggregated_transaction.create example payload Source: https://docs.slash.com/docs/v2/webhooks/event-types Example payload for the aggregated_transaction.create webhook, emitted when a Transaction first appears in the transaction feed. ```json { "event": "aggregated_transaction.create", "eventId": "", "entityId": "agg_tx_example", "eventTimestamp": "2023-11-07T05:31:56Z" } ``` -------------------------------- ### card.update example payload Source: https://docs.slash.com/docs/v2/webhooks/event-types Example payload for the card.update webhook, emitted when a card is activated, paused, or unpaused. A new card can emit this immediately after its creation event. ```json { "event": "card.update", "eventId": "", "entityId": "c_example", "eventTimestamp": "2023-11-07T05:31:56Z" } ``` -------------------------------- ### Book transfer response example Source: https://docs.slash.com/docs/v2/money-movement/book/sending Example response from creating a book transfer. Shows a settled transfer with a transfer_intent_ id and two transaction IDs for the debit and credit legs. A create response can instead be pending or in_review. ```json { "id": "transfer_intent_book123", "type": "book", "status": "settled", "accountId": "sa_group_primary123", "fromAccount": "subaccount_operations123", "toAccount": "subaccount_payroll123", "amount": { "amount": 250000, "currency": "USD" }, "description": "August payroll funding", "transactionIds": [ "agg_tx_booksource123", "agg_tx_bookdestination123" ], "createdAt": "2026-08-18T01:00:00.000Z" } ``` -------------------------------- ### Example payload for payments.refund.created Source: https://docs.slash.com/docs/payments/webhooks/refund-created Example JSON payload for the payments.refund.created webhook event. The event is pending at this point; no money has moved yet. Use entityId to fetch the current state and dedupe on eventId. ```json { "event": "payments.refund.created", "eventId": "", "entityId": "", "eventTimestamp": "2023-11-07T05:31:56Z" } ``` -------------------------------- ### Entry line item dimensions example Source: https://docs.slash.com/docs/v2/accounting/dimensions-and-coding Example JSON showing how coding appears on an editable line item of an entry. The dimensions object maps each dimension key to its coded value. A dimension that is missing has not been coded yet. ```json { "type": "editable", "amount": { "amount": 4250, "currency": "USD" }, "dimensions": { "account": { "id": "accounting_account_2rj4l7hmrrrcv", "name": "Office Supplies" }, "vendor": { "id": "accounting_vendor_2rj4l7hmrrrcv", "name": "Acme Supply Co" } } } ``` -------------------------------- ### Example webhook payload for payments.payment_intent.updated Source: https://docs.slash.com/docs/payments/webhooks/payment-intent-updated Example JSON payload for the payments.payment_intent.updated webhook event. Contains event type, eventId, entityId, and eventTimestamp. Use entityId to fetch the current state and dedupe on eventId. ```json { "event": "payments.payment_intent.updated", "eventId": "", "entityId": "", "eventTimestamp": "2023-11-07T05:31:56Z" } ``` -------------------------------- ### POST /v2/invoices/series Source: https://docs.slash.com/docs/v2/invoices/recurring-invoices Creates an invoice series with a customer, recurrence schedule, start date, and line items. ```APIDOC ## [POST] /v2/invoices/series ### Description Creates an invoice series for recurring billing with a customer, recurrence schedule, and initial line items. ### Method POST ### Endpoint /v2/invoices/series ### Parameters #### Headers - **X-API-Key** (string) - Required - API key for authentication. - **x-legal-entity** (string) - Required - Legal entity ID. - **X-Idempotency-Key** (string) - Required - Idempotency key. - **Content-Type** (string) - Required - Must be application/json. #### Request Body - **customerId** (string) - Required - Customer identifier. - **accountId** (string) - Required - Account identifier. - **recurrence** (object) - Required - Recurrence schedule. Example: `{"type":"monthly_day_of_month","dayOfMonth":1}`. - **startDate** (string, date) - Required - The first day the series can issue an invoice. Format: YYYY-MM-DD. - **timezone** (string) - Required - IANA timezone for scheduling. - **paymentTermsDays** (integer) - Required - Number of days after issuance that payment is due. - **end** (object) - Required - Ending condition. Example: `{"type":"after_count","count":12}`. - **lineItems** (array) - Required - List of line items. - **name** (string) - Required - Line item name. - **quantity** (integer) - Required - Quantity. - **unitAmount** (object) - Required - Unit amount. - **amount** (integer) - Required - Amount in smallest currency unit. - **currency** (string) - Required - Currency code. ### Request Example ```json { "customerId": "le_cus_2rj4l7hmrrrcv", "accountId": "sa_group_2rj4l7hmrrrcv", "recurrence": { "type": "monthly_day_of_month", "dayOfMonth": 1 }, "startDate": "2026-11-01", "timezone": "America/New_York", "paymentTermsDays": 30, "end": { "type": "after_count", "count": 12 }, "lineItems": [ { "name": "Monthly retainer", "quantity": 1, "unitAmount": { "amount": 500000, "currency": "USD" } } ] } ``` ### Response #### Success Response No response schema is provided in the source documentation. ### Error Handling No explicit error responses are documented. ``` -------------------------------- ### List accounts and virtual accounts to choose source balance Source: https://docs.slash.com/docs/v2/get-started/quickstart List accounts and then virtual accounts to choose the source balance. Save the selected subaccount_... id as fromAccount. ```shell curl "https://api.slash.com/v2/accounts" \ -H "X-API-Key: ${SLASH_API_KEY}" \ -H "x-legal-entity: ${SLASH_LEGAL_ENTITY_ID}" curl --get "https://api.slash.com/v2/virtual-accounts" \ -H "X-API-Key: ${SLASH_API_KEY}" \ -H "x-legal-entity: ${SLASH_LEGAL_ENTITY_ID}" \ --data-urlencode "accountId=sa_group_..." ``` -------------------------------- ### Webhook delivery envelope JSON example Source: https://docs.slash.com/docs/v2/webhooks/overview Example of the webhook delivery envelope. It contains the event type, event ID, entity ID, and timestamp, but does not embed the resource's current state. Use the entityId to fetch current state via a GET endpoint. ```json { "event": "card.update", "eventId": "public_webhook_notification_...", "entityId": "c_...", "eventTimestamp": "2026-08-18T01:00:00.000Z" } ``` -------------------------------- ### GET /v2/recipients - Sort by sort field Source: https://docs.slash.com/docs/v2/get-started/pagination Fetch recipients sorted by a specific field using the sort query parameter. For example, sort by name. ```APIDOC ## GET /v2/recipients ### Description Fetch a page of recipients sorted by a specified field. Use the `sort` query parameter to choose the field to sort by. For example, `sort=name` sorts by name. ### Method GET ### Endpoint https://api.slash.com/v2/recipients ### Parameters #### Query Parameters - **sort** (string) - Optional - The field to sort by. The available values are listed on each endpoint's reference page. For recipients, examples include `createdAt`, `name`, and `lastPaidAt`. ### Request Example ``` curl --get "https://api.slash.com/v2/recipients" \ -H "X-API-Key: ${SLASH_API_KEY}" \ -H "x-legal-entity: ${SLASH_LEGAL_ENTITY_ID}" \ --data-urlencode "sort=name" ``` ### Response #### Success Response (200) - **items** (array) - The list of items for the current page. - **metadata** (object) - Pagination metadata. - **count** (integer) - The number of items in the current response. - **nextCursor** (string) - Present when another page may be available. Omitted when the current page is the last page. #### Response Example ``` { "items": [], "metadata": { "count": 0, "nextCursor": "opaque-value" } } ``` ``` -------------------------------- ### GET /v2/recipients - Sorting and cursors error Source: https://docs.slash.com/docs/v2/get-started/pagination Example of an error response when attempting to change the sort while paging with a cursor. The API rejects the request with a 400 invalid_request error. ```APIDOC ## GET /v2/recipients ### Description Attempting to pass a different `sort` or `sortDirection` alongside a `cursor` is rejected with a `400 invalid_request` error. The `details` field is keyed by the offending parameter. ### Method GET ### Endpoint https://api.slash.com/v2/recipients ### Parameters #### Query Parameters - **cursor** (string) - Optional - The opaque cursor value from a previous response. - **sort** (string) - Optional - The field to sort by. Must match the sort used to generate the cursor. - **sortDirection** (string) - Optional - The direction to sort. Must match the sort direction used to generate the cursor. ### Error Response #### Error Response (400) - **code** (string) - The error code, e.g., `invalid_request`. - **message** (string) - A human-readable error message. - **details** (object) - An object keyed by the offending parameter, with a description of the error. - **referenceId** (string) - A reference ID for the error. #### Error Response Example ``` { "code": "invalid_request", "message": "Invalid `sort`: The sort cannot change between pages. Omit `sort` while paging, or start a new listing without `cursor`.", "details": { "/sort": "The sort cannot change between pages. Omit `sort` while paging, or start a new listing without `cursor`." }, "referenceId": "4001-2alj5if" } ``` ``` -------------------------------- ### Create International Wire Request Body Source: https://docs.slash.com/docs/v2/money-movement/international-wires/sending JSON example of the request body for creating an international wire. For foreign-currency wires, include fxQuoteId and ensure the amount matches the quote. For USD wires, omit fxQuoteId. Amounts are in minor units (e.g., 10000 GBP = GBP 100.00). The response type is international_wire and can be retrieved via GET /v2/transfers/international-wire/{transferId}. International wires cannot be canceled through the API. ```json { "amount": { "amount": 10000, "currency": "GBP" }, "fromAccount": "subaccount_operations123", "destinationId": "le_contact_destination_intl123", "description": "International invoice 1042", "internationalWire": { "fxQuoteId": "fx_rate_quote_123", "purposeCode": "GDDS", "remittanceInfo": "Invoice 1042", "intermediaryBankBic": "BARCGB22" } } ``` -------------------------------- ### Create a book transfer with curl Source: https://docs.slash.com/docs/v2/money-movement/book/sending POST to /v2/transfers/book with the required headers and a JSON body specifying the amount, source and destination accounts, and a description. The amount is in minor units (e.g., 250000 USD = USD 2,500.00). Requires a user API key with book-transfer access from an allowlisted IP. ```bash curl https://api.slash.com/v2/transfers/book \ -X POST \ -H "X-API-Key: $SLASH_API_KEY" \ -H "x-legal-entity: $SLASH_LEGAL_ENTITY_ID" \ -H "X-Idempotency-Key: payroll-funding-2026-08" \ -H "Content-Type: application/json" \ -d '{ "amount": { "amount": 250000, "currency": "USD" }, "fromAccount": "subaccount_operations123", "toAccount": "subaccount_payroll123", "description": "August payroll funding" }' ``` -------------------------------- ### Create invoice series with POST /v2/invoices/series Source: https://docs.slash.com/docs/v2/invoices/recurring-invoices Creates a recurring invoice series with a monthly day-of-month recurrence, a start date, timezone, payment terms, an end after 12 invoices, and one line item. Requires an API key and legal entity ID in headers; uses an idempotency key. After creation, each sent invoice schedules the next one. ```curl curl https://api.slash.com/v2/invoices/series \ -X POST \ -H "X-API-Key: $SLASH_API_KEY" \ -H "x-legal-entity: $SLASH_LEGAL_ENTITY_ID" \ -H "X-Idempotency-Key: series-acme-retainer" \ -H "Content-Type: application/json" \ -d '{ "customerId": "le_cus_2rj4l7hmrrrcv", "accountId": "sa_group_2rj4l7hmrrrcv", "recurrence": { "type": "monthly_day_of_month", "dayOfMonth": 1 }, "startDate": "2026-11-01", "timezone": "America/New_York", "paymentTermsDays": 30, "end": { "type": "after_count", "count": 12 }, "lineItems": [ { "name": "Monthly retainer", "quantity": 1, "unitAmount": { "amount": 500000, "currency": "USD" } } ] }' ``` -------------------------------- ### POST /v2/invoices Source: https://docs.slash.com/docs/v2/invoices/creating-and-sending Creates an invoice with a customer, line items, and dates. Slash numbers it from your invoice settings unless you send a `number`, adds up the totals, renders the PDF, and emails it to the customer right away with a link to the payment page (`payUrl`). ```APIDOC ## POST /v2/invoices ### Description Creates an invoice with a customer, line items, and dates. Slash numbers it from your invoice settings unless you send a `number`, adds up the totals, renders the PDF, and emails it to the customer right away with a link to the payment page (`payUrl`). ### Method POST ### Endpoint /v2/invoices ### Parameters #### Headers - **X-API-Key** (string) - Required - Your API key. - **x-legal-entity** (string) - Required - The legal entity ID. - **X-Idempotency-Key** (string) - Required - A unique key to ensure idempotency. - **Content-Type** (string) - Required - Must be `application/json`. #### Request Body - **customerId** (string) - Required - The ID of the customer. - **accountId** (string) - Required - The ID of the account where payments settle. - **issueDate** (string) - Required - The issue date of the invoice (YYYY-MM-DD). - **dueDate** (string) - Required - The due date of the invoice (YYYY-MM-DD). - **timezone** (string) - Optional - The timezone for the invoice. - **lineItems** (array) - Required - List of line items. - **name** (string) - Required - The name of the line item. - **quantity** (number) - Required - The quantity. - **unitAmount** (object) - Required - The unit amount. - **amount** (number) - Required - The amount in minor units. - **currency** (string) - Required - The currency code. - **number** (string) - Optional - Custom invoice number. - **scheduledSendDate** (string) - Optional - Date to schedule sending the invoice. - **paymentMethods** (array) - Optional - Additional payment methods to offer. - **catalogItemId** (string) - Optional - The ID of a catalog item for a line item. ### Request Example ``` curl https://api.slash.com/v2/invoices \ -X POST \ -H "X-API-Key: $SLASH_API_KEY" \ -H "x-legal-entity: $SLASH_LEGAL_ENTITY_ID" \ -H "X-Idempotency-Key: invoice-acme-2026-10" \ -H "Content-Type: application/json" \ -d '{ "customerId": "le_cus_2rj4l7hmrrrcv", "accountId": "sa_group_2rj4l7hmrrrcv", "issueDate": "2026-10-01", "dueDate": "2026-10-31", "timezone": "America/New_York", "lineItems": [ { "name": "Consulting", "quantity": 10, "unitAmount": { "amount": 15000, "currency": "USD" } } ] }' ``` ### Response #### Success Response (200) - **payUrl** (string) - The link to the payment page. #### Response Example ``` { "payUrl": "https://pay.slash.com/invoice/..." } ``` ``` -------------------------------- ### Create an invoice with curl Source: https://docs.slash.com/docs/v2/invoices/creating-and-sending Send a POST request to create an invoice with a customer, line items, and dates. Slash numbers it from your invoice settings unless you provide a number, calculates totals, renders the PDF, and emails it to the customer with a payment link. ```bash curl https://api.slash.com/v2/invoices \ -X POST \ -H "X-API-Key: $SLASH_API_KEY" \ -H "x-legal-entity: $SLASH_LEGAL_ENTITY_ID" \ -H "X-Idempotency-Key: invoice-acme-2026-10" \ -H "Content-Type: application/json" \ -d '{ "customerId": "le_cus_2rj4l7hmrrrcv", "accountId": "sa_group_2rj4l7hmrrrcv", "issueDate": "2026-10-01", "dueDate": "2026-10-31", "timezone": "America/New_York", "lineItems": [ { "name": "Consulting", "quantity": 10, "unitAmount": { "amount": 15000, "currency": "USD" } } ] }' ``` -------------------------------- ### Set environment variables for Slash API v2 Source: https://docs.slash.com/docs/v2/get-started/quickstart Set the required environment variables for the Slash API v2 quickstart. The API key must be a user API key created in the dashboard; keys created under a legal entity's API management page are not accepted and return 403 user_api_key_required. ```shell export SLASH_API_KEY="..." export SLASH_LEGAL_ENTITY_ID="le_..." ``` -------------------------------- ### card.delete example payload Source: https://docs.slash.com/docs/v2/webhooks/event-types Example payload for the card.delete webhook, emitted when a card is closed. The event field is always card.delete. ```json { "event": "card.delete", "eventId": "", "entityId": "c_example", "eventTimestamp": "2023-11-07T05:31:56Z" } ``` -------------------------------- ### aggregated_transaction.update example payload Source: https://docs.slash.com/docs/v2/webhooks/event-types Example payload for the aggregated_transaction.update webhook, emitted when an existing Transaction changes status or displayed details. The same Transaction can emit this event more than once. ```json { "event": "aggregated_transaction.update", "eventId": "", "entityId": "agg_tx_example", "eventTimestamp": "2023-11-07T05:31:56Z" } ``` -------------------------------- ### Create a recipient Source: https://docs.slash.com/docs/v2/get-started/quickstart Create a recipient (who you pay). The recipient does not hold bank instructions. Save the returned le_c_... id. ```shell curl "https://api.slash.com/v2/recipients" \ -X POST \ -H "X-API-Key: ${SLASH_API_KEY}" \ -H "x-legal-entity: ${SLASH_LEGAL_ENTITY_ID}" \ -H "X-Idempotency-Key: vendor-1042" \ -H "Content-Type: application/json" \ --data '{ "name": "Acme Supplies", "recipientType": "vendor", "recipientLegalName": "Acme Supplies LLC", "recipientEmail": "payments@example.com" }' ``` -------------------------------- ### expense_report.update example payload Source: https://docs.slash.com/docs/v2/webhooks/event-types Example payload for the expense_report.update webhook, emitted when an existing expense report changes, including updates to its status or editable report details. ```json { "event": "expense_report.update", "eventId": "", "entityId": "expense_report_example", "eventTimestamp": "2023-11-07T05:31:56Z" } ``` -------------------------------- ### Source: https://docs.slash.com/docs/payments/payment-elements Loads the payment intent for the given clientSecret and provides state to everything inside it. Render one provider per payment intent. ```APIDOC ## ### Description Loads the payment intent for the given `clientSecret` and provides state to everything inside it. Render one provider per payment intent. ### Props - **clientSecret** (string) - Required - From the `POST /payments/payment-intent` response. Changing it remounts the provider’s children with fresh, isolated state. - **locale** (string | 'auto') - Optional - BCP 47 locale for the payment form (for example `"en"`). `'auto'` follows the browser’s language. Unsupported languages fall back to English. - **children** (ReactNode) - Your checkout UI. ### Notes The provider is safe to render on the server: it emits non-interactive placeholders until it runs in the browser. ``` -------------------------------- ### card_creation.event example payload Source: https://docs.slash.com/docs/v2/webhooks/event-types Example payload for the card_creation.event webhook. The event field is always card_creation.event, and eventId is the per-endpoint notification id used to deduplicate delivery retries. ```json { "event": "card_creation.event", "eventId": "", "entityId": "c_example", "eventTimestamp": "2023-11-07T05:31:56Z" } ``` -------------------------------- ### Connect Slash MCP server in ChatGPT Source: https://docs.slash.com/docs/mcp Enter the connection URL in ChatGPT's Connected Apps settings to add the Slash MCP server. After clicking Connect, the Slash tools become available in ChatGPT conversations. ```text https://mcp.slash.com/mcp?apiKey=YOUR_API_KEY ``` -------------------------------- ### Create a realtime transfer with curl Source: https://docs.slash.com/docs/v2/money-movement/realtime/sending POST to /v2/transfers/realtime to create a realtime transfer. Requires a user API key with realtime payment access from an allowlisted IP. The amount is in minor units (1250 = USD 12.50). The response is a Transfer with type 'realtime'. Realtime transfers cannot be canceled through the API. ```bash curl https://api.slash.com/v2/transfers/realtime \ -X POST \ -H "X-API-Key: $SLASH_API_KEY" \ -H "x-legal-entity: $SLASH_LEGAL_ENTITY_ID" \ -H "X-Idempotency-Key: realtime-invoice-1042" \ -H "Content-Type: application/json" \ -d '{ "amount": { "amount": 1250, "currency": "USD" }, "fromAccount": "subaccount_operations123", "destinationId": "le_contact_destination_bank123", "description": "Invoice 1042", "realtime": { "remittanceInfo": "Invoice 1042" } }' ``` -------------------------------- ### Create or replace an accounting mapping (curl) Source: https://docs.slash.com/docs/v2/accounting/rules-and-automation Creates or replaces a rule (mapping) that sets a dimension for transactions matching a source. New rules apply to entries created from then on; set applyToExistingEntries to also recode entries still in_review. Sending an existing rule again with that flag applies it to those entries. ```bash curl -X PUT "https://api.slash.com/v2/accounting/mappings" \ -H "X-API-Key: $SLASH_API_KEY" \ -H "x-legal-entity: $SLASH_LEGAL_ENTITY_ID" \ -H "Content-Type: application/json" \ -d '{ "source": { "type": "merchant", "id": "merchant_v2_2rj4l7hmrrrcv" }, "dimensionKey": "account", "valueId": "accounting_account_2rj4l7hmrrrcv", "applyToExistingEntries": true }' ``` -------------------------------- ### get_legal_entity Source: https://docs.slash.com/docs/mcp Tool for the GET /legal-entity endpoint, exposed by the Slash MCP server. ```APIDOC ## get_legal_entity ### Description Tool for the GET /legal-entity endpoint, exposed by the Slash MCP server. ### Method GET ### Endpoint /legal-entity ```