Skip to main content

Add a trusted SEPA beneficiary

Add a trusted beneficiary for SEPA Credit Transfers with the API.

Add a trusted beneficiary​

  1. Call the addSepaTrustedBeneficiary mutation.
  2. Add your accountId (line 4). The trusted beneficiary is linked to this account.
  3. Add your SEPA beneficiary's name and IBAN (lines 5-6).
  4. Add the AddTrustedSepaBeneficiarySuccessPayload success payload. Consider adding the trustedBeneficiary > id to the payload (lines 12-13).
  5. Add rejections (not shown).

Mutation​

🔎 Open the mutation in API Explorer

mutation AddBeneficiary {
addTrustedSepaBeneficiary(
input: {
accountId: "$ACCOUNT_ID"
iban: "$TRUSTED_BENEFICIARY_IBAN"
name: "$TRUSTED_BENEFICIARY_NAME"
consentRedirectUrl: "$REDIRECT_URL"
}
) {
... on AddTrustedSepaBeneficiarySuccessPayload {
__typename
trustedBeneficiary {
id
}
}
}
}

Payload​

Notice your new trusted beneficiary's ID is returned in the success payload (line 6).

{
"data": {
"addTrustedSepaBeneficiary": {
"__typename": "AddTrustedSepaBeneficiarySuccessPayload",
"trustedBeneficiary": {
"id": "$TRUSTED_BENEFICIARY_ID"
}
}
}
}

Save a beneficiary when initiating a transfer​

  1. Call the initiateCreditTransfers mutation.
  2. Add the amount and consentRedirectUrl.
  3. Add your accountId. The trusted beneficiary is linked to this account.
  4. Add your SEPA beneficiary's name and IBAN (lines 7-8).
  5. Choose true for the boolean save (line 10).
  6. Add the success payload.
  7. Add rejections (not shown).

Mutation​

🔎 Open the mutation in API Explorer

mutation SaveBeneficiary {
initiateCreditTransfers(
input: {
creditTransfers: {
amount: { value: "200", currency: "EUR" }
sepaBeneficiary: {
iban: "$TRUSTED_BENEFICIARY_IBAN"
name: "$TRUSTED_BENEFICIARY_NAME"
isMyOwnIban: false
save: true
}
}
consentRedirectUrl: "$REDIRECT_URL"
accountId: "$ACCOUNT_ID"
}
) {
... on InitiateCreditTransfersSuccessPayload {
__typename
payment {
id
}
}
}
}

Payload​

The payload is a typical initiation payload. There's no additional information available about the new trusted beneficiary.

{
"data": {
"initiateCreditTransfers": {
"__typename": "InitiateCreditTransfersSuccessPayload",
"payment": {
"id": "$PAYMENT_ID"
}
}
}
}