Add a trusted SEPA beneficiary
Add a trusted beneficiary for SEPA Credit Transfers with the API.
Add a trusted beneficiary​
- Call the
addSepaTrustedBeneficiary
mutation. - Add your
accountId
(line 4). The trusted beneficiary is linked to this account. - Add your SEPA beneficiary's name and IBAN (lines 5-6).
- Add the
AddTrustedSepaBeneficiarySuccessPayload
success payload. Consider adding thetrustedBeneficiary
>id
to the payload (lines 12-13). - 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​
- Call the
initiateCreditTransfers
mutation. - Add the
amount
andconsentRedirectUrl
. - Add your
accountId
. The trusted beneficiary is linked to this account. - Add your SEPA beneficiary's name and IBAN (lines 7-8).
- Choose
true
for the booleansave
(line 10). - Add the success payload.
- 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"
}
}
}
}