Skip to main content
This guide will help you create your first transaction using the Rinne API.

Prerequisites

Before you begin, you need:

Base URLs

Use the sandbox environment for testing. All examples in this guide use the sandbox URL.

Step 1: Authenticate your requests

All API requests require authentication using your API key in the x-api-key header.
For more details on authentication methods and best practices, see the Authentication guide.

Step 2: Create a fee policy

Before creating merchants, set up a fee policy to define how much you’ll charge for processing transactions.
This creates a simple fee policy that charges 0.99% for PIX transactions and 3.0% for all other payment methods. Save the policy id from the response.
Learn more about fee policies and pricing rules in the Pricing concept guide.

Step 3: Create a merchant

Organizations can create merchants to process payments on their behalf.
Save the merchant id from the response. You’ll need it for the next steps.
Sandbox testing: In sandbox, the contact phone number’s last digit controls affiliation behavior:
  • Ending with 1: Affiliation approved after document processing
  • Ending with 2: Affiliation rejected at the background check, once documents are submitted
  • Ending with 3: Affiliation rejected after document processing
The contact’s CPF decides the biometric verification: an even last digit approves it and an odd one reproves it, which leaves the affiliation waiting. See Test onboarding in the sandbox for details.
For more details on merchants and the company hierarchy, see the Organizations & Merchants guide.

Step 4: Create an affiliation

Before processing transactions, create an affiliation with a payment provider.
The affiliation is created with status WAITING_DOCUMENTS and an onboarding_url: the provider needs the contact’s identity document and biometric verification, and the merchant’s articles of incorporation, before it can decide. Open onboarding_url on a phone and complete it, or supply the items through the API. Once the last one is in, Rinne submits the affiliation, and when the provider approves it the status changes to ACTIVE.
See Onboarding for the onboarding link, the API flow and how to test each outcome in the sandbox.
Learn more about affiliations and payment providers in the Affiliations concept guide.

Step 5: Create a PIX transaction

Once your affiliation is active, you can create transactions.
The response includes a PIX QR code that your customer can scan to complete the payment:
For more details on PIX payments and transaction flows, see the PIX Payments guide and Transactions concept guide.

Step 6: Monitor transaction status

You can check the transaction status at any time:
Or set up webhooks to receive real-time status updates:
Learn how to set up webhooks for real-time notifications in the Webhooks guide.

Next steps

rinne-js SDK

Accept Apple Pay & Google Pay on the web

Authentication

Learn about API authentication

PIX Payments

Process instant PIX payments

Webhooks

Set up event notifications