Skip to main content

Initiate a funding request

Initiate a funding request with the API.

Prerequisites

An Enabled payment mandate from the Swan account holder who is funding their account.

The account verification status doesn't impact SEPA Direct Debit B2B account funding. The funding source status can be Enabled even if the account verification status is PendingVerification.

Guide​

  1. Call the initiateFundingRequest mutation.
  2. Add your fundingSourceId and consentRedirectUrl.
  3. Add the amount to send the account, and its currency.
  4. Optionally, add a label, reference, and anything other information you'd like.
  5. Add the InitiateFundingRequestSuccessPayload success payload.
  6. Add rejections (not shown).
Consent

No consent is required to initiate the funding request. The consent was already provided through the payment mandate.

Mutation​

🔎 Open the mutation in API Explorer

mutation InitiateRequest {
initiateFundingRequest(
input: {
fundingSourceId: "$YOUR_FUNDING_SOURCE_ID"
consentRedirectUrl: "$YOUR_REDIRECT_URL"
amount: { value: "100", currency: "EUR" }
}
) {
... on InitiateFundingRequestSuccessPayload {
__typename
payment {
statusInfo {
status
... on PaymentInitiated {
__typename
status
}
}
}
}
}
}

Payload​

The payload shows the account funding payment status Initiated.

On your transaction history, you'll see a SEPA Direct Debit transaction with the status Upcoming.

{
"data": {
"initiateFundingRequest": {
"__typename": "InitiateFundingRequestSuccessPayload",
"payment": {
"statusInfo": {
"status": "Initiated",
"__typename": "PaymentInitiated"
}
}
}
}
}