Skip to content
Resource · Payments

Payments

Summarize a payment before you create or initiate it.

payments:write
MethodPathSummary
POST…/summarizeSummarize a payment before creating or initiating it

Paths start with /workspaces/{workspaceId}/payments. Every endpoint needs payments:write.

The PaymentSummary object

workspaceIdstringrequired

ID of the workspace.

typestringrequired

Kind of payment that the bank connection of the debtor account supports.

  • draft_payment

    A draft payment, which the account holder approves in e-banking.

  • initiated_payment

    An initiated payment, which Sway sends to the bank for execution.

scopestring

Scope of the payment, which depends on the countries and currencies of the debtor and creditor accounts.

  • domestic

    A GBP payment between two accounts in the United Kingdom, or a EUR payment between two accounts in SEPA countries.

  • international

    Any other payment, which needs the BIC of the creditor bank.

idempotencyIdstring
executionDatestringrequired
amountnumberrequired
currencystringrequired
Show all 12 fields
referencestring
communicationstring
invoiceIdstring

ID of the invoice.

debtorobjectrequired
Show 4 child fields
bankAccountBankAccountrequired
namestringrequired
accountIdentificationsobject[]required
Show 2 child fields
typestringrequired

Kind of identifier of a bank account or of its bank.

Show 14 values
  • bic

    Bank Identifier Code of the bank.

  • sortCode

    Six-digit code of a bank and branch in the United Kingdom.

  • iban

    International Bank Account Number.

  • bban

    Basic Bank Account Number, the country-specific format of an account number.

  • accountNumber

    Account number that the bank assigns, unique within the bank or the branch.

  • pan

    Primary Account Number, the number of a credit or debit card.

  • email

    Email address that identifies the account.

  • msisdn

    Mobile phone number that identifies the account.

  • virtualAccountId

    Identifier of a virtual sub-account of a main account.

  • globalWallet

    Identifier of a digital wallet that holds and pays in several currencies.

  • clabe

    CLABE, the 18-digit standardized bank code of a Mexican bank account.

  • bitcoinAddress

    Single Bitcoin address, the only address the account tracks.

  • bitcoinXpub

    Bitcoin extended public key (xpub, ypub or zpub), from which the addresses of the wallet are derived.

  • other

    Another kind of identifier.

valuestringrequired

Value of the identifier, for example the IBAN or the BIC.

currencystringrequired
creditorobjectrequired
Show 9 child fields
counterpartyCounterpartyrequired
counterpartyCashAccountIdstringrequired
namestringrequired
addressobject
Show 12 child fields
countrystring

ISO 3166-1 alpha-2 country code

postCodestring

Post code of the address.

townNamestring

Name of the town or city.

streetNamestring

Name of the street.

buildingNumberstring

Number of the building in the street.

namestring

Name of the building or place.

sortingCodestring

Additional sorting code of the postal service, used in a few countries such as France.

postBoxstring

Post office box.

administrativeAreastring

Region of the country, such as a canton or a state.

recipientsstring[]

Names of the people the address is for.

organizationstring

Name of the organization at the address.

sourcestring[]

Text the address was read from, one item per line.

accountIdentificationsobject[]required
Show 2 child fields
typestringrequired

Kind of identifier of a bank account or of its bank.

Show 14 values
  • bic

    Bank Identifier Code of the bank.

  • sortCode

    Six-digit code of a bank and branch in the United Kingdom.

  • iban

    International Bank Account Number.

  • bban

    Basic Bank Account Number, the country-specific format of an account number.

  • accountNumber

    Account number that the bank assigns, unique within the bank or the branch.

  • pan

    Primary Account Number, the number of a credit or debit card.

  • email

    Email address that identifies the account.

  • msisdn

    Mobile phone number that identifies the account.

  • virtualAccountId

    Identifier of a virtual sub-account of a main account.

  • globalWallet

    Identifier of a digital wallet that holds and pays in several currencies.

  • clabe

    CLABE, the 18-digit standardized bank code of a Mexican bank account.

  • bitcoinAddress

    Single Bitcoin address, the only address the account tracks.

  • bitcoinXpub

    Bitcoin extended public key (xpub, ypub or zpub), from which the addresses of the wallet are derived.

  • other

    Another kind of identifier.

valuestringrequired

Value of the identifier, for example the IBAN or the BIC.

currencystringrequired
verificationobject
Show 4 child fields
idstringrequired
statusstringrequired

Valuesverifiedpendingrejected

holderNamestringrequired
dateTimestringdate-timerequired
requiresBicbooleanrequired
candidateBicstring
The PaymentSummary object
{
  "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"
  }
}
POST/workspaces/{workspaceId}/payments/summarize

Summarize a payment before creating or initiating it

Scopepayments:write

Path parameters

workspaceIdstringrequired

ID of the workspace.

Query parameters

fieldsstring

Comma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.

Request body

bankAccountIdstringrequired

ID of the bank account.

executionDatestringrequired
amountnumberrequired
currencystring
counterpartyIdstringrequired

ID of the counterparty.

counterpartyCashAccountIdstringrequired
referencestring
communicationstring
invoiceIdstring

ID of the invoice.

Returns

200

Successful response

dataPaymentSummaryrequired
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"
}'
{
  "data": {
    "workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
    "type": "draft_payment",
    "scope": "domestic",
    "idempotencyId": "string",
    "executionDate": "string",
    "amount": 0,
    "currency": "string",
    "reference": "string",
    "communication": "string",
    "invoiceId": "Iv5zP2nK7wRt3xMq9bLd",
    "debtor": {…},
    "creditor": {…}
  }
}

Start building on your own data.

Create an account, open Profile › Developer and create a key scoped to the resources you need. Questions about an integration? The team answers them on a call.