Aller au contenu
Ressource · Payments

Payments

Summarize a payment before you create or initiate it.

payments:write
MéthodeCheminRésumé
POST…/summarizeSummarize a payment before creating or initiating it

Les chemins commencent par /workspaces/{workspaceId}/payments. Chaque endpoint demande payments:write.

L’objet PaymentSummary

workspaceIdstringobligatoire

ID of the workspace.

typestringobligatoire

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
executionDatestringobligatoire
amountnumberobligatoire
currencystringobligatoire
Afficher les 12 champs
referencestring
communicationstring
invoiceIdstring

ID of the invoice.

debtorobjectobligatoire
Afficher les 4 champs enfants
bankAccountBankAccountobligatoire
namestringobligatoire
accountIdentificationsobject[]obligatoire
Afficher les 2 champs enfants
typestringobligatoire

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

Afficher les 14 valeurs
  • 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.

valuestringobligatoire

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

currencystringobligatoire
creditorobjectobligatoire
Afficher les 9 champs enfants
counterpartyCounterpartyobligatoire
counterpartyCashAccountIdstringobligatoire
namestringobligatoire
addressobject
Afficher les 12 champs enfants
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[]obligatoire
Afficher les 2 champs enfants
typestringobligatoire

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

Afficher les 14 valeurs
  • 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.

valuestringobligatoire

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

currencystringobligatoire
verificationobject
Afficher les 4 champs enfants
idstringobligatoire
statusstringobligatoire

Valeursverifiedpendingrejected

holderNamestringobligatoire
dateTimestringdate-timeobligatoire
requiresBicbooleanobligatoire
candidateBicstring
L’objet PaymentSummary
{
  "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

Portéepayments:write

Paramètres de chemin

workspaceIdstringobligatoire

ID of the workspace.

Paramètres de requête

fieldsstring

Comma-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

bankAccountIdstringobligatoire

ID of the bank account.

executionDatestringobligatoire
amountnumberobligatoire
currencystring
counterpartyIdstringobligatoire

ID of the counterparty.

counterpartyCashAccountIdstringobligatoire
referencestring
communicationstring
invoiceIdstring

ID of the invoice.

Renvoie

200

Successful response

dataPaymentSummaryobligatoire
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": {…}
  }
}

Construisez sur vos propres données.

Créez un compte, ouvrez Profil › Développeur et créez une clé limitée aux ressources dont vous avez besoin. Une question sur une intégration ? L’équipe y répond lors d’un appel.