Skip to main content
GET
/
v1
/
merchants
/
{merchantId}
/
affiliations
/
{id}
Get a specific affiliation for a merchant
curl --request GET \
  --url https://api-sandbox.rinne.com.br/core/v1/merchants/{merchantId}/affiliations/{id} \
  --header 'x-api-key: <api-key>'
import requests

url = "https://api-sandbox.rinne.com.br/core/v1/merchants/{merchantId}/affiliations/{id}"

headers = {"x-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};

fetch('https://api-sandbox.rinne.com.br/core/v1/merchants/{merchantId}/affiliations/{id}', 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/{merchantId}/affiliations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)

func main() {

url := "https://api-sandbox.rinne.com.br/core/v1/merchants/{merchantId}/affiliations/{id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-api-key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api-sandbox.rinne.com.br/core/v1/merchants/{merchantId}/affiliations/{id}")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.rinne.com.br/core/v1/merchants/{merchantId}/affiliations/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "id": "123e4567-e89b-12d3-a456-426614174002",
  "provider": "CELCOIN",
  "merchant_id": "12345678",
  "status": "ACTIVE",
  "enabled": true,
  "company_id": "a3dbd0c2-9f79-4f86-8caa-47779b3f2793",
  "allowed_capture_methods": [
    "ECOMMERCE"
  ],
  "allowed_payment_methods": [
    "PIX"
  ],
  "organization_id": "a3dbd0c2-9f79-4f86-8caa-47779b3f2793",
  "gateway_mode": false,
  "onboarding_documents": [
    {
      "id": "c5fdf2e4-1b9b-6108-aece-69991d5h4905",
      "file_type": "CNH_FRONT",
      "file_name": "CNH_FRONT_a1b2c3d4.pdf",
      "created_at": "2023-06-15T14:30:00.000Z",
      "content_type": "application/pdf",
      "file_size_bytes": 125430
    }
  ],
  "created_at": "2023-01-01T12:00:00.000Z",
  "updated_at": "2023-01-01T12:00:00.000Z",
  "provider_id": "prov_123456",
  "soft_descriptor": "MYSTORE",
  "mcc": "5411",
  "cost_policy_id": "123e4567-e89b-12d3-a456-426614174003",
  "provider_status_code": "200",
  "provider_status_message": "Merchant activated successfully",
  "provider_metadata": {},
  "onboarding_url": "https://provider.com/onboard/12345",
  "bank_account": {
    "id": "a2da4238-bdc2-47f9-b866-246cc87212d5",
    "bank_code": "001",
    "branch_number": "1234",
    "account_number": "567890",
    "account_holder_name": "John Doe",
    "account_holder_document_number": "81146431023",
    "ispb": "00000000"
  },
  "settlement_bank_accounts": [
    {
      "id": "b3eb5349-cec3-48fa-c977-357dd98323e6",
      "branch_number": "1234",
      "account_number": "567890",
      "account_type": "CHECKING",
      "account_holder_name": "John Doe",
      "account_holder_document_number": "81146431023",
      "ispb": "00000000",
      "status": "ACTIVE",
      "created_at": "2023-01-01T00:00:00Z",
      "updated_at": "2023-01-01T00:00:00Z"
    }
  ],
  "anticipation_type": "AUTOMATIC",
  "anticipation_days": 1,
  "company_snapshot": {}
}
{
"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": "RESOURCE_NOT_FOUND",
"message": "Company with ID '123' not found",
"status": 404,
"path": "/companies/me",
"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

x-api-key
string
header
required

Company API key for authentication

Path Parameters

merchantId
string
required

The merchant ID

id
string
required

The affiliation ID

Query Parameters

include_company_snapshot
boolean
default:false

Include company_snapshot (point-in-time company data at affiliation creation) in the response

Response

Affiliation details retrieved successfully

Transformed affiliation data returned by the API

id
string
required
Example:

"123e4567-e89b-12d3-a456-426614174002"

provider
enum<string>
required

Payment provider name

Available options:
CELCOIN,
RINNE,
CAPPTA
Example:

"CELCOIN"

merchant_id
string
required

Merchant ID in provider

Example:

"12345678"

status
enum<string>
required

Current affiliation status

Available options:
PENDING,
ACTIVE,
PROCESSING,
BLOCKED,
PENDING_APPROVAL,
WAITING_DOCUMENTS,
PROCESSING_DOCUMENTS,
REJECTED,
FAILED,
INVALID_SETTLEMENT_BANK_ACCOUNT
Example:

"ACTIVE"

enabled
boolean
required

Whether the affiliation is enabled

Example:

true

company_id
string
required

Associated company ID

Example:

"a3dbd0c2-9f79-4f86-8caa-47779b3f2793"

allowed_capture_methods
enum<string>[]
required

Allowed capture methods

Available options:
EMV,
MAGSTRIPE,
ECOMMERCE,
CONTACTLESS_ICC
Example:
["ECOMMERCE"]
allowed_payment_methods
enum<string>[]
required

Allowed payment methods

Available options:
CREDIT_CARD,
DEBIT_CARD,
PIX,
BOLEPIX
Example:
["PIX"]
organization_id
string
required

Associated organization ID

Example:

"a3dbd0c2-9f79-4f86-8caa-47779b3f2793"

gateway_mode
boolean
required

Whether this is a gateway-mode affiliation (Rinne acts as a pure capture gateway; no settlement, splits, or ledger entries)

Example:

false

onboarding_documents
object[]
required

List of onboarding documents associated with this affiliation

created_at
string<date-time>
required

Creation timestamp in ISO 8601 format

Example:

"2023-01-01T12:00:00.000Z"

updated_at
string<date-time>
required

Last update timestamp in ISO 8601 format

Example:

"2023-01-01T12:00:00.000Z"

provider_id
string | null

ID in provider system

Example:

"prov_123456"

soft_descriptor
string | null

Soft descriptor for transactions

Example:

"MYSTORE"

mcc
string

Merchant Category Code

Example:

"5411"

cost_policy_id
string | null

Associated cost policy ID

Example:

"123e4567-e89b-12d3-a456-426614174003"

provider_status_code
string | null

Provider-specific status code

Example:

"200"

provider_status_message
string | null

Provider-specific status message

Example:

"Merchant activated successfully"

provider_metadata
object | null

Provider-specific metadata

Example:
{}
onboarding_url
string | null

Onboarding URL (only shown when status is not ACTIVE)

Example:

"https://provider.com/onboard/12345"

bank_account
object | null

Associated bank account information (created by provider)

settlement_bank_accounts
object[]

Settlement bank accounts for this affiliation.

anticipation_type
enum<string>

Anticipation type for the affiliation

Available options:
AUTOMATIC,
SPOT
Example:

"AUTOMATIC"

anticipation_days
integer

Number of days for anticipation

Required range: x >= 1
Example:

1

company_snapshot
object | null

Point-in-time snapshot of company data (with contact) at affiliation creation. Only included when include_company_snapshot=true query parameter is set.