curl --request POST \
--url https://api-sandbox.rinne.com.br/core/v1/merchants \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"full_name": "Merchant Store Ltda.",
"name": "Merchant Store",
"document_number": "16525269000121",
"document_type": "CNPJ",
"document_tax_type": "PJ",
"mcc": "5912",
"contact": {
"first_name": "Store",
"last_name": "Manager",
"phone": "+551188888888",
"email": "[email protected]",
"mother_name": "Manager Mother",
"birth_date": "20-05-1985",
"document_number": "81146431023",
"politically_exposed": false,
"declared_income": 5000,
"occupation": "SOFTWARE_DEVELOPER",
"net_worth": 50000,
"role": "PARTNER",
"address": {
"street": "Merchant Street",
"street_number": "789",
"neighborhood": "Business District",
"zipcode": "11223344",
"country": "076",
"state": "SP",
"city": "São Paulo"
}
},
"address": {
"street": "Store Address",
"street_number": "456",
"neighborhood": "Commercial Area",
"zipcode": "55667788",
"country": "076",
"state": "RJ",
"city": "Rio de Janeiro"
},
"transfer_configurations": {
"automatic_transfer_enabled": true,
"transfer_frequency": "WEEKLY",
"rail": "PIX",
"utc_hour_of_day": 12,
"day_of_week": 1,
"day_of_month": 1,
"min_balance": 1000
},
"declared_revenue": 50000,
"website_url": "https://merchantstore.com",
"bank_account": {
"branch_number": "1234",
"account_number": "123456",
"account_type": "CHECKING",
"account_holder_name": "Merchant Store Ltda.",
"account_holder_document_number": "16525269000121",
"ispb": "00000000"
}
}
'import requests
url = "https://api-sandbox.rinne.com.br/core/v1/merchants"
payload = {
"full_name": "Merchant Store Ltda.",
"name": "Merchant Store",
"document_number": "16525269000121",
"document_type": "CNPJ",
"document_tax_type": "PJ",
"mcc": "5912",
"contact": {
"first_name": "Store",
"last_name": "Manager",
"phone": "+551188888888",
"email": "[email protected]",
"mother_name": "Manager Mother",
"birth_date": "20-05-1985",
"document_number": "81146431023",
"politically_exposed": False,
"declared_income": 5000,
"occupation": "SOFTWARE_DEVELOPER",
"net_worth": 50000,
"role": "PARTNER",
"address": {
"street": "Merchant Street",
"street_number": "789",
"neighborhood": "Business District",
"zipcode": "11223344",
"country": "076",
"state": "SP",
"city": "São Paulo"
}
},
"address": {
"street": "Store Address",
"street_number": "456",
"neighborhood": "Commercial Area",
"zipcode": "55667788",
"country": "076",
"state": "RJ",
"city": "Rio de Janeiro"
},
"transfer_configurations": {
"automatic_transfer_enabled": True,
"transfer_frequency": "WEEKLY",
"rail": "PIX",
"utc_hour_of_day": 12,
"day_of_week": 1,
"day_of_month": 1,
"min_balance": 1000
},
"declared_revenue": 50000,
"website_url": "https://merchantstore.com",
"bank_account": {
"branch_number": "1234",
"account_number": "123456",
"account_type": "CHECKING",
"account_holder_name": "Merchant Store Ltda.",
"account_holder_document_number": "16525269000121",
"ispb": "00000000"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
full_name: 'Merchant Store Ltda.',
name: 'Merchant Store',
document_number: '16525269000121',
document_type: 'CNPJ',
document_tax_type: 'PJ',
mcc: '5912',
contact: {
first_name: 'Store',
last_name: 'Manager',
phone: '+551188888888',
email: '[email protected]',
mother_name: 'Manager Mother',
birth_date: '20-05-1985',
document_number: '81146431023',
politically_exposed: false,
declared_income: 5000,
occupation: 'SOFTWARE_DEVELOPER',
net_worth: 50000,
role: 'PARTNER',
address: {
street: 'Merchant Street',
street_number: '789',
neighborhood: 'Business District',
zipcode: '11223344',
country: '076',
state: 'SP',
city: 'São Paulo'
}
},
address: {
street: 'Store Address',
street_number: '456',
neighborhood: 'Commercial Area',
zipcode: '55667788',
country: '076',
state: 'RJ',
city: 'Rio de Janeiro'
},
transfer_configurations: {
automatic_transfer_enabled: true,
transfer_frequency: 'WEEKLY',
rail: 'PIX',
utc_hour_of_day: 12,
day_of_week: 1,
day_of_month: 1,
min_balance: 1000
},
declared_revenue: 50000,
website_url: 'https://merchantstore.com',
bank_account: {
branch_number: '1234',
account_number: '123456',
account_type: 'CHECKING',
account_holder_name: 'Merchant Store Ltda.',
account_holder_document_number: '16525269000121',
ispb: '00000000'
}
})
};
fetch('https://api-sandbox.rinne.com.br/core/v1/merchants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.rinne.com.br/core/v1/merchants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'full_name' => 'Merchant Store Ltda.',
'name' => 'Merchant Store',
'document_number' => '16525269000121',
'document_type' => 'CNPJ',
'document_tax_type' => 'PJ',
'mcc' => '5912',
'contact' => [
'first_name' => 'Store',
'last_name' => 'Manager',
'phone' => '+551188888888',
'email' => '[email protected]',
'mother_name' => 'Manager Mother',
'birth_date' => '20-05-1985',
'document_number' => '81146431023',
'politically_exposed' => false,
'declared_income' => 5000,
'occupation' => 'SOFTWARE_DEVELOPER',
'net_worth' => 50000,
'role' => 'PARTNER',
'address' => [
'street' => 'Merchant Street',
'street_number' => '789',
'neighborhood' => 'Business District',
'zipcode' => '11223344',
'country' => '076',
'state' => 'SP',
'city' => 'São Paulo'
]
],
'address' => [
'street' => 'Store Address',
'street_number' => '456',
'neighborhood' => 'Commercial Area',
'zipcode' => '55667788',
'country' => '076',
'state' => 'RJ',
'city' => 'Rio de Janeiro'
],
'transfer_configurations' => [
'automatic_transfer_enabled' => true,
'transfer_frequency' => 'WEEKLY',
'rail' => 'PIX',
'utc_hour_of_day' => 12,
'day_of_week' => 1,
'day_of_month' => 1,
'min_balance' => 1000
],
'declared_revenue' => 50000,
'website_url' => 'https://merchantstore.com',
'bank_account' => [
'branch_number' => '1234',
'account_number' => '123456',
'account_type' => 'CHECKING',
'account_holder_name' => 'Merchant Store Ltda.',
'account_holder_document_number' => '16525269000121',
'ispb' => '00000000'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.rinne.com.br/core/v1/merchants"
payload := strings.NewReader("{\n \"full_name\": \"Merchant Store Ltda.\",\n \"name\": \"Merchant Store\",\n \"document_number\": \"16525269000121\",\n \"document_type\": \"CNPJ\",\n \"document_tax_type\": \"PJ\",\n \"mcc\": \"5912\",\n \"contact\": {\n \"first_name\": \"Store\",\n \"last_name\": \"Manager\",\n \"phone\": \"+551188888888\",\n \"email\": \"[email protected]\",\n \"mother_name\": \"Manager Mother\",\n \"birth_date\": \"20-05-1985\",\n \"document_number\": \"81146431023\",\n \"politically_exposed\": false,\n \"declared_income\": 5000,\n \"occupation\": \"SOFTWARE_DEVELOPER\",\n \"net_worth\": 50000,\n \"role\": \"PARTNER\",\n \"address\": {\n \"street\": \"Merchant Street\",\n \"street_number\": \"789\",\n \"neighborhood\": \"Business District\",\n \"zipcode\": \"11223344\",\n \"country\": \"076\",\n \"state\": \"SP\",\n \"city\": \"São Paulo\"\n }\n },\n \"address\": {\n \"street\": \"Store Address\",\n \"street_number\": \"456\",\n \"neighborhood\": \"Commercial Area\",\n \"zipcode\": \"55667788\",\n \"country\": \"076\",\n \"state\": \"RJ\",\n \"city\": \"Rio de Janeiro\"\n },\n \"transfer_configurations\": {\n \"automatic_transfer_enabled\": true,\n \"transfer_frequency\": \"WEEKLY\",\n \"rail\": \"PIX\",\n \"utc_hour_of_day\": 12,\n \"day_of_week\": 1,\n \"day_of_month\": 1,\n \"min_balance\": 1000\n },\n \"declared_revenue\": 50000,\n \"website_url\": \"https://merchantstore.com\",\n \"bank_account\": {\n \"branch_number\": \"1234\",\n \"account_number\": \"123456\",\n \"account_type\": \"CHECKING\",\n \"account_holder_name\": \"Merchant Store Ltda.\",\n \"account_holder_document_number\": \"16525269000121\",\n \"ispb\": \"00000000\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.rinne.com.br/core/v1/merchants")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"full_name\": \"Merchant Store Ltda.\",\n \"name\": \"Merchant Store\",\n \"document_number\": \"16525269000121\",\n \"document_type\": \"CNPJ\",\n \"document_tax_type\": \"PJ\",\n \"mcc\": \"5912\",\n \"contact\": {\n \"first_name\": \"Store\",\n \"last_name\": \"Manager\",\n \"phone\": \"+551188888888\",\n \"email\": \"[email protected]\",\n \"mother_name\": \"Manager Mother\",\n \"birth_date\": \"20-05-1985\",\n \"document_number\": \"81146431023\",\n \"politically_exposed\": false,\n \"declared_income\": 5000,\n \"occupation\": \"SOFTWARE_DEVELOPER\",\n \"net_worth\": 50000,\n \"role\": \"PARTNER\",\n \"address\": {\n \"street\": \"Merchant Street\",\n \"street_number\": \"789\",\n \"neighborhood\": \"Business District\",\n \"zipcode\": \"11223344\",\n \"country\": \"076\",\n \"state\": \"SP\",\n \"city\": \"São Paulo\"\n }\n },\n \"address\": {\n \"street\": \"Store Address\",\n \"street_number\": \"456\",\n \"neighborhood\": \"Commercial Area\",\n \"zipcode\": \"55667788\",\n \"country\": \"076\",\n \"state\": \"RJ\",\n \"city\": \"Rio de Janeiro\"\n },\n \"transfer_configurations\": {\n \"automatic_transfer_enabled\": true,\n \"transfer_frequency\": \"WEEKLY\",\n \"rail\": \"PIX\",\n \"utc_hour_of_day\": 12,\n \"day_of_week\": 1,\n \"day_of_month\": 1,\n \"min_balance\": 1000\n },\n \"declared_revenue\": 50000,\n \"website_url\": \"https://merchantstore.com\",\n \"bank_account\": {\n \"branch_number\": \"1234\",\n \"account_number\": \"123456\",\n \"account_type\": \"CHECKING\",\n \"account_holder_name\": \"Merchant Store Ltda.\",\n \"account_holder_document_number\": \"16525269000121\",\n \"ispb\": \"00000000\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.rinne.com.br/core/v1/merchants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"full_name\": \"Merchant Store Ltda.\",\n \"name\": \"Merchant Store\",\n \"document_number\": \"16525269000121\",\n \"document_type\": \"CNPJ\",\n \"document_tax_type\": \"PJ\",\n \"mcc\": \"5912\",\n \"contact\": {\n \"first_name\": \"Store\",\n \"last_name\": \"Manager\",\n \"phone\": \"+551188888888\",\n \"email\": \"[email protected]\",\n \"mother_name\": \"Manager Mother\",\n \"birth_date\": \"20-05-1985\",\n \"document_number\": \"81146431023\",\n \"politically_exposed\": false,\n \"declared_income\": 5000,\n \"occupation\": \"SOFTWARE_DEVELOPER\",\n \"net_worth\": 50000,\n \"role\": \"PARTNER\",\n \"address\": {\n \"street\": \"Merchant Street\",\n \"street_number\": \"789\",\n \"neighborhood\": \"Business District\",\n \"zipcode\": \"11223344\",\n \"country\": \"076\",\n \"state\": \"SP\",\n \"city\": \"São Paulo\"\n }\n },\n \"address\": {\n \"street\": \"Store Address\",\n \"street_number\": \"456\",\n \"neighborhood\": \"Commercial Area\",\n \"zipcode\": \"55667788\",\n \"country\": \"076\",\n \"state\": \"RJ\",\n \"city\": \"Rio de Janeiro\"\n },\n \"transfer_configurations\": {\n \"automatic_transfer_enabled\": true,\n \"transfer_frequency\": \"WEEKLY\",\n \"rail\": \"PIX\",\n \"utc_hour_of_day\": 12,\n \"day_of_week\": 1,\n \"day_of_month\": 1,\n \"min_balance\": 1000\n },\n \"declared_revenue\": 50000,\n \"website_url\": \"https://merchantstore.com\",\n \"bank_account\": {\n \"branch_number\": \"1234\",\n \"account_number\": \"123456\",\n \"account_type\": \"CHECKING\",\n \"account_holder_name\": \"Merchant Store Ltda.\",\n \"account_holder_document_number\": \"16525269000121\",\n \"ispb\": \"00000000\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "a3dbd0c2-9f79-4f86-8caa-47779b3f2793",
"name": "Example Company",
"full_name": "Example Company LTDA",
"document_number": "16525269000121",
"document_type": "CNPJ",
"contact": {
"first_name": "John",
"last_name": "Silva",
"phone": "+551199999999",
"email": "[email protected]",
"mother_name": "Maria Silva",
"birth_date": "15-08-1990",
"document_number": "81146431023",
"politically_exposed": false,
"declared_income": 5000,
"occupation": "SOFTWARE_DEVELOPER",
"net_worth": 50000,
"role": "PARTNER",
"address": {
"street": "Contact Street",
"street_number": "456",
"complement": "Apt 201",
"neighborhood": "Contact Neighborhood",
"zipcode": "87654321",
"country": "076",
"state": "RJ",
"city": "Rio de Janeiro"
}
},
"status": "ACTIVE",
"address": {
"street": "Example Street",
"street_number": "123",
"complement": "Suite 101",
"neighborhood": "Downtown",
"zipcode": "12345678",
"country": "076",
"state": "SP",
"city": "São Paulo"
},
"transfer_configurations": {
"automatic_transfer_enabled": true,
"transfer_frequency": "DAILY",
"rail": "PIX",
"utc_hour_of_day": 12,
"day_of_week": 1,
"day_of_month": 1,
"min_balance": 1000
},
"created_at": "2023-01-01T00:00:00Z",
"updated_at": "2023-01-01T00:00:00Z",
"document_tax_type": "PJ",
"company_logo_url": "https://example.com/logo.png",
"website_url": "https://example.com",
"webhook_enabled": false,
"kyc_enabled": false,
"declared_revenue": 50000
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation error",
"status": 400,
"details": {
"issues": [
{
"field": "email",
"type": "REQUIRED",
"message": "Field 'email' is required",
"value": "invalid_value",
"constraints": {
"min": 18,
"max": 120
}
}
]
},
"path": "/companies",
"timestamp": "2023-12-01T10:00:00.000Z",
"requestId": "req_123456789"
}
}{
"error": {
"code": "AUTHENTICATION_ERROR",
"message": "Authentication required to access this resource",
"status": 401,
"details": {
"reason": "Invalid API key"
},
"path": "/companies/me",
"timestamp": "2023-12-01T10:00:00.000Z",
"requestId": "req_123456789"
}
}{
"error": {
"code": "AUTHORIZATION_ERROR",
"message": "You need 'admin' permissions to access this resource",
"status": 403,
"path": "/companies",
"timestamp": "2023-12-01T10:00:00.000Z",
"requestId": "req_123456789"
}
}{
"error": {
"code": "CONFLICT_ERROR",
"message": "A Resource with this origin_bank_account_id + request_id already exists",
"status": 409,
"details": {
"field": "origin_bank_account_id + request_id",
"value": "12345678"
},
"path": "/companies/bank-accounts",
"timestamp": "2023-12-01T10:00:00.000Z",
"requestId": "req_123456789"
}
}{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred",
"status": 500,
"path": "/companies",
"timestamp": "2023-12-01T10:00:00.000Z",
"requestId": "req_123456789"
}
}Create new merchant
Requires the merchant.company.create permission.
Creates a new merchant company under the authenticated organization. The organization_id is automatically set from the authenticated organization.
Only organizations may create merchants. A merchant-scoped session is rejected with 403.
curl --request POST \
--url https://api-sandbox.rinne.com.br/core/v1/merchants \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"full_name": "Merchant Store Ltda.",
"name": "Merchant Store",
"document_number": "16525269000121",
"document_type": "CNPJ",
"document_tax_type": "PJ",
"mcc": "5912",
"contact": {
"first_name": "Store",
"last_name": "Manager",
"phone": "+551188888888",
"email": "[email protected]",
"mother_name": "Manager Mother",
"birth_date": "20-05-1985",
"document_number": "81146431023",
"politically_exposed": false,
"declared_income": 5000,
"occupation": "SOFTWARE_DEVELOPER",
"net_worth": 50000,
"role": "PARTNER",
"address": {
"street": "Merchant Street",
"street_number": "789",
"neighborhood": "Business District",
"zipcode": "11223344",
"country": "076",
"state": "SP",
"city": "São Paulo"
}
},
"address": {
"street": "Store Address",
"street_number": "456",
"neighborhood": "Commercial Area",
"zipcode": "55667788",
"country": "076",
"state": "RJ",
"city": "Rio de Janeiro"
},
"transfer_configurations": {
"automatic_transfer_enabled": true,
"transfer_frequency": "WEEKLY",
"rail": "PIX",
"utc_hour_of_day": 12,
"day_of_week": 1,
"day_of_month": 1,
"min_balance": 1000
},
"declared_revenue": 50000,
"website_url": "https://merchantstore.com",
"bank_account": {
"branch_number": "1234",
"account_number": "123456",
"account_type": "CHECKING",
"account_holder_name": "Merchant Store Ltda.",
"account_holder_document_number": "16525269000121",
"ispb": "00000000"
}
}
'import requests
url = "https://api-sandbox.rinne.com.br/core/v1/merchants"
payload = {
"full_name": "Merchant Store Ltda.",
"name": "Merchant Store",
"document_number": "16525269000121",
"document_type": "CNPJ",
"document_tax_type": "PJ",
"mcc": "5912",
"contact": {
"first_name": "Store",
"last_name": "Manager",
"phone": "+551188888888",
"email": "[email protected]",
"mother_name": "Manager Mother",
"birth_date": "20-05-1985",
"document_number": "81146431023",
"politically_exposed": False,
"declared_income": 5000,
"occupation": "SOFTWARE_DEVELOPER",
"net_worth": 50000,
"role": "PARTNER",
"address": {
"street": "Merchant Street",
"street_number": "789",
"neighborhood": "Business District",
"zipcode": "11223344",
"country": "076",
"state": "SP",
"city": "São Paulo"
}
},
"address": {
"street": "Store Address",
"street_number": "456",
"neighborhood": "Commercial Area",
"zipcode": "55667788",
"country": "076",
"state": "RJ",
"city": "Rio de Janeiro"
},
"transfer_configurations": {
"automatic_transfer_enabled": True,
"transfer_frequency": "WEEKLY",
"rail": "PIX",
"utc_hour_of_day": 12,
"day_of_week": 1,
"day_of_month": 1,
"min_balance": 1000
},
"declared_revenue": 50000,
"website_url": "https://merchantstore.com",
"bank_account": {
"branch_number": "1234",
"account_number": "123456",
"account_type": "CHECKING",
"account_holder_name": "Merchant Store Ltda.",
"account_holder_document_number": "16525269000121",
"ispb": "00000000"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
full_name: 'Merchant Store Ltda.',
name: 'Merchant Store',
document_number: '16525269000121',
document_type: 'CNPJ',
document_tax_type: 'PJ',
mcc: '5912',
contact: {
first_name: 'Store',
last_name: 'Manager',
phone: '+551188888888',
email: '[email protected]',
mother_name: 'Manager Mother',
birth_date: '20-05-1985',
document_number: '81146431023',
politically_exposed: false,
declared_income: 5000,
occupation: 'SOFTWARE_DEVELOPER',
net_worth: 50000,
role: 'PARTNER',
address: {
street: 'Merchant Street',
street_number: '789',
neighborhood: 'Business District',
zipcode: '11223344',
country: '076',
state: 'SP',
city: 'São Paulo'
}
},
address: {
street: 'Store Address',
street_number: '456',
neighborhood: 'Commercial Area',
zipcode: '55667788',
country: '076',
state: 'RJ',
city: 'Rio de Janeiro'
},
transfer_configurations: {
automatic_transfer_enabled: true,
transfer_frequency: 'WEEKLY',
rail: 'PIX',
utc_hour_of_day: 12,
day_of_week: 1,
day_of_month: 1,
min_balance: 1000
},
declared_revenue: 50000,
website_url: 'https://merchantstore.com',
bank_account: {
branch_number: '1234',
account_number: '123456',
account_type: 'CHECKING',
account_holder_name: 'Merchant Store Ltda.',
account_holder_document_number: '16525269000121',
ispb: '00000000'
}
})
};
fetch('https://api-sandbox.rinne.com.br/core/v1/merchants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.rinne.com.br/core/v1/merchants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'full_name' => 'Merchant Store Ltda.',
'name' => 'Merchant Store',
'document_number' => '16525269000121',
'document_type' => 'CNPJ',
'document_tax_type' => 'PJ',
'mcc' => '5912',
'contact' => [
'first_name' => 'Store',
'last_name' => 'Manager',
'phone' => '+551188888888',
'email' => '[email protected]',
'mother_name' => 'Manager Mother',
'birth_date' => '20-05-1985',
'document_number' => '81146431023',
'politically_exposed' => false,
'declared_income' => 5000,
'occupation' => 'SOFTWARE_DEVELOPER',
'net_worth' => 50000,
'role' => 'PARTNER',
'address' => [
'street' => 'Merchant Street',
'street_number' => '789',
'neighborhood' => 'Business District',
'zipcode' => '11223344',
'country' => '076',
'state' => 'SP',
'city' => 'São Paulo'
]
],
'address' => [
'street' => 'Store Address',
'street_number' => '456',
'neighborhood' => 'Commercial Area',
'zipcode' => '55667788',
'country' => '076',
'state' => 'RJ',
'city' => 'Rio de Janeiro'
],
'transfer_configurations' => [
'automatic_transfer_enabled' => true,
'transfer_frequency' => 'WEEKLY',
'rail' => 'PIX',
'utc_hour_of_day' => 12,
'day_of_week' => 1,
'day_of_month' => 1,
'min_balance' => 1000
],
'declared_revenue' => 50000,
'website_url' => 'https://merchantstore.com',
'bank_account' => [
'branch_number' => '1234',
'account_number' => '123456',
'account_type' => 'CHECKING',
'account_holder_name' => 'Merchant Store Ltda.',
'account_holder_document_number' => '16525269000121',
'ispb' => '00000000'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.rinne.com.br/core/v1/merchants"
payload := strings.NewReader("{\n \"full_name\": \"Merchant Store Ltda.\",\n \"name\": \"Merchant Store\",\n \"document_number\": \"16525269000121\",\n \"document_type\": \"CNPJ\",\n \"document_tax_type\": \"PJ\",\n \"mcc\": \"5912\",\n \"contact\": {\n \"first_name\": \"Store\",\n \"last_name\": \"Manager\",\n \"phone\": \"+551188888888\",\n \"email\": \"[email protected]\",\n \"mother_name\": \"Manager Mother\",\n \"birth_date\": \"20-05-1985\",\n \"document_number\": \"81146431023\",\n \"politically_exposed\": false,\n \"declared_income\": 5000,\n \"occupation\": \"SOFTWARE_DEVELOPER\",\n \"net_worth\": 50000,\n \"role\": \"PARTNER\",\n \"address\": {\n \"street\": \"Merchant Street\",\n \"street_number\": \"789\",\n \"neighborhood\": \"Business District\",\n \"zipcode\": \"11223344\",\n \"country\": \"076\",\n \"state\": \"SP\",\n \"city\": \"São Paulo\"\n }\n },\n \"address\": {\n \"street\": \"Store Address\",\n \"street_number\": \"456\",\n \"neighborhood\": \"Commercial Area\",\n \"zipcode\": \"55667788\",\n \"country\": \"076\",\n \"state\": \"RJ\",\n \"city\": \"Rio de Janeiro\"\n },\n \"transfer_configurations\": {\n \"automatic_transfer_enabled\": true,\n \"transfer_frequency\": \"WEEKLY\",\n \"rail\": \"PIX\",\n \"utc_hour_of_day\": 12,\n \"day_of_week\": 1,\n \"day_of_month\": 1,\n \"min_balance\": 1000\n },\n \"declared_revenue\": 50000,\n \"website_url\": \"https://merchantstore.com\",\n \"bank_account\": {\n \"branch_number\": \"1234\",\n \"account_number\": \"123456\",\n \"account_type\": \"CHECKING\",\n \"account_holder_name\": \"Merchant Store Ltda.\",\n \"account_holder_document_number\": \"16525269000121\",\n \"ispb\": \"00000000\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.rinne.com.br/core/v1/merchants")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"full_name\": \"Merchant Store Ltda.\",\n \"name\": \"Merchant Store\",\n \"document_number\": \"16525269000121\",\n \"document_type\": \"CNPJ\",\n \"document_tax_type\": \"PJ\",\n \"mcc\": \"5912\",\n \"contact\": {\n \"first_name\": \"Store\",\n \"last_name\": \"Manager\",\n \"phone\": \"+551188888888\",\n \"email\": \"[email protected]\",\n \"mother_name\": \"Manager Mother\",\n \"birth_date\": \"20-05-1985\",\n \"document_number\": \"81146431023\",\n \"politically_exposed\": false,\n \"declared_income\": 5000,\n \"occupation\": \"SOFTWARE_DEVELOPER\",\n \"net_worth\": 50000,\n \"role\": \"PARTNER\",\n \"address\": {\n \"street\": \"Merchant Street\",\n \"street_number\": \"789\",\n \"neighborhood\": \"Business District\",\n \"zipcode\": \"11223344\",\n \"country\": \"076\",\n \"state\": \"SP\",\n \"city\": \"São Paulo\"\n }\n },\n \"address\": {\n \"street\": \"Store Address\",\n \"street_number\": \"456\",\n \"neighborhood\": \"Commercial Area\",\n \"zipcode\": \"55667788\",\n \"country\": \"076\",\n \"state\": \"RJ\",\n \"city\": \"Rio de Janeiro\"\n },\n \"transfer_configurations\": {\n \"automatic_transfer_enabled\": true,\n \"transfer_frequency\": \"WEEKLY\",\n \"rail\": \"PIX\",\n \"utc_hour_of_day\": 12,\n \"day_of_week\": 1,\n \"day_of_month\": 1,\n \"min_balance\": 1000\n },\n \"declared_revenue\": 50000,\n \"website_url\": \"https://merchantstore.com\",\n \"bank_account\": {\n \"branch_number\": \"1234\",\n \"account_number\": \"123456\",\n \"account_type\": \"CHECKING\",\n \"account_holder_name\": \"Merchant Store Ltda.\",\n \"account_holder_document_number\": \"16525269000121\",\n \"ispb\": \"00000000\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.rinne.com.br/core/v1/merchants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"full_name\": \"Merchant Store Ltda.\",\n \"name\": \"Merchant Store\",\n \"document_number\": \"16525269000121\",\n \"document_type\": \"CNPJ\",\n \"document_tax_type\": \"PJ\",\n \"mcc\": \"5912\",\n \"contact\": {\n \"first_name\": \"Store\",\n \"last_name\": \"Manager\",\n \"phone\": \"+551188888888\",\n \"email\": \"[email protected]\",\n \"mother_name\": \"Manager Mother\",\n \"birth_date\": \"20-05-1985\",\n \"document_number\": \"81146431023\",\n \"politically_exposed\": false,\n \"declared_income\": 5000,\n \"occupation\": \"SOFTWARE_DEVELOPER\",\n \"net_worth\": 50000,\n \"role\": \"PARTNER\",\n \"address\": {\n \"street\": \"Merchant Street\",\n \"street_number\": \"789\",\n \"neighborhood\": \"Business District\",\n \"zipcode\": \"11223344\",\n \"country\": \"076\",\n \"state\": \"SP\",\n \"city\": \"São Paulo\"\n }\n },\n \"address\": {\n \"street\": \"Store Address\",\n \"street_number\": \"456\",\n \"neighborhood\": \"Commercial Area\",\n \"zipcode\": \"55667788\",\n \"country\": \"076\",\n \"state\": \"RJ\",\n \"city\": \"Rio de Janeiro\"\n },\n \"transfer_configurations\": {\n \"automatic_transfer_enabled\": true,\n \"transfer_frequency\": \"WEEKLY\",\n \"rail\": \"PIX\",\n \"utc_hour_of_day\": 12,\n \"day_of_week\": 1,\n \"day_of_month\": 1,\n \"min_balance\": 1000\n },\n \"declared_revenue\": 50000,\n \"website_url\": \"https://merchantstore.com\",\n \"bank_account\": {\n \"branch_number\": \"1234\",\n \"account_number\": \"123456\",\n \"account_type\": \"CHECKING\",\n \"account_holder_name\": \"Merchant Store Ltda.\",\n \"account_holder_document_number\": \"16525269000121\",\n \"ispb\": \"00000000\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "a3dbd0c2-9f79-4f86-8caa-47779b3f2793",
"name": "Example Company",
"full_name": "Example Company LTDA",
"document_number": "16525269000121",
"document_type": "CNPJ",
"contact": {
"first_name": "John",
"last_name": "Silva",
"phone": "+551199999999",
"email": "[email protected]",
"mother_name": "Maria Silva",
"birth_date": "15-08-1990",
"document_number": "81146431023",
"politically_exposed": false,
"declared_income": 5000,
"occupation": "SOFTWARE_DEVELOPER",
"net_worth": 50000,
"role": "PARTNER",
"address": {
"street": "Contact Street",
"street_number": "456",
"complement": "Apt 201",
"neighborhood": "Contact Neighborhood",
"zipcode": "87654321",
"country": "076",
"state": "RJ",
"city": "Rio de Janeiro"
}
},
"status": "ACTIVE",
"address": {
"street": "Example Street",
"street_number": "123",
"complement": "Suite 101",
"neighborhood": "Downtown",
"zipcode": "12345678",
"country": "076",
"state": "SP",
"city": "São Paulo"
},
"transfer_configurations": {
"automatic_transfer_enabled": true,
"transfer_frequency": "DAILY",
"rail": "PIX",
"utc_hour_of_day": 12,
"day_of_week": 1,
"day_of_month": 1,
"min_balance": 1000
},
"created_at": "2023-01-01T00:00:00Z",
"updated_at": "2023-01-01T00:00:00Z",
"document_tax_type": "PJ",
"company_logo_url": "https://example.com/logo.png",
"website_url": "https://example.com",
"webhook_enabled": false,
"kyc_enabled": false,
"declared_revenue": 50000
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation error",
"status": 400,
"details": {
"issues": [
{
"field": "email",
"type": "REQUIRED",
"message": "Field 'email' is required",
"value": "invalid_value",
"constraints": {
"min": 18,
"max": 120
}
}
]
},
"path": "/companies",
"timestamp": "2023-12-01T10:00:00.000Z",
"requestId": "req_123456789"
}
}{
"error": {
"code": "AUTHENTICATION_ERROR",
"message": "Authentication required to access this resource",
"status": 401,
"details": {
"reason": "Invalid API key"
},
"path": "/companies/me",
"timestamp": "2023-12-01T10:00:00.000Z",
"requestId": "req_123456789"
}
}{
"error": {
"code": "AUTHORIZATION_ERROR",
"message": "You need 'admin' permissions to access this resource",
"status": 403,
"path": "/companies",
"timestamp": "2023-12-01T10:00:00.000Z",
"requestId": "req_123456789"
}
}{
"error": {
"code": "CONFLICT_ERROR",
"message": "A Resource with this origin_bank_account_id + request_id already exists",
"status": 409,
"details": {
"field": "origin_bank_account_id + request_id",
"value": "12345678"
},
"path": "/companies/bank-accounts",
"timestamp": "2023-12-01T10:00:00.000Z",
"requestId": "req_123456789"
}
}{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred",
"status": 500,
"path": "/companies",
"timestamp": "2023-12-01T10:00:00.000Z",
"requestId": "req_123456789"
}
}Authorizations
Company API key for authentication
Body
Schema for creating a new company or merchant
Company full name (required)
"Example Company Ltda."
Company document number (CPF: 11 digits; CNPJ: 14 characters, numeric or alphanumeric per IN RFB 2229/2024)
"16525269000121"
Document type (case insensitive, will be converted to uppercase)
CPF, CNPJ "CNPJ"
Document tax type (required for all companies):
- PF: Pessoa Física (Individual) - for CPF companies only
- PJ: Pessoa Jurídica (Legal Entity) - for CNPJ companies
- MEI: Microempreendedor Individual - for CNPJ companies
- ME: Microempresa (Micro Enterprise) - for CNPJ companies
Validation Rules:
- For CPF companies: must be 'PF'
- For CNPJ companies: must be one of 'PJ', 'MEI', or 'ME'
PJ, MEI, ME, PF "PJ"
Merchant Category Code (required)
^[0-9]{4}$"5912"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Company short name (optional)
"Example Co"
Company logo URL (optional)
"https://example.com/logo.png"
Company website URL (optional)
"https://example.com"
Fee policy ID (optional), will be inherited from organization for merchants
"123e4567-e89b-12d3-a456-426614174001"
Additional metadata (optional JSON object)
{ "custom_field": "value" }
Annual revenue in whole reais (BRL) for Banco Central compliance (Circular 3.978/2020). Optional - defaults to 50000 (R$ 50.000) for CNPJ companies if not provided.
x >= 050000
Bank account information, if sent a bank account will be created for the company
Show child attributes
Show child attributes
Optional. When provided, a gateway-mode affiliation is registered for the new merchant in the same request. Requires a gateway-mode cost policy to already exist for the organization. See Gateway Mode.
Show child attributes
Show child attributes
Response
Merchant created successfully
Transformed company data returned by the API
"a3dbd0c2-9f79-4f86-8caa-47779b3f2793"
"Example Company"
"Example Company LTDA"
CPF (11 digits) or CNPJ (14 characters). CNPJ may be numeric or alphanumeric (IN RFB 2229/2024): first 12 positions are [A-Z0-9], last 2 are numeric check digits. Formatting is stripped and letters are uppercased on input.
"16525269000121"
CNPJ, CPF "CNPJ"
Show child attributes
Show child attributes
PENDING_ACTIVATION, ACTIVE, INACTIVE, BLOCKED "ACTIVE"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
"2023-01-01T00:00:00Z"
"2023-01-01T00:00:00Z"
Document tax type:
- PF: Pessoa Física (Individual) - for CPF companies
- PJ: Pessoa Jurídica (Legal Entity) - for CNPJ companies
- MEI: Microempreendedor Individual - for CNPJ companies
- ME: Microempresa (Micro Enterprise) - for CNPJ companies
PJ, MEI, ME, PF "PJ"
"https://example.com/logo.png"
"https://example.com"
Whether webhooks are enabled for this company
false
Whether the organization's merchants undergo KYC. Managed by Rinne staff. Null on merchant responses.
false
Annual revenue in whole reais (BRL) for Banco Central compliance (Circular 3.978/2020)
x >= 050000

