Add or update gateway credentials
curl --request PUT \
--url http://localhost:7701/api/v1/company/gateways \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"gateways": [
{
"gateway_slug": "pagarme",
"secret_key": "sk_live_abc123",
"order": 1,
"client_id": "client_xyz",
"use_as_subaccount": false,
"subaccount_information": {
"name": "Maria Silva",
"trading_name": "Loja da Maria",
"email": "maria@example.com",
"document": "123.456.789-00",
"type": "individual",
"annual_revenue": 120000,
"company_type": "LTDA",
"birthdate": "1990-06-15",
"monthly_income": 500000,
"professional_occupation": "Software Engineer",
"phone_numbers": [
{
"country": "BR",
"number": "999999999",
"type": "mobile"
}
],
"address": {
"street": "Rua das Flores",
"complementary": "Apto 101",
"number": "123",
"neighborhood": "Centro",
"city": "São Paulo",
"state": "SP",
"zip_code": "01310-100"
},
"default_bank_account": {
"holder_name": "Maria Silva",
"holder_type": "individual",
"holder_document": "123.456.789-00",
"bank_code": "341",
"branch_number": "0001",
"account_number": "12345678",
"account_check_digit": "9",
"type": "checking"
},
"managing_partners": [
{
"name": "João Souza",
"email": "joao@example.com",
"document": "987.654.321-00",
"birthdate": "1985-03-20",
"monthly_income": 300000,
"professional_occupation": "Director",
"self_declared_legal_representative": true,
"address": {
"street": "Av. Paulista",
"complementary": "Sala 5",
"street_number": "1000",
"neighborhood": "Bela Vista",
"city": "São Paulo",
"state": "SP",
"zip_code": "01311100",
"reference_point": "Próximo ao metrô"
},
"phone_numbers": [
{
"ddd": "11",
"number": "999999999"
}
]
}
]
}
}
]
}
'{
"data": [
{
"id": 1,
"company_id": 42,
"gateway_id": 1,
"gateway_slug": "pagarme",
"client_id": null,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
]
}Company Gateways
Add or update gateway credentials
Creates or updates credentials for one or more gateways scoped to the authenticated company. When use_as_subaccount is true the gateway creates a recipient sub-account and stores the resulting recipient ID as the secret key.
PUT
/
api
/
v1
/
company
/
gateways
Add or update gateway credentials
curl --request PUT \
--url http://localhost:7701/api/v1/company/gateways \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"gateways": [
{
"gateway_slug": "pagarme",
"secret_key": "sk_live_abc123",
"order": 1,
"client_id": "client_xyz",
"use_as_subaccount": false,
"subaccount_information": {
"name": "Maria Silva",
"trading_name": "Loja da Maria",
"email": "maria@example.com",
"document": "123.456.789-00",
"type": "individual",
"annual_revenue": 120000,
"company_type": "LTDA",
"birthdate": "1990-06-15",
"monthly_income": 500000,
"professional_occupation": "Software Engineer",
"phone_numbers": [
{
"country": "BR",
"number": "999999999",
"type": "mobile"
}
],
"address": {
"street": "Rua das Flores",
"complementary": "Apto 101",
"number": "123",
"neighborhood": "Centro",
"city": "São Paulo",
"state": "SP",
"zip_code": "01310-100"
},
"default_bank_account": {
"holder_name": "Maria Silva",
"holder_type": "individual",
"holder_document": "123.456.789-00",
"bank_code": "341",
"branch_number": "0001",
"account_number": "12345678",
"account_check_digit": "9",
"type": "checking"
},
"managing_partners": [
{
"name": "João Souza",
"email": "joao@example.com",
"document": "987.654.321-00",
"birthdate": "1985-03-20",
"monthly_income": 300000,
"professional_occupation": "Director",
"self_declared_legal_representative": true,
"address": {
"street": "Av. Paulista",
"complementary": "Sala 5",
"street_number": "1000",
"neighborhood": "Bela Vista",
"city": "São Paulo",
"state": "SP",
"zip_code": "01311100",
"reference_point": "Próximo ao metrô"
},
"phone_numbers": [
{
"ddd": "11",
"number": "999999999"
}
]
}
]
}
}
]
}
'{
"data": [
{
"id": 1,
"company_id": 42,
"gateway_id": 1,
"gateway_slug": "pagarme",
"client_id": null,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
]
}⌘I