Skip to content
Resource · Payments

Draft payments

A draft payment is a payment prepared in Sway and not yet sent to the bank.

draft-payments:readdraft-payments:write
MethodPathSummary
GET…/draft-paymentsList draft payments in the workspace
POST…/draft-paymentsCreate a single draft payment
GET…/draft-payments/{draftPaymentId}/draft-transfersList transfers belonging to a draft payment
GET…/draft-payments/searchSearch draft payments by attributes

Paths start with /workspaces/{workspaceId}. GET endpoints need draft-payments:read, the others draft-payments:write.

The DraftPayment object

firestoreIdstringrequired

ID of the draft payment.

messageIdstringrequired
endToEndIdsstring[]required
transferIdsstring[]required
workspaceIdstringrequired

ID of the workspace.

bankAccountIdstringrequired

ID of the bank account.

counterpartyIdsstring[]required
Show all 14 fields
transferCounterpartyIdsRecord<string, string>required
creationobjectrequired

When and by whom the resource was created.

Show 2 child fields
creationDateTimestringdate-timerequired

Date and time when the resource was created.

createdBystring

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

invoiceIdsstring[]
instructionobjectrequired
Show 7 child fields
executionDatestring
paymentMethodstring
paymentInformationIdstring
debtorNamestring
debtorIbanstring
debtorCurrencystring
debtorBicstring
submissionStatusobject
Show 2 child fields
statusstring
creationDateTimestring
instructionStatusobject
Show 1 child field
statusstring
relationshipsobjectrequired
Show 1 child field
firstTransfersDraftPaymentTransfer[]required
Show 8 child fields
firestoreIdstringrequired

ID of the draft payment transfer.

workspaceIdstringrequired

ID of the workspace.

draftPaymentIdstringrequired

ID of the draft payment.

bankAccountIdstringrequired

ID of the bank account.

counterpartyIdstringrequired

ID of the counterparty.

transferCreditTransferrequired
Show 8 child fields
instructionIdstring
endToEndIdstringrequired
amountnumber
currencystring
creditorNamestring
creditorIbanstring
communicationstring
structuredReferencestring
transferStatusobject
Show 2 child fields
statusstring
acceptanceDateTimestring
relationshipsobjectrequired
Show 1 child field
counterpartyCounterpartyrequired
The DraftPayment object
{
  "firestoreId": "dpay_RFAtMjAyNjAzMDI",
  "messageId": "string",
  "endToEndIds": [
    "string"
  ],
  "transferIds": [
    "string"
  ],
  "workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
  "bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
  "counterpartyIds": [
    "string"
  ],
  "transferCounterpartyIds": {
    "key": "string"
  },
  "creation": {
    "creationDateTime": "2026-03-02T09:15:00.000Z",
    "createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
  },
  "invoiceIds": [
    "string"
  ],
  "instruction": {
    "executionDate": "string",
    "paymentMethod": "string",
    "paymentInformationId": "string",
    "debtorName": "string",
    "debtorIban": "string",
    "debtorCurrency": "string",
    "debtorBic": "string"
  },
  "submissionStatus": {
    "status": "string",
    "creationDateTime": "string"
  },
  "instructionStatus": {
    "status": "string"
  },
  "relationships": {
    "firstTransfers": [
      {
        "firestoreId": "dtrans_RFQtMjAyNjAzMDI",
        "workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
        "draftPaymentId": "dpay_RFAtMjAyNjAzMDI",
        "bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
        "counterpartyId": "Cp2nG7vB4xLq9wRt5hMz",
        "transfer": {
          "instructionId": "string",
          "endToEndId": "string",
          "amount": 0,
          "currency": "string",
          "creditorName": "string",
          "creditorIban": "string",
          "communication": "string",
          "structuredReference": "string"
        },
        "transferStatus": {
          "status": "string",
          "acceptanceDateTime": "string"
        },
        "relationships": {
          "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"
          }
        }
      }
    ]
  }
}
GET/workspaces/{workspaceId}/draft-payments

List draft payments in the workspace

Scopedraft-payments:read

Path parameters

workspaceIdstringrequired

ID of the workspace.

Query parameters

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.

Default20

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.

Returns

200

List of items

dataDraftPayment[]required

Items of the page, in list order.

limitintegerrequired

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/draft-payments' \
  -H "Authorization: Bearer $SWAY_API_KEY"
{
  "data": [
    {
      "firestoreId": "dpay_RFAtMjAyNjAzMDI",
      "messageId": "string",
      "endToEndIds": [
        "string"
      ],
      "transferIds": [
        "string"
      ],
      "workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
      "bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
      "counterpartyIds": [
        "string"
      ],
      "transferCounterpartyIds": {
        "key": "string"
      },
      "creation": {
        "creationDateTime": "2026-03-02T09:15:00.000Z",
        "createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
      },
      "invoiceIds": [
        "string"
      ],
      "instruction": {
        "executionDate": "string",
        "paymentMethod": "string",
        "paymentInformationId": "string",
        "debtorName": "string",
        "debtorIban": "string",
        "debtorCurrency": "string",
        "debtorBic": "string"
      },
      "submissionStatus": {
        "status": "string",
        "creationDateTime": "string"
      },
      "instructionStatus": {
        "status": "string"
      },
      "relationships": {…}
    }
  ],
  "limit": 0,
  "nextCursor": "string"
}
POST/workspaces/{workspaceId}/draft-payments

Create a single draft payment

Scopedraft-payments: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

ISO 4217 currency code

counterpartyIdstringrequired

ID of the counterparty.

counterpartyCashAccountIdstringrequired
referencestring
communicationstringrequired
invoiceIdstring

ID of the invoice.

Returns

200

Successful response

dataDraftPaymentrequired
curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/draft-payments' \
  -H "Authorization: Bearer $SWAY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
  "executionDate": "2026-03-02",
  "amount": 0,
  "currency": "CHF",
  "counterpartyId": "Cp2nG7vB4xLq9wRt5hMz",
  "counterpartyCashAccountId": "string",
  "reference": "string",
  "communication": "string",
  "invoiceId": "Iv5zP2nK7wRt3xMq9bLd"
}'
{
  "data": {
    "firestoreId": "dpay_RFAtMjAyNjAzMDI",
    "messageId": "string",
    "endToEndIds": [
      "string"
    ],
    "transferIds": [
      "string"
    ],
    "workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
    "bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
    "counterpartyIds": [
      "string"
    ],
    "transferCounterpartyIds": {
      "key": "string"
    },
    "creation": {
      "creationDateTime": "2026-03-02T09:15:00.000Z",
      "createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
    },
    "invoiceIds": [
      "string"
    ],
    "instruction": {
      "executionDate": "string",
      "paymentMethod": "string",
      "paymentInformationId": "string",
      "debtorName": "string",
      "debtorIban": "string",
      "debtorCurrency": "string",
      "debtorBic": "string"
    },
    "submissionStatus": {
      "status": "string",
      "creationDateTime": "string"
    },
    "instructionStatus": {
      "status": "string"
    },
    "relationships": {…}
  }
}
GET/workspaces/{workspaceId}/draft-payments/{draftPaymentId}/draft-transfers

List transfers belonging to a draft payment

Scopedraft-payments:read

Path parameters

workspaceIdstringrequired

ID of the workspace.

draftPaymentIdstringrequired

ID of the draft payment.

Query parameters

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.

Default20

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.

Returns

200

List of items

dataDraftPaymentTransfer[]required

Items of the page, in list order.

Show 8 child fields
firestoreIdstringrequired

ID of the draft payment transfer.

workspaceIdstringrequired

ID of the workspace.

draftPaymentIdstringrequired

ID of the draft payment.

bankAccountIdstringrequired

ID of the bank account.

counterpartyIdstringrequired

ID of the counterparty.

transferCreditTransferrequired
Show 8 child fields
instructionIdstring
endToEndIdstringrequired
amountnumber
currencystring
creditorNamestring
creditorIbanstring
communicationstring
structuredReferencestring
transferStatusobject
Show 2 child fields
statusstring
acceptanceDateTimestring
relationshipsobjectrequired
Show 1 child field
counterpartyCounterpartyrequired
limitintegerrequired

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/draft-payments/dpay_RFAtMjAyNjAzMDI/draft-transfers' \
  -H "Authorization: Bearer $SWAY_API_KEY"
{
  "data": [
    {
      "firestoreId": "dtrans_RFQtMjAyNjAzMDI",
      "workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
      "draftPaymentId": "dpay_RFAtMjAyNjAzMDI",
      "bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
      "counterpartyId": "Cp2nG7vB4xLq9wRt5hMz",
      "transfer": {
        "instructionId": "string",
        "endToEndId": "string",
        "amount": 0,
        "currency": "string",
        "creditorName": "string",
        "creditorIban": "string",
        "communication": "string",
        "structuredReference": "string"
      },
      "transferStatus": {
        "status": "string",
        "acceptanceDateTime": "string"
      },
      "relationships": {
        "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"
        }
      }
    }
  ],
  "limit": 0,
  "nextCursor": "string"
}

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.