Funding Source
A funding source is a bank account linked to a Swan account that allows you to pull money from it.
Here is the state diagram of a funding source:
.jpg?alt=media&token=414a3ecc-e9a2-4a43-b84a-b9dce35599a7)
State diagram funding source
There are 2 requirements to add a funding source to credit a Swan account:
- A Swan account in the
Enabled
status - A payment mandate must be generated, and linked to the concerned account holder
For now, we only offer the SEPA Direct Debit B2B schemes for funding source creation. It will be possible to fund a Swan account by card later.
Any account member with the
canManageAccountMembership
user rights can use the addDirectDebitFundingSource
mutation to create a direct debit funding source object. Please note that the external IBAN must belong to the same account holder as the one owning the Swan account to be credited. A funding source can not be used on a external IBAN that does not belongs to the account holder
Request
Response
mutation MyMutation {
addDirectDebitFundingSource(
input: {
scheme: SepaDirectDebitB2B
accountId: "{{YOUR_ACCOUNT_ID}}"
iban: "{{YOUR_IBAN}}"
consentRedirectUrl: "{{YOUR_REDIRECT_URL}}"
name: "{{YOUR_FUNDING_SOURCE_NAME}}"
}
) {
... on AddDirectDebitFundingSourceSuccessPayload {
__typename
fundingSource {
id
name
createdAt
... on DirectDebitFundingSource {
paymentMandate {
... on SEPAPaymentDirectDebitMandate {
statusInfo {
... on PaymentMandateConsentPendingStatusInfo {
__typename
consent {
consentUrl
}
}
}
mandateDocumentUrl
}
}
}
}
}
}
}
{
"data": {
"addDirectDebitFundingSource": {
"__typename": "AddDirectDebitFundingSourceSuccessPayload",
"fundingSource": {
"createdAt": "2022-07-04T09:10:23.472Z",
"id": "{{YOUR_FUNDING_SOURCE_ID}}",
"name": null,
"statusInfo": {
"status": "Pending"
},
"paymentMandate": {
"id": "{{YOUR_PAYMENT_MANDATE_ID}}",
"statusInfo": {
"status": "ConsentPending",
"__typename": "PaymentMandateConsentPendingStatusInfo",
"consent": {
"consentUrl": "{{YOUR_CONSENT_URL}}"
}
},
"mandateDocumentUrl": "{{YOUR_MANDATE_DOCUMENT_URL}}"
}
}
}
}
}
To be usable, a funding source must be in the
Enabled
status. To move to this status, there are some requirements needed depending on the funding source type.Funding source type | AccountVerification status is verified | PaymentMandate status is Enabled |
---|---|---|
SepaDirectDebitB2B | ❌ | ✅ |
To pull money from the external account onto the concerned Swan account, you must use the
initiateFundingRequest
mutation. To call this mutation, you need to use a User Access Token. Replace {{YOUR_FUNDING_SOURCE_ID}}
with the funding source ID which has been previously created. Request
Response
mutation MyMutation {
initiateFundingRequest(
input: {
fundingSourceId: "{{YOUR_FUNDING_SOURCE_ID}}"
amount: { value: "100", currency: "EUR" }
consentRedirectUrl: "{{YOUR_CONSENT_REDIRECT_URL}}"
}
) {
... on InitiateFundingRequestSuccessPayload {
__typename
payment {
statusInfo {
... on PaymentConsentPending {
__typename
consent {
consentUrl
}
}
}
}
}
}
}
{
"data": {
"initiateFundingRequest": {
"__typename": "InitiateFundingRequestSuccessPayload",
"payment": {
"statusInfo": {
"__typename": "PaymentConsentPending",
"consent": {
"consentUrl": "{{YOUR_CONSENT_URL}}"
}
}
}
}
}
}
If the
FundingSource
is in the Enabled
status, a transaction with the SepaDirectDebitIn
type is created in the Upcoming
status. Learn more about the Account Funding Funding LimitWhen initiating a funding request using an
Enabled
B2B funding source, no consent is required. The status of the payment will be Initiated
instead of Consent Pending
upon executing the initiateFundingRequest
mutationThe transaction is moved to the
Booked
status maximum 2 inter-bank business days following the funding request initiation, and the money might go into the balance.reserved
of the concerned account. Learn more about the Account Funding Rolling ReserveTo learn more about the different ways to fund a Swan account, please read :
It is possible to cancel SDD-In transaction (regular account funding, merchant acquiring) using the
cancelTransaction
API mutation in the Upcoming
status up to the point where the concerned transaction is included in an SDD-In XML file.Request
mutation MyMutation {
cancelTransaction(input: { transactionId: "{{YOUR_TRANSACTION_ID}}" }) {
... on CancelTransactionSuccessPayload {
__typename
message
}
... on ForbiddenRejection {
__typename
message
}
}
}
Once canceled, the concerned transaction is moved to the
Canceled
status and will never be sent to the debtor bank/never be added to an SDD-In XML file.
Cancel OK up to D-1 and 1 hour before Swan COT of settlement date:- Possibility to cancel an Upcoming SDD-In up to 1 hour before Swan’s COT for D+1 execution: You schedule a SDD-In B2B on the 29th of September for example, you’ll be able to cancel it using the
cancelTransaction
API mutation up to the 28th, 10:30AM (we might improve this by adding 30 minutes by mid-november - 10:30 FR time for B2B SDD-In
A funding source in the
Pending
or Enabled
status can be canceled by any account member with the canManageMemberships
user rights using the cancelFundingSource
mutation. The funding source is then moved to the Canceled
status and cannot be used anymore (a call to the initiateFundingRequest
mutation for example will return an error).Request
Response
mutation MyMutation {
cancelFundingSource(input: { id: "{{YOUR_ACCOUNT_ID}}" }) {
... on CancelFundingSourceSuccessPayload {
__typename
fundingSource {
createdAt
id
name
statusInfo {
... on CanceledFundingSourceStatusInfo {
enabledAt
}
status
}
}
}
}
}
{
"data": {
"cancelFundingSource": {
"__typename": "CancelFundingSourceSuccessPayload",
"fundingSource": {
"createdAt": "2022-07-04T09:10:23.472Z",
"id": "{{YOUR_FUNDING_SOURCE_ID}}",
"name": null,
"statusInfo": {
"enabledAt": {
"_tag": "None"
},
"status": "Canceled"
}
}
}
}
}
A funding source can be moved to the Suspended status by Swan in case of suspected fraud.
Last modified 13d ago