6. Counterparty
Step by step of how to create, update and delete counterparties.
📑 Summary
- Objective
- Functionalities
- Counterparty Creation
- Examples
- Outbound
- Inbound
- Counterparty Update
- Counterparty Delete
Objective
The counterparty is a foreign entity that will send or receive the transferred values. This guide will explain how to create counterparties for inbound and outbound transactions.
Functionalities
Through the counterparty module, it is possible to:
Counterparty Creation
The required parameters to create a counterparty will depend on the direction of the intended transaction. The table below summarizes the required fields according to the direction of the intended transaction:
Field Name | Transaction Inbound | Transaction Outbound | Description |
---|---|---|---|
name | required | required | Name of the counterparty, individual or legal. |
currency | required | required | USD, EUR, AUD or CHF |
direction | required | required | INBOUND or OUTBOUND |
ffc | optional | optional | An arbitrary string that can be used to identify the bank account. |
bankAccount.swiftCode | not required | required | swift code of the bank receiving the transfer. swift.com |
bankAccount.accountNumberType | not required | required | Available types are iban or account. It is informed by the bank receiving the transfer. |
bankAccount.accountNumber | not required | required | iban or account code of the bank receiving the transfer. |
bankAccount.bankName | required | not required | Name of the bank |
bankAccount.country | required | required | Country in which the counterparty's bank account is located (ISO 3166-1 alpha-2) |
address.addressLine1 | optional | required | MaxLength: 100. Example: Av Paulista, 530 |
address.addressLine2 | optional | optional | MaxLength: 50. Example: Cnj 53 |
address.city | optional | required | MaxLength: 100. Example: São Paulo |
address.state | optional | required | MaxLength: 50. Example: SP |
address.postalCode | optional | required | MaxLength: 10. Example: 05423040 |
address.country | optional | required | Country in which the counterparty's address is located (ISO 3166-1 alpha-2) |
Examples
📍 Outbound
1. Creating a counterparty for an OUTBOUND transaction to send American Dollars (USD) to the United States (US) for the purpose of CRYPTO:
a. First, verify with the bank receiving the transfer if the account number type is iban or account;
b. Assuming for this example that the account number type is account, the request body payload will be the following:
-
{ "direction": "OUTBOUND", "name": "counterparty name", "currency": "USD", "bankAccount": { "country": "US", "swiftCode": "CHASUS33", "accountNumberType": "account", "accountNumber": "670912227", }, "address": { "country": "US", "addressLine1": "7 Straits View, Marina One", "addressLine2": "East Tower #05-01", "city": "New York", "state": "NY", "postalCode": "018936" } }
2. Creating a counterparty for an OUTBOUND transaction to send Euros (EUR) to Portugal (PT) for the purpose of PAYMENT_PROCESSING:
a. First, verify with the bank receiving the transfer if the account number type is iban or account;
b. Assuming for this example that the account number type is iban, the request body payload will be the following:
{
"direction": "OUTBOUND",
"name": "counterparty name",
"currency": "EUR",
"bankAccount": {
"country": "PT",
"swiftCode": "BPNPPTPL",
"accountNumberType": "iban",
"accountNumber": "PT97003506511651388376186"
}
"address": {
"country": "PT",
"addressLine1": "Av. Alm. Reis 1 H, 1150-007",
"city": "Lisboa",
"state": "PT",
"postalCode": "1150-007"
}
}
📍 Inbound
1. Creating a counterparty for an INBOUND transaction exchanging American Dollars (USD) to Reais (BRL) from a bank account located in the United States (US):
a. It is not necessary to check bank account field requirements. The request body payload will be the following:
{
"direction": "INBOUND",
"name": "counterparty name",
"currency": "USD",
"bankAccount": {
"country": "US",
"bankName": "Remessa bank"
}
}
2. Creating a counterparty for an INBOUND transaction exchanging Euros (EUR) to Reais (BRL) from a bank account located in Germany (DE):
a. It is not necessary to check bank account field requirements. The request body payload will be the following:
{
"direction": "INBOUND",
"name": "counterparty name",
"currency": "EUR",
"bankAccount": {
"country": "DE",
"bankName": "Remessa bank"
}
}
Counterparty Update
It is possible to update any optional attributes partially using the endpoint Update counterparty . For the following attributes the criteria is:
- Address: if counterparty's address already has attributes, it is possible to update any attribute. To update an address that was previously null, it is necessary to provide addressLine1, city, state, country and postalCode.
2.bankAccount: it is possible to update bankAccount attributes according to the following criteria:
- when counterparty is used for inbound transactions, it is possible to update bankName and country;
- when counterparty is used for outbound transactions, it is possible to update accountType, branchCode, bankCode, bankLocalCode, accountNumber and bankName;
- to enable the possibility of a counterparty used in inbound transactions to be used for outbound transactions, it is necessary to add the required information described in the counterparty creation table above.
Counterparty Delete
It is possible to delete a counterparty using the endpoint Delete counterparty giving the id as parameter .
Updated over 1 year ago