| Méthode | Chemin | Résumé |
|---|---|---|
| POST | …/summarize | Summarize a payment before creating or initiating it |
Les chemins commencent par /workspaces/{workspaceId}/payments. Chaque endpoint demande payments:write.
L’objet PaymentSummary
workspaceIdstringobligatoireID of the workspace.
typestringobligatoireKind of payment that the bank connection of the debtor account supports.
draft_paymentA draft payment, which the account holder approves in e-banking.
initiated_paymentAn initiated payment, which Sway sends to the bank for execution.
scopestringScope of the payment, which depends on the countries and currencies of the debtor and creditor accounts.
domesticA GBP payment between two accounts in the United Kingdom, or a EUR payment between two accounts in SEPA countries.
internationalAny other payment, which needs the BIC of the creditor bank.
idempotencyIdstringexecutionDatestringobligatoireamountnumberobligatoirecurrencystringobligatoireAfficher les 12 champsMasquer la liste des champs
referencestringcommunicationstringinvoiceIdstringID of the invoice.
debtorobjectobligatoireAfficher les 4 champs enfants
namestringobligatoireaccountIdentificationsobject[]obligatoireAfficher les 2 champs enfants
typestringobligatoireKind of identifier of a bank account or of its bank.
Afficher les 14 valeurs
bicBank Identifier Code of the bank.
sortCodeSix-digit code of a bank and branch in the United Kingdom.
ibanInternational Bank Account Number.
bbanBasic Bank Account Number, the country-specific format of an account number.
accountNumberAccount number that the bank assigns, unique within the bank or the branch.
panPrimary Account Number, the number of a credit or debit card.
emailEmail address that identifies the account.
msisdnMobile phone number that identifies the account.
virtualAccountIdIdentifier of a virtual sub-account of a main account.
globalWalletIdentifier of a digital wallet that holds and pays in several currencies.
clabeCLABE, the 18-digit standardized bank code of a Mexican bank account.
bitcoinAddressSingle Bitcoin address, the only address the account tracks.
bitcoinXpubBitcoin extended public key (xpub, ypub or zpub), from which the addresses of the wallet are derived.
otherAnother kind of identifier.
valuestringobligatoireValue of the identifier, for example the IBAN or the BIC.
currencystringobligatoirecreditorobjectobligatoireAfficher les 9 champs enfants
counterpartyCashAccountIdstringobligatoirenamestringobligatoireaddressobjectAfficher les 12 champs enfants
countrystringISO 3166-1 alpha-2 country code
postCodestringPost code of the address.
townNamestringName of the town or city.
streetNamestringName of the street.
buildingNumberstringNumber of the building in the street.
namestringName of the building or place.
sortingCodestringAdditional sorting code of the postal service, used in a few countries such as France.
postBoxstringPost office box.
administrativeAreastringRegion of the country, such as a canton or a state.
recipientsstring[]Names of the people the address is for.
organizationstringName of the organization at the address.
sourcestring[]Text the address was read from, one item per line.
accountIdentificationsobject[]obligatoireAfficher les 2 champs enfants
typestringobligatoireKind of identifier of a bank account or of its bank.
Afficher les 14 valeurs
bicBank Identifier Code of the bank.
sortCodeSix-digit code of a bank and branch in the United Kingdom.
ibanInternational Bank Account Number.
bbanBasic Bank Account Number, the country-specific format of an account number.
accountNumberAccount number that the bank assigns, unique within the bank or the branch.
panPrimary Account Number, the number of a credit or debit card.
emailEmail address that identifies the account.
msisdnMobile phone number that identifies the account.
virtualAccountIdIdentifier of a virtual sub-account of a main account.
globalWalletIdentifier of a digital wallet that holds and pays in several currencies.
clabeCLABE, the 18-digit standardized bank code of a Mexican bank account.
bitcoinAddressSingle Bitcoin address, the only address the account tracks.
bitcoinXpubBitcoin extended public key (xpub, ypub or zpub), from which the addresses of the wallet are derived.
otherAnother kind of identifier.
valuestringobligatoireValue of the identifier, for example the IBAN or the BIC.
currencystringobligatoireverificationobjectAfficher les 4 champs enfants
idstringobligatoirestatusstringobligatoireValeursverifiedpendingrejected
holderNamestringobligatoiredateTimestringdate-timeobligatoirerequiresBicbooleanobligatoirecandidateBicstring{
"workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
"type": "draft_payment",
"scope": "domestic",
"idempotencyId": "string",
"executionDate": "string",
"amount": 0,
"currency": "string",
"reference": "string",
"communication": "string",
"invoiceId": "Iv5zP2nK7wRt3xMq9bLd",
"debtor": {
"bankAccount": {
"firestoreId": "bacc_Q0gzMTA4NzY1NDM",
"name": "string",
"products": [
"identity"
],
"features": [
"identity.details"
],
"usage": "individual",
"workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
"serviceProviderId": "sprov_SUlEUDAwMjMw",
"consentId": "rcons_UkVBRC0wMDQy",
"creation": {
"creationDateTime": "2026-03-02T09:15:00.000Z",
"createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"activation": {
"enabled": true,
"updateDateTime": "2026-03-02T09:15:00.000Z",
"updatedBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"archived": true,
"isOffline": true,
"enrichWithCamt": true,
"tasks": 0,
"lastRequestedDateForBalances": "2026-03-02T09:30:00.000Z",
"lastRequestedDateForTransactions": "2026-03-02T09:30:00.000Z",
"lastTaskRunDateForBalances": "2026-03-02T09:30:00.000Z",
"lastTaskRunDateForTransactions": "2026-03-02T09:30:00.000Z",
"lastAvailableDateForBalances": "2026-03-02",
"lastAvailableDateForTransactions": "2026-03-02",
"cashAccounts": [
{
"accountIdentifications": [
{
"type": "bic",
"identification": "string"
}
],
"currency": "string",
"name": "string",
"ownerName": "string"
}
],
"relationships": {
"readConsent": {
"firestoreId": "rcons_UkVBRC0wMDQy",
"expirationDateTime": "2026-03-02T09:30:00.000Z",
"authorizationStatus": {
"status": "pending",
"updateDateTime": "2026-03-02T09:30:00.000Z"
},
"products": [
"identity"
],
"features": [
"identity.details"
],
"range": {
"fromDateTime": "2026-03-02T09:30:00.000Z",
"toDateTime": "2026-03-02T09:30:00.000Z"
},
"reference": "string",
"serviceProviderId": "sprov_SUlEUDAwMjMw",
"workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
"creation": {
"creationDateTime": "2026-03-02T09:15:00.000Z",
"createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"solved": true
},
"counterparty": {
"firestoreId": "Cp2nG7vB4xLq9wRt5hMz",
"workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
"creation": {
"creationDateTime": "2026-03-02T09:15:00.000Z",
"createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"activation": {
"enabled": true,
"updateDateTime": "2026-03-02T09:15:00.000Z",
"updatedBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"entityType": "individual",
"name": "string",
"phones": [
"string"
],
"emails": [
"string"
],
"address": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"sortingCode": "string",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier"
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich"
]
},
"contactPersons": [
{
"name": "string",
"phone": "string",
"email": "string"
}
],
"taxIdentification": "string",
"notes": "string",
"cashAccounts": [
{
"identifications": [
{
"type": "bic",
"value": "string"
}
],
"currency": "CHF",
"bankAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"sortingCode": "string",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier"
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich"
]
},
"internalId": "string",
"nickname": "string",
"verification": {
"id": "3f2c8a1e-6b4d-4e7a-9c15-8d2b7f0e4a61",
"status": "verified",
"holderName": "string",
"dateTime": "2026-03-02T09:30:00.000Z"
}
}
],
"cashAccountIdentifications": [
"string"
],
"approvedCashAccountIds": [
"string"
],
"bankAccountId": "string"
},
"latestBalance": {
"date": "2026-03-02",
"balance": {
"dateTime": "2026-03-02T09:30:00.000Z",
"currency": "string",
"amount": 0,
"isClosing": true
}
},
"recentBalances": {
"key": {
"date": "2026-03-02",
"balance": {
"dateTime": "2026-03-02T09:30:00.000Z",
"currency": "string",
"amount": 0,
"isClosing": true
}
}
}
}
},
"name": "string",
"accountIdentifications": [
{
"type": "bic",
"value": "string"
}
],
"currency": "string"
},
"creditor": {
"counterparty": {
"firestoreId": "Cp2nG7vB4xLq9wRt5hMz",
"workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
"creation": {
"creationDateTime": "2026-03-02T09:15:00.000Z",
"createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"activation": {
"enabled": true,
"updateDateTime": "2026-03-02T09:15:00.000Z",
"updatedBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"entityType": "individual",
"name": "string",
"phones": [
"string"
],
"emails": [
"string"
],
"address": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"sortingCode": "string",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier"
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich"
]
},
"contactPersons": [
{
"name": "string",
"phone": "string",
"email": "string"
}
],
"taxIdentification": "string",
"notes": "string",
"cashAccounts": [
{
"identifications": [
{
"type": "bic",
"value": "string"
}
],
"currency": "CHF",
"bankAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"sortingCode": "string",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier"
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich"
]
},
"internalId": "string",
"nickname": "string",
"verification": {
"id": "3f2c8a1e-6b4d-4e7a-9c15-8d2b7f0e4a61",
"status": "verified",
"holderName": "string",
"dateTime": "2026-03-02T09:30:00.000Z"
}
}
],
"cashAccountIdentifications": [
"string"
],
"approvedCashAccountIds": [
"string"
],
"bankAccountId": "string"
},
"counterpartyCashAccountId": "string",
"name": "string",
"address": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"sortingCode": "string",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier"
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich"
]
},
"accountIdentifications": [
{
"type": "bic",
"value": "string"
}
],
"currency": "string",
"verification": {
"id": "3f2c8a1e-6b4d-4e7a-9c15-8d2b7f0e4a61",
"status": "verified",
"holderName": "string",
"dateTime": "2026-03-02T09:30:00.000Z"
},
"requiresBic": true,
"candidateBic": "string"
}
}/workspaces/{workspaceId}/payments/summarizeSummarize a payment before creating or initiating it
Portéepayments:write
Paramètres de chemin
workspaceIdstringobligatoireID of the workspace.
Paramètres de requête
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Corps de la requête
bankAccountIdstringobligatoireID of the bank account.
executionDatestringobligatoireamountnumberobligatoirecurrencystringcounterpartyIdstringobligatoireID of the counterparty.
counterpartyCashAccountIdstringobligatoirereferencestringcommunicationstringinvoiceIdstringID of the invoice.
Renvoie
Successful response
curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/payments/summarize' \
-H "Authorization: Bearer $SWAY_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
"executionDate": "2026-03-02",
"amount": 0,
"currency": "string",
"counterpartyId": "Cp2nG7vB4xLq9wRt5hMz",
"counterpartyCashAccountId": "string",
"reference": "string",
"communication": "string",
"invoiceId": "Iv5zP2nK7wRt3xMq9bLd"
}'const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/payments/summarize', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
"executionDate": "2026-03-02",
"amount": 0,
"currency": "string",
"counterpartyId": "Cp2nG7vB4xLq9wRt5hMz",
"counterpartyCashAccountId": "string",
"reference": "string",
"communication": "string",
"invoiceId": "Iv5zP2nK7wRt3xMq9bLd"
}),
});
console.log(await response.json());import os
import requests
response = requests.post(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/payments/summarize",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
json={
"bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
"executionDate": "2026-03-02",
"amount": 0,
"currency": "string",
"counterpartyId": "Cp2nG7vB4xLq9wRt5hMz",
"counterpartyCashAccountId": "string",
"reference": "string",
"communication": "string",
"invoiceId": "Iv5zP2nK7wRt3xMq9bLd",
},
)
print(response.json()){
"data": {
"workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
"type": "draft_payment",
"scope": "domestic",
"idempotencyId": "string",
"executionDate": "string",
"amount": 0,
"currency": "string",
"reference": "string",
"communication": "string",
"invoiceId": "Iv5zP2nK7wRt3xMq9bLd",
"debtor": {…},
"creditor": {…}
}
}{
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}