API Reference
Counterparties and FX payments

Create counterparty

POST/api/v1/customer/{customerId}/counterparty
Base URL: https://bloquo.mimicr.dev · provider: https://api.bloquo.io

Creates a new counterparty (external beneficiary) for the customer.

Lifecycle: Created as PendingApproval → compliance reviews the record → Approved (usable in FxPayments) or Rejected. A counterparty still in PendingApproval causes a 422 on any FxPayment that references it. Use GET /api/v1/customer/counterparty/{counterpartyId} to check status before submitting payment orders.

PIX keys: bankInformations[].accountNumber accepts any PIX key format for BRL payments, CNPJ, CPF, email address, phone number (+55...), or a random UUID key.

taxId uniqueness: taxId + taxIdCountry is unique across the platform. If a counterparty with the same combination already exists, the existing record is reused and linked to this customer, no duplicate is created. Use GET /api/v1/customer/counterparty/{counterpartyId} to inspect the existing record before creating.

Authorization

Bearer token in the Authorization: Bearer <token> header. See Authentication.

Path parameters

customerIdstringrequired

Body

application/json
legalNamestringrequired

Full legal name of the counterparty.

Example: "Maria Santos"
tradeNamestring | null

Trade name or DBA (doing business as), if different from legal name.

taxIdstringrequired

Tax identification number.

Example: "987.654.321-00"
taxIdCountrystringrequired

ISO 3166-1 alpha-2 country code for the tax ID.

Example: "BR"
entityTypestringrequired

Legal entity type of the counterparty.

IndividualCompany
addressstringrequired

Full address of the counterparty.

Example: "Rua das Flores, 123, São Paulo, SP, 01310-100"
defaultCurrencystring | null

Preferred currency code for payments to this counterparty.

Example: "BRL"
bankInformationsobject[]

List of payment methods (PIX, TED, SWIFT, crypto) for this counterparty.

Show child attributes
currencystringrequired

ISO 4217 currency code or crypto ticker.

Example: "BRL"
countrystringrequired

ISO 3166-1 alpha-2 country code.

Example: "BR"
typestringrequired

Payment rail type for this bank information entry.

PIXTEDCRYPTOWIRESEPAACH
labelstring

Human-readable label for this payment method.

Example: "PIX CPF"
isDefaultboolean

Whether this is the default payment method for this currency.

Example: true
beneficiaryNamestring | null
Example: "Maria Santos"
beneficiaryTaxIdstring | null
Example: "987.654.321-00"
beneficiaryTaxIdCountrystring | null
Example: "BR"
bankNamestring | null
Example: "Itaú Unibanco"
bankCodestring | null

Bank ISPB or COMPE code.

Example: "341"
bankBranchstring | null
Example: "0001"
accountNumberstringrequired

Account number, PIX key, or wallet address depending on type.

Example: "987.654.321-00"
accountTypestring | null

Account type (e.g. checking, savings).

routingNumberstring | null
abastring | null
ibanstring | null
swiftBicstring | null
walletAddressstring | null

Blockchain wallet address (CRYPTO type only).

blockchainstring | null

Blockchain network (CRYPTO type only).

tagOrMemostring | null

Tag or memo required by some blockchains (e.g. XRP, XLM).

Responses

201Counterparty created.
statusboolean
Example: true
statusCodeinteger
Example: 201
resultobject
Show child attributes
idinteger<int64>
Example: 5
legalNamestring
Example: "Maria Santos"
tradeNamestring | null
taxIdstring
Example: "987.654.321-00"
taxIdCountrystring
Example: "BR"
entityTypestring

Legal entity type of the counterparty.

IndividualCompany
enabledboolean
Example: true
addressstring
Example: "Rua das Flores, 123, São Paulo, SP, 01310-100"
riskLevelstring | null

Risk classification assigned by compliance.

relatedCustomerIdinteger<int64> | null

If this counterparty is also a Bloquo customer, their customer ID.

bankInformationsobject[]
Show child attributes
idinteger<int64>
Example: 1
ownerTypestring
Example: "Counterparty"
ownerIdinteger<int64>
Example: 5
currencystring
Example: "BRL"
countrystring
Example: "BR"
typestring

Payment rail type for this bank information entry.

PIXTEDCRYPTOWIRESEPAACH
labelstring
Example: "PIX CPF"
enabledboolean
Example: true
isDefaultboolean | null
Example: true
beneficiaryNamestring | null
Example: "Maria Santos"
beneficiaryTaxIdstring | null
Example: "987.654.321-00"
beneficiaryTaxIdCountrystring | null
Example: "BR"
bankNamestring | null
bankCodestring | null
bankBranchstring | null
accountNumberstring

Account number, PIX key, or wallet address.

Example: "987.654.321-00"
accountTypestring | null
routingNumberstring | null
abastring | null
ibanstring | null
swiftBicstring | null
walletAddressstring | null
blockchainstring | null
tagOrMemostring | null
createdBystring
Example: "admin"
lastUpdatedBystring
Example: "admin"
createdAtstring<date-time>
Example: "2024-01-15T10:30:00Z"
lastUpdatedAtstring<date-time>
Example: "2024-01-15T10:30:00Z"
messagestring | null
400Business validation failed. Common reasons: - taxId + taxIdCountry already exists, the existing counterparty record is reused (use GET to inspect before creating). - Invalid or unsupported wallet address or blockchain.
statusboolean
resultany | null
messagestring
422Business rule violation. This error is returned by the FxPayment endpoint (not this one) when a payment order references a counterparty that is still in PendingApproval. Wait for compliance approval before submitting payment orders against this counterparty.
statusboolean
resultany | null
messagestring