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

# Environments

Two environments. One smooth journey from testing to live transactions.

GreenBanana APIs for Checkout provide a simple and consistent interface for integrating Buy Now, Pay Later functionality into your application. Below you’ll find the Base URLs you’ll target in each environment, followed by the core Payments endpoints and their purposes.

## Base URLs

The Base URLs gives you a list of the root addresses you’ll use to send all API requests.
Choose the **Sandbox** URL when developing and testing your integration, and switch to
the **Production** URL when you’re ready to go live.

| Environment | API URL                        | Dashboard Url                  |
| ----------- | ------------------------------ | ------------------------------ |
| Sandbox     | `https://api.staging.bnplx.io` | `https://app.staging.bnplx.io` |
| Production  | `https://api.bnplx.io`         | `https://app.bnplx.io`         |

***

## Sandbox

Your playground. Build, break, and perfect your integration here without any real-world consequences — it's all fake money anyway.

**What you get:**

* Test all API endpoints and webhooks
* Simulate various transaction scenarios
* Validate your integration logic
* Train your team on the platform
* Perform load testing (within reasonable limits)
* Test error handling and edge cases

***

## Production

The production environment is where real business happens.
This is your live environment handling actual customer transactions and real money movements.

**What Happens Here**

* Real customer transactions are processed
* Live business analytics and reporting
* Full compliance and security monitoring
* Production-level support and monitoring
* Real-time webhook notifications

***

**Your Launch Path**

* Sandbox → Test everything
* Validate → Make sure it works
* Production → Flip the switch
* Profit → Watch the money flow

***

## Payments Endpoints

Everything you need to handle the complete payment lifecycle. Each endpoint accepts JSON requests and returns structured responses.

1. Create Payment: Start a new payment request. Include order details, customer info, and payment preferences.<br />
   ` POST {{url}} /payments`<br />

2. Confirm Payment: Confirm payment after customer authentication. This locks in the payment method and terms.<br />
   POST /payments/{payment_id}/confirm<br />

3. Capture Payment: Capture authorized funds and settle the transaction. Money moves from customer to merchant.<br />
   `POST {{url}}/payments/{payment_id}`/capture<br />

4. Cancel Payment: Cancel payment before capture. No money changes hands, customer is notified.<br />
   `POST {{url}}/payments/{payment_id}/cancel`<br />

5. Refund Payment: Return money to customer. Support both full and partial refunds with automatic reconciliation.<br />
   `POST {{url}}/payments/{payment_id}/refund`<br />

Update the URL based on the environment you're using.

## Payment Pattern

<img height="200" noZoom src="https://mintcdn.com/greenbanana-4b97dd41/BqylYXS9VxLU0wh9/logo/payment_flow.svg?fit=max&auto=format&n=BqylYXS9VxLU0wh9&q=85&s=009083e0a9797c16c3583ab0e21ab10c" data-path="logo/payment_flow.svg" />

Each endpoint returns clear success/error responses with detailed status codes and messages.

Ready to start? Check out our [Account Setup](/first-steps/account-setup).
