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

# Introduction

> Prerequisites, environments, and base URLs for integrating with DollarPe.

This section covers the essentials for building and testing with DollarPe: obtaining credentials, choosing an environment, setting up authentication, and configuring webhooks.

## Prerequisites

<Steps>
  <Step title="Obtain API credentials">
    Contact our [support team](mailto:support@dollarpe.xyz) to receive your **API Key** and **API Secret**. These are unique to your organization and required for all API calls.
  </Step>

  <Step title="Choose your environment">
    Use **Sandbox** for all development and testing — no real funds are involved. Move to **Production** only after validating your integration end-to-end.
  </Step>

  <Step title="Set up authentication">
    All requests require three signed headers. See the [Authentication guide](/guides/development-and-testing/authentication) for how to generate them.
  </Step>

  <Step title="Configure webhooks">
    Set up a publicly accessible HTTPS endpoint to receive real-time event notifications. See the [Webhooks guide](/guides/development-and-testing/webhooks).
  </Step>
</Steps>

## Environments

<Tabs>
  <Tab title="Sandbox">
    Use sandbox for all development and testing. No real funds are involved.

    | Service      | Base URL                                     |
    | ------------ | -------------------------------------------- |
    | Customer API | `https://sandbox.dollarpe.xyz/cms/api/v1`    |
    | Payout API   | `https://sandbox.dollarpe.xyz/pos/api/v1`    |
    | Payin API    | `https://sandbox.dollarpe.xyz/pis/api/v1`    |
    | Webhook API  | `https://sandbox.dollarpe.xyz/org/api/v1`    |
    | Widget API   | `https://sandbox.dollarpe.xyz/widget/api/v1` |
  </Tab>

  <Tab title="Production">
    Use production only after completing full sandbox validation.

    | Service      | Base URL                                        |
    | ------------ | ----------------------------------------------- |
    | Customer API | `https://production.dollarpe.xyz/cms/api/v1`    |
    | Payout API   | `https://production.dollarpe.xyz/pos/api/v1`    |
    | Payin API    | `https://production.dollarpe.xyz/pis/api/v1`    |
    | Webhook API  | `https://production.dollarpe.xyz/org/api/v1`    |
    | Widget API   | `https://production.dollarpe.xyz/widget/api/v1` |
  </Tab>
</Tabs>

<Warning>
  Sandbox and Production credentials are separate and cannot be used interchangeably.
</Warning>

## Testing in sandbox

All three integration paths work in sandbox:

| Integration path       | How to test                                                                                             |
| ---------------------- | ------------------------------------------------------------------------------------------------------- |
| **API Integration**    | Use sandbox base URLs and credentials. Use mock status endpoints to simulate transaction state changes. |
| **Widget Integration** | Call the Widget Initialize API with sandbox credentials. The widget loads against sandbox data.         |
| **Client Dashboard**   | Open `https://app.dollarpe.xyz?app_id={sandbox_app_id}` using your sandbox `app_id`.                    |

See the [Sandbox testing guide](/guides/development-and-testing/sandbox-testing) for step-by-step flows.

## Response format

All API responses follow this structure:

<Tabs>
  <Tab title="Success">
    ```json theme={null}
    {
      "status": true,
      "message": "Success",
      "data": {}
    }
    ```
  </Tab>

  <Tab title="Error">
    ```json theme={null}
    {
      "status": false,
      "message": "Bad Request",
      "data": null,
      "err_code": "INPUT_MALFORMED",
      "errors": {
        "field_name": ["Error message"]
      }
    }
    ```
  </Tab>
</Tabs>
