General

Payments API: how to integrate Pix, cards and boleto into your system

A guide to payments APIs: what they are, how the integration works and how to charge by Pix, credit card and boleto in Brazil straight from your website, app or system.

By Equipe Sila Pay3 min read
Two smiling colleagues talking beside a laptop in a small office

Payment links cover a lot of sales, but at some point your business needs more: charging customers directly on your website, in your app or from your ERP, with no copying and pasting. That is where a payments API comes in.

What is a payments API

An API (application programming interface) is the communication channel between your system and the payment platform. With it, your software creates charges, tracks their status and receives confirmations automatically, using HTTP requests with JSON data.

How the integration works, step by step

  1. Open an account and generate your keys: in the Sila Pay dashboard, the API Key menu generates your api-key and secret-key, which are sent in the header of every request.
  2. Create the charge: your system sends a POST to https://api.silapay.pro/v1/transactions with the amount, the customer details and the payment method (pix, creditCard or billet).
  3. Show the payment to the customer: for Pix, the response includes the copy-and-paste code; for boleto, the charge is issued with the due date you set; for cards, you get the transaction result.
  4. Get the confirmation: provide a postbackUrl and your system is notified by webhook whenever the payment status changes.

Pix, cards and boleto: what is different

  • Pix: the charge is created with a pending status and a copy-and-paste code; the confirmation arrives by webhook as soon as the payment is detected.
  • Credit card: supports installments, set by the number of installments in the request, and can send the customer to a success page (successUrl).
  • Boleto: you set the due date and can send your own reference (externalReference) to link the charge to the order.

Benefits of integrating via API

  • You control the experience: you decide where and how the charge is shown to the customer.
  • Less manual work: orders are created and confirmed automatically.
  • One integration, three payment methods: Pix, card and boleto on the same endpoint.
  • Grows with your business: the same flow handles a few orders or many orders a day.

Ready to integrate payments into your system? Open your Sila Pay account

Integration best practices

  • Keep keys on the server: never put your api-key and secret-key in the front end or in your app; calls must come from your back end.
  • Verify webhooks: check the X-Silapay-Signature header before marking an order as paid.
  • Store the transaction ID: link the id returned by the API to the order in your system.
  • Handle errors and timeouts: show a clear message and let customers retry without creating duplicate charges.
  • Start with small amounts: test the full flow before rolling it out to all customers.

Frequently asked questions

Do I need a developer?

To integrate via the API, yes: someone has to code the calls in your system. If you use WooCommerce or Shopify, the Sila Pay plugins are a simpler route; and if you have no website, a payment link does the job.

Where is the documentation?

At doc.silapay.pro, covering Pix, card, boleto, balance and webhook calls, with request and response examples.

Is the API only for receiving payments?

No. Besides creating charges, the documentation covers sending Pix payments (cash-out) and checking your balance.

Do I need a Brazilian company (CNPJ)?

With Sila Pay you can sell as an individual or as a company; the sign-up process lists the documents required in each case.

Integrate Pix, cards and boleto with a single API. Sign up for Sila Pay

#pagamentos#vendas online
ShareWhatsAppLinkedInX

Ready to put this into practice?

Create your Sila Pay account in minutes and start getting paid by Pix, card and payment link.

  • ✓ Free sign-up
  • ✓ No monthly fee
  • ✓ Next-day settlement
Create free account →

Get the next articles

Practical content about payments and online sales, straight to your inbox.

No spam. Unsubscribe anytime.

Read also

Sila Pay

Everything you need to sell, all in one place.

Get started →