Skip to main content
POST
/
v1
/
merchants
/
{merchantId}
/
affiliations
Create a new affiliation for a specific merchant
curl --request POST \
  --url https://api-sandbox.rinne.com.br/core/v1/merchants/{merchantId}/affiliations \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "provider": "CELCOIN",
  "allowed_capture_methods": [
    "ECOMMERCE"
  ],
  "allowed_payment_methods": [
    "PIX"
  ]
}'
{
  "id": "507f1f77bcf86cd799439013",
  "provider": "CELCOIN",
  "provider_id": "prov_123456",
  "soft_descriptor": "MYSTORE",
  "merchant_id": "12345678",
  "mcc": "5411",
  "cost_policy_id": "507f1f77bcf86cd799439014",
  "status": "ACTIVE",
  "provider_status_code": "200",
  "provider_status_message": "Merchant activated successfully",
  "provider_metadata": {},
  "enabled": true,
  "company_id": "a3dbd0c2-9f79-4f86-8caa-47779b3f2793",
  "onboarding_url": "https://provider.com/onboard/12345",
  "bank_account": {
    "id": "a2da4238-bdc2-47f9-b866-246cc87212d5",
    "bank_code": "001",
    "branch_number": "1234",
    "account_number": "56789-0",
    "account_holder_name": "John Doe",
    "account_holder_document_number": "81146431023",
    "ispb": "00000000"
  },
  "allowed_capture_methods": [
    "ECOMMERCE"
  ],
  "allowed_payment_methods": [
    "PIX"
  ],
  "organization_id": "a3dbd0c2-9f79-4f86-8caa-47779b3f2793",
  "created_at": "2023-01-01T12:00:00.000Z",
  "updated_at": "2023-01-01T12:00:00.000Z"
}

Authorizations

x-api-key
string
header
required

Company API key for authentication

Path Parameters

merchantId
string
required

The merchant ID

Body

application/json

Schema for creating a new affiliation

provider
enum<string>
required

Payment provider name (accepts lowercase and uppercase, returns uppercase)

Available options:
CELCOIN,
RINNE
Example:

"CELCOIN"

allowed_capture_methods
enum<string>[]
required

Allowed capture methods (at least one required)

Minimum length: 1
Example:
["EMV", "CONTACTLESS_ICC", "ECOMMERCE"]
allowed_payment_methods
enum<string>[]
required

Allowed payment methods (at least one required)

Minimum length: 1
Example:
["CREDIT_CARD", "DEBIT_CARD", "PIX"]

Response

Affiliation created successfully

Transformed affiliation data returned by the API

id
string
required
Example:

"507f1f77bcf86cd799439013"

provider
enum<string>
required

Payment provider name

Available options:
CELCOIN,
RINNE
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
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

Example:
["ECOMMERCE"]
allowed_payment_methods
enum<string>[]
required

Allowed payment methods

Example:
["PIX"]
organization_id
string
required

Associated organization ID

Example:

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

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:

"507f1f77bcf86cd799439014"

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

Associated bank account information Bank account information for affiliation