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

# Setup Guide

> Set up your environment, obtain credentials, and choose an integration method.

This guide walks through two steps: getting your credentials, then choosing how to integrate.

<Steps>
  <Step title="Obtain Your API Credentials">
    To begin integrating with CommercePay, you must first obtain your production or sandbox credentials. These are issued by the CommercePay Business Team.

    #### How to Request Credentials

    Please contact your dedicated Account Manager or reach out to our Business Development Team at [payments@commmerce.asia](mailto:payments@commmerce.asia) to initiate the onboarding process. Once approved, you will receive a secure package containing the following:

    | Parameter   | Description                                                                                                |
    | ----------- | ---------------------------------------------------------------------------------------------------------- |
    | Merchant Id | Your unique Merchant ID assigned by CommercePay use for Abp-TenantId header.                               |
    | Username    | The API-specific username used for authentication.                                                         |
    | Password    | The secure password associated with your API username.                                                     |
    | Secret Key  | A unique string used for generating request signatures and verifying webhooks. Keep this key confidential. |

    <Warning>
      **Security Best Practice:** **NEVER hardcode** your Secret Key or Password in client-side code (JavaScript). **Always** store these credentials securely in your server-side environment variables or a dedicated key vault.
    </Warning>
  </Step>

  <Step title="Explore Integration Methods">
    CommercePay offers multiple integration paths to suit different business needs, from low-code hosted solutions to fully customizable API integrations.

    <CardGroup cols={2}>
      <Card title="Hosted Payment Page" icon="arrow-up-right-from-square" href="/docs/hosted-session-checkout">
        The fastest way to get started. When a customer is ready to pay, you redirect them to a secure page hosted by CommercePay.

        * **Best for:** Small to medium businesses wanting to minimize PCI compliance requirements.
        * **Pros:** Requires minimal coding; CommercePay handles all security and UI updates.
        * **Flow:** Your Server → Redirect to CommercePay → Payment Completion → Return to your Site.
      </Card>

      <Card title="Direct API Integration" icon="code" href="/docs/direct-integration">
        For merchants who want to maintain a seamless brand experience by keeping the customer on their own website during the checkout process.

        * **Best for:** Larger platforms with specific UI/UX requirements.
        * **Pros:** Complete control over the checkout flow and customer journey.
        * **Flow:** Customer stays on your site → Your Server calls CommercePay API → Transaction processed in background.
      </Card>
    </CardGroup>

    <Tip>
      **Next Step:** Once you have chosen your method, proceed to [Authentication & Security](/docs/generate-signature) to learn how to sign your first request.
    </Tip>
  </Step>
</Steps>
