Add Pix to your product with just a few lines.
A straightforward REST API, signed webhooks and a JS/TS SDK. Integrate in minutes, or let your AI do it for you with /llms.txt.
import { Troqpay } from "@troqpay/sdk";
const troqpay = new Troqpay({
apiKey: process.env.TROQPAY_API_KEY!,
});
// create a Pix charge
const checkout = await troqpay.checkouts.create(
{
amount: 12990,
description: "Pro plan",
externalId: "order_1001",
},
{ idempotencyKey: "order_1001" },
);
console.log(checkout.checkoutUrl);Built for developers: clear, predictable and reliable.
A Pix payment is an event.
From API key to confirmation, the path is short. Webhooks update your system without polling the API.
Get your key
Generate a trq_test_ key in the dashboard and integrate without touching production.
Create the charge
One call creates the Pix checkout and returns a payment link.
Confirm via webhook
The checkout.paid event tells your system as soon as the Pix payment is confirmed.
// your endpoint receives TroqPay events
app.post("/webhooks/troqpay", (req, res) => {
const signature = req.headers["x-troqpay-signature"];
// validate the signature before trusting it
if (!isValidSignature(req.body, signature)) {
return res.sendStatus(400);
}
if (req.body.type === "checkout.paid") {
// release access or settle the order
}
res.sendStatus(200);
});REST API: call it from your existing stack. The SDK supports JS/TS; the API works with any language.
Your AI already knows how to integrate TroqPay.
/llms.txt gives your AI the context it needs from our API and SDK. Open it in Claude, ChatGPT or Lovable and let AI write the integration.
View /llms.txt“Help me integrate payments with TroqPay. Use the documentation as context: /llms.txt”
Integration questions
The essentials before opening the editor.
Get your key and create your first payment request.
The docs are open. Start with a test key and move to production when you're ready.