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

# BNPL Flow

How Green Banana Group's bnplx.io platform connects merchants with BNPL providers to deliver seamless payment experiences.

<img height="400" noZoom src="https://mintcdn.com/greenbanana-4b97dd41/8fX3vz3MExOVX8kh/logo/flow.png?fit=max&auto=format&n=8fX3vz3MExOVX8kh&q=85&s=84323656509972c66084f00eff4d9b67" data-path="logo/flow.png" />

## How BNPL Flow Works

1. **Merchant Initiates Payment**
   <p>Merchant calls our bnplx.io API with payment details. We process and store the payment information, then build the appropriate request body for the selected BNPL provider.</p>

2. **BNPL Provider Processing**
   <p>We call the BNPL provider with the formatted request. The provider evaluates customer creditworthiness and processes the payment.</p>

3. **Customer Action Handling**
   <p>If the payment requires customer action (requires\_customer\_action state), the customer is redirected to the BNPL provider's page to complete additional information or verification steps.</p>

4. **Payment State Management**
   <p>Based on customer actions and provider evaluation, the payment either succeeds and moves to requires\_capture state, or fails.</p>

5. **Merchant Capture**
   <p>When payment is in requires\_capture state, the merchant can capture the payment anytime through our API, which in turn captures with the BNPL provider.</p>

### Detailed Flow Sequence

```mermaid theme={"system"}
sequenceDiagram
    participant M as Merchant
    participant B as bnplx.io
    participant BNPL as BNPL Provider
    participant C as Customer
 
    Note over M,B: Phase 1: Payment Initiation
    M->>+B: Create Payment Request
    Note over B: Process & store payment data<br/>Build provider request body
    B->>+BNPL: Send Payment to Provider
    Note over BNPL: Evaluate customer<br/>creditworthiness
    Note over M,BNPL: Phase 2: Provider Processing
    alt Payment requires customer action
        BNPL-->>B: Return: requires_customer_action
        B-->>M: Payment Status Update
        deactivate B
        Note over M,C: Phase 3: Customer Action Required
        M->>C: Redirect to Provider Page
        C->>+BNPL: Complete Required Actions
        Note over BNPL: Process customer input<br/>(identity verification,<br/>additional info, etc.)
        BNPL->>BNPL: Evaluate customer actions
    else Payment approved immediately
        BNPL-->>B: Return: requires_capture
        B-->>M: Payment Status Update
    end
    Note over M,BNPL: Phase 4: Payment Resolution
    alt Customer actions successful
        BNPL->>B: Payment approved - requires_capture
        B->>M: Status: requires_capture
    else Customer actions failed
        BNPL->>B: Payment failed
        B->>M: Status: failed
    end
    Note over M,BNPL: Phase 5: Payment Capture
    M->>+B: Capture Payment (when ready to fulfill)
    B->>+BNPL: Capture with Provider
    BNPL-->>-B: Capture Confirmation
    B-->>-M: Payment Captured Successfully
    Note over M: Order can now be fulfilled
```

## Payment States in Our Platform

| State                          | Description                                                                 |   |
| ------------------------------ | --------------------------------------------------------------------------- | - |
| Succeeded                      | payment has succeeded                                                       |   |
| Failed                         | payment has failed                                                          |   |
| Cancelled                      | payment has been cancelled                                                  |   |
| Processing                     | payment is still being processed                                            |   |
| RequiresCustomerAction         | payment is waiting on some action from the customer                         |   |
| RequiresMerchantAction         | payment is waiting on some action from the merchant                         |   |
| RequiresPaymentMethod          | payment is waiting to be confirmed with the payment method by the customer  |   |
| RequiresConfirmation           | payment has to be confirmed                                                 |   |
| RequiresCapture                | payment has been authorized, waiting to be captured                         |   |
| PartiallyCaptured              | payment has been captured partially and remaining amount cannot be captured |   |
| PartiallyCapturedAndCapturable | payment has been captured partially and the remaining amount is capturable  |   |

## Why Choose Green Banana Group

**For Your Customers:**

* Access to multiple BNPL providers through one integration
* Intelligent routing to providers most likely to approve
* Consistent experience across all providers

**For Your Business:**

* Single API for all BNPL providers
* Smart provider selection increases approval rates
* We handle provider relationships and compliance

## Our Platform Advantages

* Smart Routing - We direct payments to the best provider for each customer
* Provider Agnostic - Access multiple BNPL networks through one integration
* Unified Dashboard - Manage all providers from our single interface
* Expert Support - Our team helps optimize your BNPL strategy
