API & webhooks

Customer paid. Your product moves forward.

Create Pix payment requests and automate orders, access and services.

API & webhooks

Flow complete

Order #1042

Updated without manual work

Payment request created

01

Payment confirmed

02

Order released

03

Your product moves forward.

Illustrative example

Integration

Automate from payment request to confirmation.

Simple REST API
Create Pix checkout links without duplicate charges.
Signed webhooks
Receive an event whenever a payment request changes.
Official SDK, optional
Use the SDK or your preferred language.
How it works

One integration. Three steps.

The payment request starts in the API. The webhook updates your system.

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.

webhook.ts
// 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);
});

Build with your existing stack. Create payment requests and confirm payments without changing your architecture.

JavaScriptTypeScriptPythonPHP

Integrate with code or AI.

Give /llms.txt to your AI and speed up the integration.

View /llms.txt
prompt for your AI

Help me integrate payments with TroqPay. Use the documentation as context: /llms.txt

FAQ

Integration questions

The essentials before opening the editor.

Create your first payment request.

Test the integration and move to production after KYB.