> ## 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.

# Overview

> Pay users for their flexible energy usage with Axle's payments portal

<img src="https://mintcdn.com/fascinating-teal-alpaca/qtjZjNSq83PwXxGM/images/payments/payments.png?fit=max&auto=format&n=qtjZjNSq83PwXxGM&q=85&s=10ab5032df62841f23d5d90821cdbb7c" alt="Screenshot of payments portal" width="636" height="664" data-path="images/payments/payments.png" />

We use [Stripe](https://stripe.com) as our payment provider, leveraging their [Global Payouts](https://docs.stripe.com/payouts/global-payouts) functionality.

We provide you with a page where your users can:

1. View their rewards balance
2. Link a UK bank account
3. Withdraw earned rewards to their bank

The URL for this page is generated via our API and secured with a JWT token.

**Availability**: UK only (GB bank accounts, GBP currency)

## Requirements

A user email is required to process payments through our provider, Stripe. We also send payment-failure notifications and, if enabled, two-factor authentication codes to this address.

The right place to supply the email depends on how you're integrated with us — check the integration guide for the product you're using (Smart Charging, Flex Lite, VPP, etc.) for the field to set when you create or onboard the user.

## High-level flow

```mermaid theme={null}
sequenceDiagram
    participant App as Partner App
    participant API as api.axle.energy
    participant Portal as payments.axle.energy
    participant Stripe

    App->>API: 1. Generate JWT URL
    API-->>App: Return secure URL
    App->>Portal: 2. Redirect user
    Portal->>Portal: 3. User views balance
    Portal->>Stripe: 4. Create & verify bank account
    Stripe-->>Portal: Confirmation of Payee result
    Portal->>Portal: 5. User requests withdrawal
    Portal->>Stripe: 6. Create outbound payment
    Stripe-->>API: 7. Webhook: payment posted
    Portal-->>App: 8. Redirect back to app
```

## Environments

| Environment | Payments Portal               | API                       | Use Case                |
| ----------- | ----------------------------- | ------------------------- | ----------------------- |
| Sandbox     | `payment-sandbox.axle.energy` | `api-sandbox.axle.energy` | Development and testing |
| Production  | `payments.axle.energy`        | `api.axle.energy`         | Live users              |

Use the Sandbox environment for all development and testing. When you're ready to go live, switch to Production.

## Security considerations

* JWT tokens expire after 60 minutes (payment failure emails use 48-hour tokens)
* Generating URLs requires an organisational bearer token
* Two-factor authentication can be enforced via the `enforce_two_factor_auth` parameter (email verification only) — it gates the bank-account linking flow, not balance or transaction-history views
* Bank account details are validated via Confirmation of Payee (CoP) before any withdrawal is processed
* A URL is valid for the full 60 minutes and can be reused within that window; there is no persistent session beyond the token. We recommend generating a fresh URL on each page entry to avoid presenting an already-expiring token to the user

## Support

For integration support, contact: [support@axle.energy](mailto:support@axle.energy)
