Connectors / Finance · HTTP Connector
BTCPay Server integration and API
Create an invoice, create a payment request and create a pull payment in BTCPay Server, and start a workflow when BTCPay Server sends “Invoice created”.
What can you do with BTCPay Server on Tray.ai?
BTCPay Server is a free, open-source, self-hosted payment processor that lets merchants accept Bitcoin and Lightning payments through invoices, payment requests and payouts. Tray.ai connects to BTCPay Server through the HTTP Connector, so your workflows can call the BTCPay Server API alongside the rest of your stack.
- When BTCPay Server sends “Invoice settled”, mark the order paid in your ecommerce store.
- When BTCPay Server sends “Invoice expired”, release the reserved stock and notify the customer.
- Create an invoice in BTCPay Server when a customer picks Bitcoin at checkout.
- When BTCPay Server sends “Payout approved”, record the payment in your accounting system.
- Connects through
- HTTP Connector
- Authentication
- An API key in a request header or basic authentication
- Base URL
- https://{your-btcpay-server}/api/v1
Set it up
Connect BTCPay Server to Tray.ai
Each step uses BTCPay Server's own API details, from its documentation.
Save BTCPay Server's API key
Save the key as a Tray.ai authentication. The HTTP Client puts it in the request header, read from $.auth. The key stays out of the workflow and out of the logs.
Point the HTTP Client at the API
Add an HTTP Client step and use https://{your-btcpay-server}/api/v1 as the base URL. Or paste a cURL example from BTCPay Server's API docs, and Tray.ai fills in the method, URL, and headers.
Start with “List invoices”
It's one of 22 documented actions, under Invoices. The response comes back as data the next step can map into your other apps.
Start workflows from BTCPay Server events
Give BTCPay Server the URL of a Tray.ai webhook trigger. “Invoice created” can then start a workflow, and so can 9 other events.
Workflows to build with BTCPay Server
Connect BTCPay Server with QuickBooks, Slack and HubSpot
Each one uses actions and events from BTCPay Server's own API documentation.
Record settled BTCPay invoices in QuickBooks
When
Invoice settled
Then
- Record a sales receipt in QuickBooks
- Post the payment to the finance channel in Slack
With QuickBooks and Slack
Create BTCPay payment requests for won HubSpot deals
When
A deal closes in HubSpot
Then
- Create a payment request for the deal amount
- Log the request on the deal in HubSpot
With HubSpot
Apps you can build on BTCPay Server data
Internal tools your team can build with an AI assistant, each one using BTCPay Server calls from its API documentation.
Payout approval board
Lists store payouts and lets finance approve, cancel or mark one as paid.
Invoice status dashboard
Lists invoices with settled and expired events and lets staff refund an invoice.
Payment request tracker
Lists payment requests and lets staff update or archive them.
BTCPay Server MCP server for AI agents
Build an MCP server on BTCPay Server in Agent Gateway and choose which actions your agents can call. Every call runs with access control and an audit trail. How Agent Gateway works
- List invoices
- List payment requests
- List pull payments
- List store payouts
- List webhooks
- Create an invoice
- Update an invoice
- Archive an invoice
What the BTCPay Server API covers
5 resources and 22 documented actions, each one a call the HTTP Connector can make from a Tray.ai workflow. Connecting it takes a few clicks: here's how. New to APIs? Read what an API integration is.
Invoices
- List invoices
- Create an invoice
- Update an invoice
- Archive an invoice
- Refund an invoice
Payment requests
- List payment requests
- Create a payment request
- Update a payment request
- Archive a payment request
Pull payments
- List pull payments
- Create a pull payment
- Archive a pull payment
Payouts
- List store payouts
- Create a payout
- Approve a payout
- Cancel a payout
- Mark a payout as paid
Webhooks
- List webhooks
- Create a webhook
- Update a webhook
- Delete a webhook
- Redeliver a webhook delivery
Events BTCPay Server can send to a Tray.ai webhook trigger
- Invoice created
- Invoice received payment
- Invoice processing
- Invoice settled
- Invoice expired
- Invoice invalid
- Payment request created
- Payment request status changed
- Payout created
- Payout approved
Checked against BTCPay Server's own documentation on 2026-10-22
How Tray.ai makes this work
BTCPay Server plugs into the whole Tray.ai platform
Tray iPaaS
Integrate and automate across 12,000+ apps, databases, APIs, and services with visual workflows, error handling, and observability.
Learn moreTray Helix agents
Agents in the apps your teams run on Tray Helix that read, write, and act in BTCPay Server, with a person's approval on any tool you choose.
Learn moreAgent Gateway for MCP
Expose BTCPay Server actions as governed MCP tools: observable, rate-limited and authenticated.
Learn moreTray Helix
Build apps on BTCPay Server data with your AI assistant, then deploy, run, and govern them on Tray.ai.
Learn moreMore finance apps on Tray.ai
Dedicated connectors and other apps Tray.ai reaches in the same category. See every finance connector →
Frequently asked questions
What can a Tray.ai workflow do in BTCPay Server?
The BTCPay Server API documents 22 actions across 5 resources (Invoices, Payment requests, Pull payments, Payouts, Webhooks). For example: List invoices; List payment requests; List pull payments. A workflow can make any documented call through the HTTP Connector.
How does Tray.ai authenticate with BTCPay Server?
The BTCPay Server API uses an API key in a request header and basic authentication. You save it once as a Tray.ai authentication, and the HTTP Connector adds it to every request.
Which BTCPay Server events can start a Tray.ai workflow?
BTCPay Server sends 10 events to a webhook URL, for example: Invoice created; Invoice received payment; Invoice processing; Invoice settled; Invoice expired; Invoice invalid; Payment request created; Payment request status changed. A Tray.ai webhook trigger receives them and starts a workflow.
See BTCPay Server working against your stack.
We'll walk through a tailored demo with your systems plugged in.
Thanks. Someone from our team will be in touch soon.