Skip to main content

Initiate a funding request

Initiate a funding request with the API.

Prerequisites
  1. The payment mandate from the Swan account holder or eligible account member who is funding their account is Enabled.
  2. Call the mutation with a user access token associated with the account holder or eligible account member.

Please note that the funding source status can be Enabled even if the account verification status is PendingVerification. Review the interaction between statuses for more information.

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. Consent is 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 {
id
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": {
"id": "$TRANSACTION_ID",
"statusInfo": {
"status": "Initiated",
"__typename": "PaymentInitiated"
}
}
}
}
}