# Integration Steps

## Adding PayPangea SDK

First, include the PayPangea SDK in your HTML file's `<head>` section. This is crucial for accessing the PayPangea functions in your application.

```html
<script src="https://sdk.paypangea.com/sdk.js?ver=4"></script>
```

## **Environment Setup**

Decide whether you will be testing your integration in a development environment or deploying it directly to production. PayPangea supports both environments, allowing you to test your integration thoroughly before going live.

#### Evironments

| Value      | Descripton                         |
| ---------- | ---------------------------------- |
| STAGING    | `Staging environment of PayPangea` |
| PRODUCTION | `Live environment of PayPangea`    |

## Initializing PayPangea

Once the SDK is loaded, you can initialize PayPangea in your JavaScript code. This step involves creating a new `PayPangea` instance with your API key and specifying the environment.

```javascript
let payPangeaWidget;

document.addEventListener('DOMContentLoaded', function () {
    payPangeaWidget = new PayPangea({
        apiKey: 'YOUR_API_KEY_HERE',
        environment: 'ENVIRONMENT',
    });
});
```

Replace `'YOUR_API_KEY_HERE'` with your actual PayPangea API key.

Replace `'ENVIRONMENT'` with the environment you want to target.

## **Server Configuration**

If you plan to use webhooks or process transactions server-side, ensure your server is configured to receive HTTPS POST requests. This is crucial for handling callbacks and transaction notifications securely.
