Swan API Reference

website·Indexed 35 days ago

https://api-reference.swan.io

GraphQL API documentation for Swan, featuring endpoints for managing users, accounts, cards, payment mandates, and webhook subscriptions. Includes detailed specifications for scalars such as BIC, SEPA identifiers, and phone numbers, as well as payload definitions for account membership and funding limit settings.

Tokens
166.6K
Snippets
902
Records
1.5K
Agent score
53%

What's inside Swan

  1. PaymentMandate field definitions

    The PaymentMandate interface includes the following fields:

    • id: Unique identifier of the Payment Mandate.
    • name: A custom name assigned to the mandate.
    • accountHolder: Information about the account holder associated with the mandate.
    • createdAt: The date and time the mandate was created.
    • updatedAt: The date and time of the last update to the mandate.
    • executedAt: The date and time of the last transaction executed under this mandate.
    • expiredAt: The date the mandate expires.
    • statusInfo: Detailed status information via the PaymentMandateStatusInfo interface.
  2. Transaction interface reference

    The Transaction interface represents a financial transaction within the Swan API. It provides details about the amount, status, counterparty, and associated payment methods. It is returned by the transaction query.
    interface Transaction {
      id: ID!
      supportingDocumentCollections(
        first: Int! = 50
        before: String
        after: String
        filters: SupportingDocumentCollectionFilterInput
      ): SupportingDocumentCollectionConnection!
      reference: String!
      paymentMethodIdentifier: String!
      side: TransactionSide!
      type: TransactionTypeEnum!
      amount: Amount!
      label: String!
      statusInfo: TransactionStatusInfo!
      paymentId: String
      payment: Payment
      createdAt: DateTime!
      updatedAt: DateTime!
      counterparty: String!
      bookedBalanceAfter: Amount @deprecated
      paymentProduct: PaymentProduct!
      account: Account
      externalReference: String
      executionDate: DateTime!
      requestedExecutionAt: DateTime
      originTransactionId: String
      originTransaction: Transaction
      statementCanBeGenerated: Boolean
      projectId: ID!
      isCancelable: Boolean!
    }
  3. Use RelatedCompanyInput to define a related company

    The RelatedCompanyInput object is used to provide information about a company related to the account holder company, such as a company legal representative. It is a member of CompanyInfoInput, CompanyInfoUpdateInput, and CreateCapitalDepositCompanyInfoInput.
    input RelatedCompanyInput {
      entityName: String
      registrationNumber: String
      registrationCountry: CCA3
      roles: [String!]!
    }
  4. Use the OnboardingStatusInfo interface to check onboarding status

    The OnboardingStatusInfo interface provides details about whether an onboarding process is valid, invalid, or finalized. A critical constraint is that onboarding can only be finalized if the status field is set to "valid".
    interface OnboardingStatusInfo {
      status: OnboardingStatus!
      validationVersion: OnboardingValidationVersion!
    }
  5. Use OnboardCompanyShareholderInput to provide shareholder details

    The OnboardCompanyShareholderInput object is used to specify information about a company shareholder. It is a required input for the CreateCapitalDepositCaseInput operation.
    input OnboardCompanyShareholderInput {
      capitalDepositAmount: AmountInput!
      name: String!
      onboardingInfo: OnboardCompanyAccountHolderInput!
    }
  6. Define ultimate beneficial owner information using RelatedIndividualUltimateBeneficialOwnerInput

    The RelatedIndividualUltimateBeneficialOwnerInput object is used to provide specific details about an individual acting as an ultimate beneficial owner. It is a member of the RelatedIndividualInput input object.

    Key constraints and logic:

    • qualificationType: Required. Determines the UBO's role. If multiple types apply, the priority order is: Ownership → Control → Legal Representative.
    • ownership: Only applicable and should be provided if qualificationType is set to Ownership.
    • controlTypes: A list of control types. Only applicable and should be provided if qualificationType is set to Control.
    • identityDocumentInfo: Used to provide the UBO's identity document details.
    input RelatedIndividualUltimateBeneficialOwnerInput {
      qualificationType: UltimateBeneficialOwnerQualificationType!
      ownership: UltimateBeneficialOwnerOwnershipInput
      controlTypes: [UltimateBeneficialOwnerControlType!]
      identityDocumentInfo: UltimateBeneficialOwnerIdentityDocumentInfoInput
    }
  7. Define inputs for adding a SEPA Direct Debit payment mandate

    The AddSepaDirectDebitPaymentMandateInput object is used to provide the necessary details when creating a SEPA Direct Debit CORE or B2B payment mandate via the addSepaDirectDebitPaymentMandate mutation. It includes details about the payment method, the mandate's recurrence, the debtor's information, and document preferences.
    input AddSepaDirectDebitPaymentMandateInput {
      paymentMethodId: ID!
      sequence: DirectDebitSequence!
      reference: String
      language: MandateLanguage!
      signatureDate: Date!
      debtor: SepaPaymentMandateDebtorInput!
      name: String
    }
  8. Query a single webhook event log by ID

    Use the webhookEventLog query to retrieve a specific WebhookEventLog object. This object provides details about the response and call context for webhook endpoints associated with a specific event. The query requires a non-null id of type ID!.
    webhookEventLog(
      id: ID!
    ): WebhookEventLog
  9. Define legal representative roles using RelatedIndividualLegalRepresentativeInput

    The RelatedIndividualLegalRepresentativeInput object is used to provide specific information about a legal representative for a related individual. It contains a roles field, which is a list of strings describing the roles the representative holds within the company. Each role string is limited to a maximum of 100 characters.
    input RelatedIndividualLegalRepresentativeInput {
      roles: [String!]
    }
  10. Query a specific webhook subscription by ID

    Use the webhookSubscription query to retrieve details about a specific webhook subscription. This object describes the registration of a callback URL (the endpoint) and the list of event types the client has requested to be notified of.
    query GetWebhookSubscription {
      webhookSubscription(id: "YOUR_SUBSCRIPTION_ID") {
        # Return fields from the WebhookSubscription object
      }
    }
  11. Use IndividualUltimateBeneficialOwnerInput for UBO data

    The IndividualUltimateBeneficialOwnerInput object is used to provide details about an individual Ultimate Beneficial Owner (UBO) during company onboarding or updates. It captures personal identity, birth details, ownership type, and residency information.
    input IndividualUltimateBeneficialOwnerInput {
      firstName: String
      lastName: String
      gender: Gender
      birthDate: String
      birthCity: String
      birthCityPostalCode: String
      birthCountryCode: CCA3
      indirect: Boolean
      direct: Boolean
      totalCapitalPercentage: Float
      type: IndividualUltimateBeneficialOwnerTypeEnum
      taxIdentificationNumber: String
      residencyAddress: ResidencyAddressInput
      identityDocumentDetails: UBOIdentityDocumentDetailsInput
    }
  12. Use the FundingLimitSettingsStatusInfo interface

    The FundingLimitSettingsStatusInfo interface is an object used to provide details about the current status of funding limit settings. It is a member of the FundingLimitSettings object and is implemented by DisabledFundingLimitSettingsStatusInfo, EnabledFundingLimitSettingsStatusInfo, and SuspendedFundingLimitSettingsStatusInfo.
    interface FundingLimitSettingsStatusInfo {
      status: FundingLimitSettingsStatus!
    }