Initiate a funding request
Initiate a funding request with the API.
Prerequisites
- The payment mandate from the Swan account holder or eligible account member who is funding their account is
Enabled. - 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​
- Call the
initiateFundingRequestmutation. - Add your
fundingSourceIdandconsentRedirectUrl. - Add the
amountto send the account, and itscurrency. - Optionally, add a
label,reference, and any other information you'd like. - Add the
InitiateFundingRequestSuccessPayloadsuccess payload. - 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"
}
}
}
}
}