> ## Documentation Index
> Fetch the complete documentation index at: https://docs.axle.energy/llms.txt
> Use this file to discover all available pages before exploring further.

# Advanced Topics

> Two-factor authentication, custom email sender, optional portal behaviour and testing

## Two-factor authentication

When `enforce_two_factor_auth` is enabled, users must verify their email address before they can link a bank account via Stripe. We send a verification code to the user's registered email, and they enter it to continue.

You can set two-factor authentication for your organisation as a whole. When you leave `enforce_two_factor_auth` out of the request, the organisation setting applies. When you send `true` or `false`, that value overrides the organisation setting for that URL. To change your organisation setting, reach out to your Axle representative.

**Supported verification methods**: email only. See [User email](https://docs.axle.energy/workflows/payments/integration.md#user-email) for how to supply it.

## Custom email sender

We send payment emails, such as two-factor authentication codes and payment failure notices, from an Axle address by default. We can send them from an address on your domain or a subdomain instead.

1. We give you two DNS records: a DKIM TXT record and a return-path CNAME record.
2. Whoever manages your DNS adds them.
3. We verify the records and send a test email.
4. Once the test email arrives, we switch your payment emails to the new address.

You don't need to add an SPF record. To get started, reach out to your Axle representative.

## Optional portal behaviour

### Hide transactions

Set `hide_transactions` to `true` to hide the transaction history in the portal. This helps when:

1. **You want a one-off payment flow**: users withdraw and return, without browsing their full history.
2. **You already show transaction history in your app**: users don't see the same information twice.

### Skip straight to bank account setup

When `auto_redirect_to_setup` is `true`:

* If the user has no bank account linked, they skip the balance page and go straight into bank account setup.
* If the user already has a bank account, they see the normal balance page.

This suits onboarding flows where you want users to set up their payment method without distraction.

## Testing before launch

Axle's payment system handles thousands of transactions a day and is tried and tested across our clients. If you'd like to test it before launch, we can set this up in our Sandbox environment. Speak to your Axle representative to arrange it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.