Guides
Counterparties and whitelist
Register beneficiaries for FX payments and wallet addresses for crypto withdrawals.
Two registries go through compliance before they can receive money: counterparties (FX payment beneficiaries) and whitelisted wallet addresses (crypto withdrawal destinations).
Create a counterparty
Required: legalName, taxId, taxIdCountry, entityType (Individual or Company) and address. Each bankInformations item needs currency, country, type (PIX, TED, CRYPTO, WIRE, SEPA or ACH) and accountNumber.
curl -X POST https://bloquo.mimicr.dev/api/v1/customer/1001/counterparty \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"legalName": "Maria Santos",
"taxId": "987.654.321-00",
"taxIdCountry": "BR",
"entityType": "Individual",
"address": "Rua das Flores, 123, São Paulo, SP",
"bankInformations": [
{ "currency": "BRL", "country": "BR", "type": "PIX", "label": "PIX CPF", "accountNumber": "987.654.321-00",
"beneficiaryName": "Maria Santos", "beneficiaryTaxId": "987.654.321-00", "isDefault": true }
]
}'{
"status": true,
"statusCode": 201,
"result": {
"id": 1084,
"legalName": "Maria Santos",
"taxId": "987.654.321-00",
"taxIdCountry": "BR",
"entityType": "Individual",
"enabled": true,
"riskLevel": "Low",
"relatedCustomerId": 1001,
"bankInformations": [
{ "id": 1083, "type": "PIX", "label": "PIX CPF", "country": "BR", "currency": "BRL", "accountNumber": "987.654.321-00", "isDefault": true, "ownerType": "Counterparty", "ownerId": 1084 }
]
},
"message": null
}Keep the counterparty id and each bankInformation id: they become counterpartyId and bankInformationId in the FX payment. The taxId + taxIdCountry pair is unique on the platform: registering it again reuses the record and only creates the relation with the customer.
Relation and compliance
Approval doesn't live on the counterparty but on the relation between it and the customer:
curl https://bloquo.mimicr.dev/api/v1/customer/1001/customerCounterparty/1084 \ -H "Authorization: Bearer <token>"
{
"status": true,
"statusCode": 200,
"result": {
"id": 1085,
"customerId": 1001,
"counterpartyId": 1084,
"preferredBankInformationId": 1083,
"defaultCurrency": null,
"status": "Approved",
"complianceNotes": "KYT check passed."
},
"message": null
}The relation starts PendingApproval and moves to Approved or Rejected. The result fires the Compliance webhook to the customer's Compliance preference. Until it is Approved, an FX payment to that counterparty answers 422 Counterparty is not in Approved status..
Bloquo says the compliance webhook URL is provided by the compliance service itself. In Mimicr it is the customer's Compliance preference. Bloquo also says GET /customerCounterparty is not implemented in the service; in Mimicr it lists the relations.
Other routes: GET .../counterparty/list?name= (paginated), GET .../counterparty/{id}, PUT .../counterparty/{id} (sending bankInformations replaces the list) and DELETE .../counterparty/{id}/delete, which removes the relation with the customer.
Wallet whitelist
Crypto withdrawals only go to registered, approved addresses:
curl -X POST https://bloquo.mimicr.dev/api/v1/customer/1001/crypto/wallet/whitelist \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18", "enabled": true}'{
"status": true,
"result": {
"id": 1066,
"customerId": 1001,
"walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
"blockchain": "Ethereum",
"complianceApproved": false,
"enabled": true
},
"message": null
}The entry starts with complianceApproved: false. GET .../crypto/wallet/whitelist filters by walletAddress, complianceApproved and enabled; DELETE .../crypto/wallet/whitelist/{walletWhitelistId} disables the address.
Bloquo doesn't say how the network is determined. In Mimicr it comes from the address format: 0x + 40 hex characters is Ethereum, T… is Tron, bc1, 1 or 3 is Bitcoin, and anything else is Solana.
Test the scenarios
In Mimicr, compliance decides the relation and approves the wallet about 2 seconds later. Mimicr triggers:
legalNamecontainingREJEITAR: the relation goesRejected, with aCompliancewebhook.walletAddresscontainingdead: the address is never approved.
To decide yourself, turn autoApproveCounterparties or autoApproveWallets off and use:
npx mimicr action bloquo counterparty.approve customerId=1001 counterpartyId=1084 npx mimicr action bloquo counterparty.reject customerId=1001 counterpartyId=1084 notes="Sanctions" npx mimicr action bloquo wallet.approve walletWhitelistId=1066 npx mimicr wait bloquo delivery order_type=Compliance order_id=1084 event=Approved
Reference: Create counterparty, List counterparties, Get customer–counterparty relation, List customer–counterparty relations, Add wallet to whitelist, List whitelisted wallets, Remove whitelisted wallet.