Skip to main content

API


Create SWIFT Counterparty​

VerbPOST
URLhttps://api.s.unit.sh/counterparties
Data TypeswiftCounterparty
Timeout (Seconds)5

Attributes​

NameTypeDescription
type RequiredstringEither Business or Person.
name RequiredstringThe account holder's name (individual or business). Up to 255 characters.
bic RequiredstringBIC (SWIFT Bank Identifier Code) of the recipient's bank. 8 or 11 alphanumeric characters.
accountNumber RequiredstringRecipient bank account number or IBAN (International Bank Account Number). 1-34 alphanumeric characters (uppercase letters and digits only).
country RequiredstringISO 3166-1 alpha-2 destination country code.
currency RequiredstringISO 4217 destination currency (e.g. EUR, GBP).
address RequiredobjectRecipient International address. country is required within the object.
email OptionalstringRecipient email address.
tags OptionalobjectSee Tags.
idempotencyKey RequiredstringUnique key to prevent duplicate counterparties.

Relationships​

NameTypeDescription
customer RequiredRelationshipThe Customer who owns this counterparty.
Example Request:
curl -X POST 'https://api.s.unit.sh/counterparties'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "swiftCounterparty",
"attributes": {
"type": "Person",
"name": "Hans Mueller",
"bic": "COBADEFFXXX",
"accountNumber": "DE89370400440532013000",
"country": "DE",
"currency": "EUR",
"address": {
"country": "DE",
"street": "Friedrichstrasse 123",
"city": "Berlin",
"postalCode": "10117"
},
"tags": {
"label": "EU supplier"
},
"idempotencyKey": "eur-swift-cp-001"
},
"relationships": {
"customer": {
"data": {
"type": "businessCustomer",
"id": "1000"
}
}
}
}
}'

Response​

Response is a JSON:API document.

201 Created​

NameTypeDescription
dataSWIFT CounterpartyThe target resource after the operation was completed.
Example Response:
{
"data": {
"type": "swiftCounterparty",
"id": "200",
"attributes": {
"type": "Person",
"name": "Hans Mueller",
"bic": "COBADEFFXXX",
"accountNumber": "DE89370400440532013000",
"country": "DE",
"currency": "EUR",
"address": {
"country": "DE",
"street": "Friedrichstrasse 123",
"city": "Berlin",
"postalCode": "10117"
},
"tags": {
"label": "EU supplier"
},
"createdAt": "2024-01-15T10:02:00.000Z",
"updatedAt": "2024-01-15T10:02:00.000Z"
},
"relationships": {
"customer": {
"data": {
"type": "businessCustomer",
"id": "1000"
}
}
}
}
}

Get Counterparty​

Get an international counterparty by id.

VerbGET
URLhttps://api.s.unit.sh/counterparties/{counterpartyId}
Timeout (Seconds)5

Query Parameters​

NameTypeDefaultDescription
includestring(empty)Optional. A comma-separated list of related resources to include in the response. Related resources include: customer. See Getting Related Resources

Response​

Response is a JSON:API document.

200 OK​

NameTypeDescription
dataACH Counterparty or SWIFT CounterpartyCounterparty resource.
includedArray of CustomerArray of resources requested by the include query parameter.
curl -X GET 'https://api.s.unit.sh/counterparties/200' \
-H "Authorization: Bearer ${TOKEN}"

List Counterparties​

List international counterparties. Filtering, paging and sorting can be applied.

VerbGET
URLhttps://api.s.unit.sh/counterparties
Timeout (Seconds)5

Query Parameters​

NameTypeDefaultDescription
page[limit]integer100Optional. Maximum number of resources that will be returned. Maximum is 1000 resources. See Pagination.
page[offset]integer0Optional. Number of resources to skip. See Pagination.
filter[customerId]string(empty)Optional. Filters the results by the specified customer id.
filter[type]string(empty)Optional. Filter counterparties by type. Set to swiftCounterparty to list only SWIFT counterparties.
filter[tags]Tags (JSON)(empty)Optional. Filter counterparties by Tags.
sortstringsort=createdAtOptional. sort=createdAt for ascending order or sort=-createdAt (leading minus sign) for descending order.
Polymorphic response

Without filter[type], the data array can mix counterparty types: achCounterparty and swiftCounterparty.

curl -X GET 'https://api.s.unit.sh/counterparties?filter[type]=swiftCounterparty&page[limit]=100' \
-H "Authorization: Bearer ${TOKEN}"

Response​

Response is a JSON:API document.

200 OK​

NameTypeDescription
dataArray of SWIFT CounterpartyArray of counterparty resources.
metaJSON object that contains pagination dataPagination data includes offset, limit and total (estimated total items).
Example Response:
{
"data": [
{
"type": "swiftCounterparty",
"id": "200",
"attributes": {
"type": "Person",
"name": "Hans Mueller",
"bic": "COBADEFFXXX",
"accountNumber": "DE89370400440532013000",
"country": "DE",
"currency": "EUR",
"address": {
"country": "DE",
"street": "Friedrichstrasse 123",
"city": "Berlin",
"postalCode": "10117"
},
"tags": {
"label": "EU supplier"
},
"createdAt": "2024-01-15T10:02:00.000Z",
"updatedAt": "2024-01-15T10:02:00.000Z"
},
"relationships": {
"customer": {
"data": {
"type": "businessCustomer",
"id": "1000"
}
}
}
}
],
"meta": {
"pagination": {
"total": 1,
"limit": 10,
"offset": 0
}
}
}

Create Quote​

VerbPOST
URLhttps://api.s.unit.sh/quotes
Timeout (Seconds)5

Attributes​

NameTypeDescription
idempotencyKey RequiredstringUnique key to prevent duplicate quotes.
destinationAmount RequiredintegerAmount to be received by the counterparty, in the destination currency's minor unit (e.g. cents for EUR).

Relationships​

NameTypeDescription
customer RequiredRelationshipThe customer for whom the quote is created.
counterparty RequiredRelationshipThe international counterparty to receive the payment. The quote's destination currency is taken from this counterparty's currency.
Example Request:
curl -X POST 'https://api.s.unit.sh/quotes'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "quote",
"attributes": {
"idempotencyKey": "quote-001",
"destinationAmount": 10000
},
"relationships": {
"customer": {
"data": {
"type": "businessCustomer",
"id": "1000"
}
},
"counterparty": {
"data": {
"type": "swiftCounterparty",
"id": "200"
}
}
}
}
}'

Response​

Response is a JSON:API document.

201 Created​

NameTypeDescription
dataQuoteThe target resource after the operation was completed.
Example Response:
{
"data": {
"type": "quote",
"id": "300",
"attributes": {
"status": "New",
"sourceCurrency": "USD",
"destinationCurrency": "EUR",
"destinationAmount": 10000,
"exchangeRate": "1.085",
"sourceAmount": 10850,
"feeAmount": 1750,
"totalAmount": 12600,
"expiresAt": "2024-01-15T10:20:00.000Z",
"createdAt": "2024-01-15T10:05:00.000Z"
},
"relationships": {
"counterparty": {
"data": {
"type": "swiftCounterparty",
"id": "200"
}
},
"customer": {
"data": {
"type": "businessCustomer",
"id": "1000"
}
}
}
}
}

Get Quote​

VerbGET
URLhttps://api.s.unit.sh/quotes/{quoteId}
Timeout (Seconds)5
curl -X GET 'https://api.s.unit.sh/quotes/300' \
-H "Authorization: Bearer ${TOKEN}"

Response​

Response is a JSON:API document.

200 OK​

NameTypeDescription
dataQuoteQuote resource.
Example Response:
{
"data": {
"type": "quote",
"id": "300",
"attributes": {
"status": "New",
"sourceCurrency": "USD",
"destinationCurrency": "EUR",
"destinationAmount": 10000,
"exchangeRate": "1.085",
"sourceAmount": 10850,
"feeAmount": 1750,
"totalAmount": 12600,
"expiresAt": "2024-01-15T10:20:00.000Z",
"createdAt": "2024-01-15T10:05:00.000Z"
},
"relationships": {
"counterparty": {
"data": {
"type": "swiftCounterparty",
"id": "200"
}
},
"customer": {
"data": {
"type": "businessCustomer",
"id": "1000"
}
}
}
}
}

Create International Payment​

VerbPOST
URLhttps://api.s.unit.sh/payments
Data TypeinternationalPayment
Timeout (Seconds)5

Attributes​

NameTypeDescription
purpose RequiredstringThe purpose of the payment. See International Payment Purpose Code for supported values.
sourceOfFunds RequiredstringDescribes the origin of the funds. One of Salary, PersonalSavings, PersonalWealth, RetirementFunds, BusinessOwner, LoanFacility, PersonalAccount, CorporateAccount.
description OptionalstringPayment description (maximum of 255 characters).
tags OptionalobjectSee Tags.
idempotencyKey RequiredstringUnique key to prevent duplicate payments.

Relationships​

NameTypeDescription
quote RequiredRelationshipThe non-expired quote whose locked rate and amount will be used for this payment.
account RequiredRelationshipThe source deposit account to debit. Must belong to the same customer as the quote.
Example Request:
curl -X POST 'https://api.s.unit.sh/payments'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "internationalPayment",
"attributes": {
"purpose": "Travel",
"sourceOfFunds": "PersonalSavings",
"description": "Travel expenses for trip to Berlin",
"idempotencyKey": "international-payment-001"
},
"relationships": {
"quote": {
"data": {
"type": "quote",
"id": "300"
}
},
"account": {
"data": {
"type": "depositAccount",
"id": "5000"
}
}
}
}
}'

Response​

Response is a JSON:API document.

201 Created​

NameTypeDescription
dataInternational PaymentThe target resource after the operation was completed.
Example Response:
{
"data": {
"type": "internationalPayment",
"id": "400",
"attributes": {
"status": "Pending",
"direction": "Credit",
"sourceAmount": 10850,
"sourceCurrency": "USD",
"destinationAmount": 10000,
"destinationCurrency": "EUR",
"destinationCountry": "DE",
"purpose": "Travel",
"sourceOfFunds": "PersonalSavings",
"description": "Travel expenses for trip to Berlin",
"createdAt": "2024-01-15T10:10:00.000Z",
"updatedAt": "2024-01-15T10:10:00.000Z"
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "5000"
}
},
"counterparty": {
"data": {
"type": "swiftCounterparty",
"id": "200"
}
},
"quote": {
"data": {
"type": "quote",
"id": "300"
}
},
"customers": {
"data": [
{
"type": "businessCustomer",
"id": "1000"
}
]
},
"transaction": {
"data": {
"type": "originatedInternationalTransaction",
"id": "6001"
}
}
}
}
}

Get Payment​

Get an international payment by id.

VerbGET
URLhttps://api.s.unit.sh/payments/{paymentId}
Timeout (Seconds)5

Query Parameters​

NameTypeDefaultDescription
includestring(empty)Optional. A comma-separated list of related resources to include in the response. Related resources include: customers, account, quote, counterparty, transaction. See Getting Related Resources

Response​

Response is a JSON:API document.

200 OK​

NameTypeDescription
dataOne of the following types (ACH Payment, Book Payment, International Payment, Realtime Payment, or Wire Payment)Payment resource.
includedArray of DepositAccount, Customer, Quote, SWIFT Counterparty, or TransactionArray of resources requested by the include query parameter.
curl -X GET 'https://api.s.unit.sh/payments/400' \
-H "Authorization: Bearer ${TOKEN}"

List Payments​

List international payments. Filtering, paging and sorting can be applied.

VerbGET
URLhttps://api.s.unit.sh/payments
Timeout (Seconds)5

Query Parameters​

NameTypeDefaultDescription
page[limit]integer100Optional. Maximum number of resources that will be returned. Maximum is 1000 resources. See Pagination.
page[offset]integer0Optional. Number of resources to skip. See Pagination.
filter[accountId]string(empty)Optional. Filters the results by the specified account id.
filter[customerId]string(empty)Optional. Filters the results by the specified customer id.
filter[status][]string(empty)Optional. Filter payments by status. Valid values: Pending, PendingReview, Sent, Rejected, Returned. Usage example: filter[status][0]=Sent
filter[type][]string(empty)Optional. Filter payments by type. Valid values: Ach, Book, Wire, Realtime, International. Usage example: filter[type][0]=International
filter[since]RFC3339 Date string(empty)Optional. Filters payments created after the specified date. e.g. 2026-01-13T16:01:19.346Z
filter[until]RFC3339 Date string(empty)Optional. Filters payments created before the specified date. e.g. 2026-02-02T20:06:23.486Z
sortstringsort=-createdAtOptional. Leave empty or provide sort=createdAt for ascending order. Provide sort=-createdAt (leading minus sign) for descending order.
curl -X GET 'https://api.s.unit.sh/payments?filter[type][]=International&page[limit]=100' \
-H "Authorization: Bearer ${TOKEN}"

Response​

Response is a JSON:API document.

200 OK​

NameTypeDescription
dataArray of Payments (one of ACH Payment, Book Payment, International Payment, Realtime Payment, or Wire Payment)Array of payment resources.
metaJSON object that contains pagination dataPagination data includes offset, limit and total (estimated total items).
Example Response:
{
"data": [
{
"type": "internationalPayment",
"id": "400",
"attributes": {
"status": "Pending",
"direction": "Credit",
"sourceAmount": 10850,
"sourceCurrency": "USD",
"destinationAmount": 10000,
"destinationCurrency": "EUR",
"destinationCountry": "DE",
"purpose": "Travel",
"sourceOfFunds": "PersonalSavings",
"description": "Travel expenses for trip to Berlin",
"createdAt": "2024-01-15T10:10:00.000Z",
"updatedAt": "2024-01-15T10:10:00.000Z"
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "5000"
}
},
"counterparty": {
"data": {
"type": "swiftCounterparty",
"id": "200"
}
},
"quote": {
"data": {
"type": "quote",
"id": "300"
}
},
"customers": {
"data": [
{
"type": "businessCustomer",
"id": "1000"
}
]
},
"transaction": {
"data": {
"type": "originatedInternationalTransaction",
"id": "6001"
}
}
}
}
],
"meta": {
"pagination": {
"total": 1,
"limit": 10,
"offset": 0
}
}
}

Update Payment​

Update an International Payment.

VerbPATCH
URLhttps://api.s.unit.sh/payments/:paymentId
Timeout (Seconds)5

Attributes​

NameTypeDescription
tags RequiredobjectSee Updating Tags.
Update an international payment:
curl -X PATCH 'https://api.s.unit.sh/payments/:paymentId'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "internationalPayment",
"attributes": {
"tags": {
"by": null,
"uuid": "83033b64-38f8-4dbc-91a1-313ff0156d02"
}
}
}
}'

Response​

Response is a JSON:API document.

200 OK​

NameTypeDescription
dataInternational PaymentThe updated international payment resource.