GoCardless Transferred Mandates API.
When a UK customer switches their bank account (via the Current Account Switch Service), their mandate is automatically transferred to the new account.
Use this endpoint to retrieve the new encrypted bank account details after a mandate transfer event is received via webhook.
Example
# Handle a mandate.transferred webhook event:
def handle_event(%{"resource_type" => "mandates", "action" => "transferred"} = event) do
mandate_id = event["links"]["mandate"]
{:ok, transfer} = GoCardlessClient.Resources.TransferredMandates.get(
client,
mandate_id
)
# Decrypt transfer["encrypted_customer_bank_details"] using
# transfer["encrypted_decryption_key"] and your RSA private key.
end
Summary
Functions
Retrieves the updated (encrypted) bank account details for a transferred mandate.
Functions
@spec get(GoCardlessClient.Client.t(), String.t(), keyword()) :: {:ok, map()} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Retrieves the updated (encrypted) bank account details for a transferred mandate.
Returns:
encrypted_customer_bank_details— AES-encrypted bank detailsencrypted_decryption_key— RSA-encrypted AES key (decrypt with your private key)public_key_id— ID of the public key used for encryption