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

# Quickstart Guide

To get started with Modem Pay, follow these simple steps to set up and start collecting payments:

### 1. **Create an Account**

* **Sign Up**: Register on [Modem Pay's dashboard](https://merchant.modempay.com) to access your account and manage payments.
  <iframe width="100%" height="425" src="https://www.youtube.com/embed/xY_ysj40diU?si=5_BdUUsXZmfnIUQu" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen />
* **API Keys**: Once registered, get your API keys from the dashboard for integrating and authenticating requests.

### 2. **Configure Integrations**

* **SDK Payment Intent**: For more control, use Modem Pay’s SDK to create and confirm payment intents programmatically.

<CodeGroup>
  ```javascript nodejs theme={null}
  import ModemPay from "modem-pay";

  const modempay = new ModemPay("YOUR_MODEM_PAY_API_KEY");

  const intent = await modempay.paymentIntents.create({ amount: 450 });

  console.log(intent.data.payment_link);
  ```

  ```python python theme={null}
  from modempay import ModemPay

  modem_pay = ModemPay(api_key="YOUR_MODEM_PAY_API_KEY")

  intent = modem_pay.payment_intents.create(params={"amount": 450})

  print(intent["data"]["payment_link"])
  ```

  ```php php theme={null}
  use ModemPay\ModemPay;

  $modemPay = new ModemPay('YOUR_MODEM_PAY_API_KEY');

  $payment = $modemPay->paymentIntents()->create(['amount' => 450]);

  echo $payment->data->payment_link;
  ```
</CodeGroup>

* **HTML Checkout**: Embed Modem Pay’s HTML Checkout into your site for a quick, low-code payment solution.

Here's an example of how you'd implement HTML checkout:

<iframe height="400" width="100%" title="Modem Pay Inline Payment" src="https://codepen.io/mercury-sms/embed/WNVLZwe?default-tab=html%2Cresult" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen />

**Walkthrough**

1. **Setting Up the Form**

   When the user clicks **Pay Now**, the form submits the order details to Modem Pay's endpoint (`https://test.checkout.modempay.com/api/pay`), passing essential information like amount, customer details, and URLs for redirecting.

2. **Payload Format After Submission**

   Once the form is submitted, the server receives the payment information in JSON format as shown below. Modem Pay processes this payload to initialize the payment.

   ```json theme={null}
   {
     "public_key": "pk_test_e073bbf9db47b09cebfdf2f7ec147d02116b69ea55135e1747a0bc8d47612f69",
     "amount": "450",
     "customer_name": "Zypheron Kade",
     "customer_email": "usr@example.com",
     "customer_phone": "7000001",
     "cancel_url": "https://modempay.com",
     "return_url": "https://modempay.com",
     "currency": "GMD",
     "metadata": { "source": "modem-html-test" }
   }
   ```

3. **After Payment – Redirect and Webhooks**
   * **Redirect URL**: Once the payment completes, the user is redirected to the `return_url` specified in the form, or if canceled, to the `cancel_url`.
   * **Webhooks**: For real-time updates on the payment status, configure webhooks in Modem Pay’s dashboard. This allows your server to receive notifications for events like `charge.succeeded` or `charge.cancelled` so you can handle them as needed, such as updating the order status on your end.

### 3. **Complete KYC**

* **Identity Verification**: Before going live, complete Modem Pay’s KYC requirements from the dashboard to enable secure, compliant transactions.

### 4. **Start Collecting Live Payments**

* **Go Live**: Once KYC is approved, switch from test to live mode on your dashboard to start processing real transactions and collecting payments from your customers.

***

This setup provides both a quick and customizable payment solution for your business, with HTML Checkout for a rapid start and SDK Payment Intent for detailed control.
