Aller au contenu
Ressource · Workspace

Consents

A consent lets Sway read the data of bank accounts or initiate payments from them.

consents:readconsents:write
MéthodeCheminRésumé
GET/workspaces/{workspaceId}/read-consentsList read consents granted to access banking data
POST/workspaces/{workspaceId}/read-consentsCreate a new read consent with a banking provider
POST/workspaces/{workspaceId}/read-consents/{consentId}/finalizeFinalize a read consent after the provider authorization step
POST/workspaces/{workspaceId}/read-consents/{consentId}/renewRenew an expiring or expired read consent
POST/workspaces/{workspaceId}/read-consents/{consentId}/revokeRevoke an active read consent
POST/workspaces/{workspaceId}/read-consents/{consentId}/solveSolve a pending read consent issue requiring user action
POST/workspaces/{workspaceId}/write-consentsCreate a write consent to enable initiating payments

Les endpoints GET demandent consents:read, les autres consents:write.

L’objet ReadConsent

firestoreIdstringobligatoire

ID of the read consent.

expirationDateTimestringdate-time
authorizationStatusobjectobligatoire
Afficher les 2 champs enfants
statusstringobligatoire

Valeurspendingauthorisedrejectedrevokedconsumedexpired

updateDateTimestringdate-timeobligatoire
productsstring[]obligatoire

Banking product, a group of bank services that a consent can cover.

Afficher les 15 valeurs
  • identity

    Identity of the account holder.

  • read_consents

    Consents that give read access to account data.

  • write_consents

    Consents that allow payments.

  • accounts

    Bank accounts and their details.

  • beneficiaries

    Payees saved at the bank.

  • balances

    Balances of the accounts.

  • transactions

    Transactions of the accounts.

  • statements

    Statements of the accounts.

  • cards

    Payment cards of the accounts.

  • variable_recurring_payments

    Recurring payments with variable amounts.

  • direct_debits

    Direct debits of the accounts.

  • draft_payments

    Payments submitted to the bank and approved by the account holder in e-banking.

  • single_payments

    One-time payments that the bank executes.

  • scheduled_payments

    Payments that the bank executes at a later date.

  • standing_order_payments

    Standing orders, recurring payments of a fixed amount.

featuresstring[]obligatoire

Banking feature, a capability of the banking product named before the dot.

Afficher les 44 valeurs
  • identity.details

    Reads the identity details of the account holder.

  • read_consents.multiple_consents_allowed

    Allows several read consents at the bank, each for its own accounts.

  • read_consents.single_consent_allowed

    Allows one read consent at the bank; a new consent replaces the previous one.

  • read_consents.redirect

    Authorises read consents on the website or app of the bank.

  • read_consents.embedded

    Authorises read consents without leaving Sway.

  • write_consents.redirect

    Authorises payment consents on the website or app of the bank.

  • write_consents.embedded

    Authorises payment consents without leaving Sway.

  • accounts.list

    Lists the bank accounts.

  • accounts.details

    Reads the details of a bank account.

  • beneficiaries.list

    Lists the payees saved at the bank.

  • beneficiaries.details

    Reads the details of a saved payee.

  • balances.intraday

    Reads the balance during the day.

  • balances.closing

    Reads the closing balance of each day.

  • transactions.intraday

    Reads the transactions of the current day.

  • transactions.history

    Reads the past transactions.

  • statements.list

    Lists the account statements.

  • statements.iso_camt053_xml

    Provides account statements as ISO 20022 camt.053 XML files.

  • statements.pdf

    Provides account statements as PDF files.

  • direct_debits.list

    Lists the direct debits.

  • direct_debits.details

    Reads the details of a direct debit.

  • draft_payments.revolut_csv

    Submits payments as a CSV file in the Revolut format.

  • draft_payments.iso_pain001_ch_xml

    Submits payments as an ISO 20022 pain.001 XML file in the Swiss variant.

  • draft_payments.iso_pain001_xml

    Submits payments as an ISO 20022 pain.001 XML file.

  • draft_payments.domestic

    Submits domestic payments.

  • draft_payments.international

    Submits international payments.

  • draft_payments.bulk

    Submits several payments at once.

  • draft_payments.list

    Lists the submitted payments.

  • draft_payments.details

    Reads the details of a submitted payment.

  • single_payments.domestic

    Executes domestic one-time payments.

  • single_payments.international

    Executes international one-time payments.

  • single_payments.instant

    Executes domestic instant payments.

  • single_payments.bulk

    Executes several one-time payments at once.

  • single_payments.list

    Lists the one-time payments.

  • single_payments.details

    Reads the details of a one-time payment.

  • scheduled_payments.domestic

    Schedules domestic payments.

  • scheduled_payments.international

    Schedules international payments.

  • scheduled_payments.bulk

    Schedules several payments at once.

  • scheduled_payments.list

    Lists the scheduled payments.

  • scheduled_payments.details

    Reads the details of a scheduled payment.

  • standing_order_payments.domestic

    Sets up domestic standing orders.

  • standing_order_payments.international

    Sets up international standing orders.

  • standing_order_payments.bulk

    Sets up several standing orders at once.

  • standing_order_payments.list

    Lists the standing orders.

  • standing_order_payments.details

    Reads the details of a standing order.

rangeobject
Afficher les 2 champs enfants
fromDateTimestringdate-time
toDateTimestringdate-time
referencestringobligatoire
Afficher les 11 champs
serviceProviderIdstringobligatoire

ID of the service provider.

workspaceIdstringobligatoire

ID of the workspace.

creationobjectobligatoire

When and by whom the resource was created.

Afficher les 2 champs enfants
creationDateTimestringdate-timeobligatoire

Date and time when the resource was created.

createdBystring

ID of the user who created the resource, when recorded.

solvedbooleanobligatoire
L’objet 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
}
GET/workspaces/{workspaceId}/read-consents

List read consents granted to access banking data

Portéeconsents:read

Paramètres de chemin

workspaceIdstringobligatoire

ID of the workspace.

Paramètres de requête

limitinteger

Maximum number of items to return, from 1 to 100. A missing, invalid or non-positive value falls back to 20, and a larger value to 100.

Par défaut20

startAfterstring

Cursor of the page to return: the nextCursor of the previous page.

fieldsstring

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

idsstring[]

Comma-separated IDs of the items to return, up to 30. When set, limit, startAfter and the filters are ignored.

Renvoie

200

List of items

dataReadConsent[]obligatoire

Items of the page, in list order.

limitintegerobligatoire

Page size of the request, or the number of requested ids.

nextCursorstring

Cursor of the next page, to pass as startAfter. Absent when the page holds fewer items than limit; a full last page still has one, and the page it points to is empty.

curl 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/read-consents' \
  -H "Authorization: Bearer $SWAY_API_KEY"
{
  "data": [
    {
      "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
    }
  ],
  "limit": 0,
  "nextCursor": "string"
}
POST/workspaces/{workspaceId}/read-consents

Create a new read consent with a banking provider

Portéeconsents: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

serviceProviderIdstringobligatoire

ID of the service provider.

referencestringobligatoire
consentIdstring

ID of an earlier read consent to revoke and replace; the new consent keeps its reference.

Renvoie

200

Successful response

dataReadConsentobligatoire
curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/read-consents' \
  -H "Authorization: Bearer $SWAY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "serviceProviderId": "sprov_SUlEUDAwMjMw",
  "reference": "string",
  "consentId": "rcons_UkVBRC0wMDQy"
}'
{
  "data": {
    "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
  }
}
POST/workspaces/{workspaceId}/read-consents/{consentId}/finalize

Finalize a read consent after the provider authorization step

Portéeconsents:write

Paramètres de chemin

workspaceIdstringobligatoire

ID of the workspace.

consentIdstringobligatoire

ID of the read consent.

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.

Renvoie

200

Successful response

dataReadConsentobligatoire
curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/read-consents/rcons_UkVBRC0wMDQy/finalize' \
  -H "Authorization: Bearer $SWAY_API_KEY"
{
  "data": {
    "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
  }
}
POST/workspaces/{workspaceId}/read-consents/{consentId}/renew

Renew an expiring or expired read consent

Portéeconsents:write

Paramètres de chemin

workspaceIdstringobligatoire

ID of the workspace.

consentIdstringobligatoire

ID of the read consent.

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

serviceProviderIdstringobligatoire

ID of the service provider.

referencestringobligatoire

Renvoie

200

Successful response

dataReadConsentobligatoire
curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/read-consents/rcons_UkVBRC0wMDQy/renew' \
  -H "Authorization: Bearer $SWAY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "serviceProviderId": "sprov_SUlEUDAwMjMw",
  "reference": "string"
}'
{
  "data": {
    "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
  }
}
POST/workspaces/{workspaceId}/read-consents/{consentId}/revoke

Revoke an active read consent

Portéeconsents:write

Paramètres de chemin

workspaceIdstringobligatoire

ID of the workspace.

consentIdstringobligatoire

ID of the read consent.

Renvoie

204

No content

curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/read-consents/rcons_UkVBRC0wMDQy/revoke' \
  -H "Authorization: Bearer $SWAY_API_KEY"
{
  "error": {
    "code": "invalid-argument",
    "message": "Invalid request"
  }
}
POST/workspaces/{workspaceId}/read-consents/{consentId}/solve

Solve a pending read consent issue requiring user action

Portéeconsents:write

Paramètres de chemin

workspaceIdstringobligatoire

ID of the workspace.

consentIdstringobligatoire

ID of the read consent.

Renvoie

204

No content

curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/read-consents/rcons_UkVBRC0wMDQy/solve' \
  -H "Authorization: Bearer $SWAY_API_KEY"
{
  "error": {
    "code": "invalid-argument",
    "message": "Invalid request"
  }
}
POST/workspaces/{workspaceId}/write-consents

Create a write consent to enable initiating payments

Portéeconsents: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

serviceProviderIdstringobligatoire

ID of the service provider.

paymentDataobjectobligatoire
Afficher les 11 champs enfants
scopestring | null

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 | null
executionDatestringobligatoire
amountnumberobligatoire

Amount of the payment, in currency.

currencystringobligatoire
referencestring | null
communicationstring | null
invoiceIdstring | null

ID of the invoice.

chargeBearerstring | null

ValeursCREDDEBTSHARSLEV

debtorobjectobligatoire
Afficher les 4 champs enfants
bankAccountIdstringobligatoire

ID of the bank account.

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 6 champs enfants
counterpartyIdstringobligatoire

ID of the counterparty.

counterpartyCashAccountIdstringobligatoire
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
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.

callbackParamsRecord<string, string | number | boolean>

Renvoie

200

Successful response

dataWriteConsentobligatoire
Afficher les 12 champs enfants
firestoreIdstringobligatoire

ID of the write consent.

expirationDateTimestringdate-time
authorizationStatusobjectobligatoire
Afficher les 2 champs enfants
statusstringobligatoire

Valeurspendingauthorisedrejectedrevokedconsumedexpired

updateDateTimestringdate-timeobligatoire
authorizationUristringuri
productsstring[]obligatoire

Banking product, a group of bank services that a consent can cover.

Afficher les 15 valeurs
  • identity

    Identity of the account holder.

  • read_consents

    Consents that give read access to account data.

  • write_consents

    Consents that allow payments.

  • accounts

    Bank accounts and their details.

  • beneficiaries

    Payees saved at the bank.

  • balances

    Balances of the accounts.

  • transactions

    Transactions of the accounts.

  • statements

    Statements of the accounts.

  • cards

    Payment cards of the accounts.

  • variable_recurring_payments

    Recurring payments with variable amounts.

  • direct_debits

    Direct debits of the accounts.

  • draft_payments

    Payments submitted to the bank and approved by the account holder in e-banking.

  • single_payments

    One-time payments that the bank executes.

  • scheduled_payments

    Payments that the bank executes at a later date.

  • standing_order_payments

    Standing orders, recurring payments of a fixed amount.

featuresstring[]obligatoire

Banking feature, a capability of the banking product named before the dot.

Afficher les 44 valeurs
  • identity.details

    Reads the identity details of the account holder.

  • read_consents.multiple_consents_allowed

    Allows several read consents at the bank, each for its own accounts.

  • read_consents.single_consent_allowed

    Allows one read consent at the bank; a new consent replaces the previous one.

  • read_consents.redirect

    Authorises read consents on the website or app of the bank.

  • read_consents.embedded

    Authorises read consents without leaving Sway.

  • write_consents.redirect

    Authorises payment consents on the website or app of the bank.

  • write_consents.embedded

    Authorises payment consents without leaving Sway.

  • accounts.list

    Lists the bank accounts.

  • accounts.details

    Reads the details of a bank account.

  • beneficiaries.list

    Lists the payees saved at the bank.

  • beneficiaries.details

    Reads the details of a saved payee.

  • balances.intraday

    Reads the balance during the day.

  • balances.closing

    Reads the closing balance of each day.

  • transactions.intraday

    Reads the transactions of the current day.

  • transactions.history

    Reads the past transactions.

  • statements.list

    Lists the account statements.

  • statements.iso_camt053_xml

    Provides account statements as ISO 20022 camt.053 XML files.

  • statements.pdf

    Provides account statements as PDF files.

  • direct_debits.list

    Lists the direct debits.

  • direct_debits.details

    Reads the details of a direct debit.

  • draft_payments.revolut_csv

    Submits payments as a CSV file in the Revolut format.

  • draft_payments.iso_pain001_ch_xml

    Submits payments as an ISO 20022 pain.001 XML file in the Swiss variant.

  • draft_payments.iso_pain001_xml

    Submits payments as an ISO 20022 pain.001 XML file.

  • draft_payments.domestic

    Submits domestic payments.

  • draft_payments.international

    Submits international payments.

  • draft_payments.bulk

    Submits several payments at once.

  • draft_payments.list

    Lists the submitted payments.

  • draft_payments.details

    Reads the details of a submitted payment.

  • single_payments.domestic

    Executes domestic one-time payments.

  • single_payments.international

    Executes international one-time payments.

  • single_payments.instant

    Executes domestic instant payments.

  • single_payments.bulk

    Executes several one-time payments at once.

  • single_payments.list

    Lists the one-time payments.

  • single_payments.details

    Reads the details of a one-time payment.

  • scheduled_payments.domestic

    Schedules domestic payments.

  • scheduled_payments.international

    Schedules international payments.

  • scheduled_payments.bulk

    Schedules several payments at once.

  • scheduled_payments.list

    Lists the scheduled payments.

  • scheduled_payments.details

    Reads the details of a scheduled payment.

  • standing_order_payments.domestic

    Sets up domestic standing orders.

  • standing_order_payments.international

    Sets up international standing orders.

  • standing_order_payments.bulk

    Sets up several standing orders at once.

  • standing_order_payments.list

    Lists the standing orders.

  • standing_order_payments.details

    Reads the details of a standing order.

rangeobject
Afficher les 2 champs enfants
fromDateTimestringdate-time
toDateTimestringdate-time
referencestring
serviceProviderIdstringobligatoire

ID of the service provider.

workspaceIdstringobligatoire

ID of the workspace.

creationobjectobligatoire

When and by whom the resource was created.

Afficher les 2 champs enfants
creationDateTimestringdate-timeobligatoire

Date and time when the resource was created.

createdBystring

ID of the user who created the resource, when recorded.

paymentDataobjectobligatoire
Afficher les 11 champs enfants
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
referencestring
communicationstring
invoiceIdstring

ID of the invoice.

chargeBearerstring

ValeursCREDDEBTSHARSLEV

debtorobjectobligatoire
Afficher les 4 champs enfants
bankAccountIdstringobligatoire

ID of the bank account.

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 6 champs enfants
counterpartyIdstringobligatoire

ID of the counterparty.

counterpartyCashAccountIdstringobligatoire
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
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.

curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/write-consents' \
  -H "Authorization: Bearer $SWAY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "serviceProviderId": "sprov_SUlEUDAwMjMw",
  "paymentData": {
    "scope": "domestic",
    "idempotencyId": "string",
    "executionDate": "2026-03-02",
    "amount": 0,
    "currency": "string",
    "reference": "string",
    "communication": "string",
    "invoiceId": "Iv5zP2nK7wRt3xMq9bLd",
    "chargeBearer": "CRED",
    "debtor": {
      "bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
      "name": "string",
      "accountIdentifications": [
        {
          "type": "bic",
          "value": "string"
        }
      ],
      "currency": "string"
    },
    "creditor": {
      "counterpartyId": "Cp2nG7vB4xLq9wRt5hMz",
      "counterpartyCashAccountId": "string",
      "name": "string",
      "accountIdentifications": [
        {
          "type": "bic",
          "value": "string"
        }
      ],
      "currency": "string",
      "address": {
        "country": "CH",
        "postCode": "string",
        "townName": "string",
        "streetName": "string",
        "buildingNumber": "string",
        "name": "string",
        "sortingCode": "string",
        "postBox": "string",
        "administrativeArea": "string",
        "recipients": [
          "string"
        ],
        "organization": "string",
        "source": [
          "string"
        ]
      }
    }
  },
  "callbackParams": {
    "key": "string"
  }
}'
{
  "data": {
    "firestoreId": "wcons_V1JJVEUtMDA0Mg",
    "expirationDateTime": "2026-03-02T09:30:00.000Z",
    "authorizationStatus": {
      "status": "pending",
      "updateDateTime": "2026-03-02T09:30:00.000Z"
    },
    "authorizationUri": "https://example.com",
    "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"
    },
    "paymentData": {
      "scope": "domestic",
      "idempotencyId": "string",
      "executionDate": "2026-03-02",
      "amount": 0,
      "currency": "string",
      "reference": "string",
      "communication": "string",
      "invoiceId": "Iv5zP2nK7wRt3xMq9bLd",
      "chargeBearer": "CRED",
      "debtor": {
        "bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
        "name": "string",
        "accountIdentifications": [
          {
            "type": "bic",
            "value": "string"
          }
        ],
        "currency": "string"
      },
      "creditor": {
        "counterpartyId": "Cp2nG7vB4xLq9wRt5hMz",
        "counterpartyCashAccountId": "string",
        "name": "string",
        "accountIdentifications": [
          {
            "type": "bic",
            "value": "string"
          }
        ],
        "currency": "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"
          ]
        }
      }
    }
  }
}

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.