Skip to content
BTCPay Server logo

Connectors / Finance · HTTP Connector

Automate BTCPay Server with Tray.ai

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”.

Great — a couple more details

This helps us connect you with the right person. Optional, and you can skip it.

See all connectors

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.

Step 1

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.

Step 2

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.

Step 3

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.

Step 4

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.

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.

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

docs.btcpayserver.org/API/Greenfield/v1

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.

Great — a couple more details

This helps us connect you with the right person. Optional, and you can skip it.