Skip to main content

Get information about a funding source and request

You can get information about funding sources and requests with the API.

Get information about a source​

  1. Call the fundingSource query.
  2. Add your funding source ID.
  3. Add all the information you'd like to review.

Query​

🔎 Open the query in API Explorer

query GetSourceInfo {
fundingSource(id: "$YOUR_FUNDING_SOURCE_ID") {
... on DirectDebitFundingSource {
id
name
iban
createdAt
paymentMandate {
... on SEPAPaymentDirectDebitMandate {
id
name
transactions {
edges {
node {
label
id
}
}
}
}
}
}
}
}

Payload​

The payload shows that the user used their funding source to perform two transactions.

{
"data": {
"fundingSource": {
"id": "$YOUR_SOURCE_ID",
"name": "Your Funding Source Name",
"iban": "$YOUR_NON_SWAN_IBAN",
"createdAt": "2024-01-22T18:10:26.271Z",
"paymentMandate": {
"id": "$YOUR_MANDATE_ID",
"name": "Your Mandate Name",
"transactions": {
"edges": [
{
"node": {
"label": "Transaction 1",
"id": "$YOUR_TRANSACTION_ID_1"
}
},
{
"node": {
"label": "Transaction 2",
"id": "$YOUR_TRANSACTION_ID_2"
}
}
]
}
}
}
}
}

Get a list of sources​

  1. Call the account query.
  2. Add your account ID.
  3. Add fundingSources, then add the DirectDebitFundingSource and SEPAPaymentDirectDebitMandate unions.

Query​

🔎 Open the query in API Explorer

query GetSourceList {
account(accountId: "$YOUR_ACCOUNT_ID") {
fundingSources {
edges {
node {
... on DirectDebitFundingSource {
id
name
iban
paymentMandate {
... on SEPAPaymentDirectDebitMandate {
id
name
}
}
}
}
}
}
}
}

Payload​

The payload provides the list of funding sources for your account.

{
"data": {
"account": {
"fundingSources": {
"edges": [
{
"node": {
"id": "$YOUR_SOURCE_ID_1",
"name": "Your Funding Source Name 1",
"iban": "$YOUR_NON_SWAN_IBAN_1",
"paymentMandate": {
"id": "$YOUR_MANDATE_ID_1",
"name": "Your Mandate Name 1"
}
},
"node": {
"id": "$YOUR_SOURCE_ID_2",
"name": "Your Funding Source Name 2",
"iban": "$YOUR_NON_SWAN_IBAN_2",
"paymentMandate": {
"id": "$YOUR_MANDATE_ID_2",
"name": "Your Mandate Name 2"
}
}
}
]
}
}
}
}