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

# Developer Quickstart

> Accept your first payment with Pursar in under 5 minutes using our Stripe-standard APIs.

This guide walks you through accepting your first payment using Pursar's Sandbox environment. You'll learn how to authenticate with your test API key and trigger a Mobile Money or Card payment.

***

## Step 1: Obtain your Sandbox API Key

In your [Pursar Merchant Dashboard](https://business.viarosandbox.com), navigate to **Developers > API Keys** to copy your test Secret Key:

```bash theme={null}
sk_test_uLsofsae3tB9Izwgeuy0Mxbh4JIxUPSG
```

***

## Step 2: Choose your Integration Path

Pursar offers two primary ways to collect payments:

> [card] [Direct Mobile Money Charge](https://docs.pavewaygroup.com/api-reference/payments/charge-money.md)
>
> Trigger an instant USSD / STK push on the customer's phone without redirecting them to a web page. Best for mobile apps, USSD menus, and custom checkout flows.

> [card] [Hosted Checkout Sessions](https://docs.pavewaygroup.com/api-reference/checkout/sessions.md)
>
> Redirect customers to a secure, mobile-optimized checkout page supporting Mobile Money, Cards, and Bank Transfer with zero frontend code.

***

## Step 3: Make your First API Request

Let's initiate a direct Mobile Money charge for 25,000 XAF to an MTN Cameroon mobile wallet:

```bash cURL theme={null}
curl -X POST https://api.viarosandbox.com/v1/charges/mobile-money \
  -u sk_test_uLsofsae3tB9Izwgeuy0Mxbh4JIxUPSG: \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 25000,
    "currency": "XAF",
    "phone": "+237671234567",
    "customer_name": "Amara Diallo",
    "customer_email": "amara@example.com",
    "description": "Quickstart Test License #101"
  }'
```

```python Python theme={null}
import requests

url = "https://api.viarosandbox.com/v1/charges/mobile-money"
auth = ("sk_test_uLsofsae3tB9Izwgeuy0Mxbh4JIxUPSG", "")

payload = {
    "amount": 25000,
    "currency": "XAF",
    "phone": "+237671234567",
    "customer_name": "Amara Diallo",
    "customer_email": "amara@example.com",
    "description": "Quickstart Test License #101"
}

response = requests.post(url, auth=auth, json=payload)
print(response.json())
```

```javascript Node.js theme={null}
const axios = require('axios');

async function testCharge() {
  const response = await axios.post(
    'https://api.viarosandbox.com/v1/charges/mobile-money',
    {
      amount: 25000,
      currency: 'XAF',
      phone: '+237671234567',
      customer_name: 'Amara Diallo',
      customer_email: 'amara@example.com',
      description: 'Quickstart Test License #101'
    },
    {
      auth: {
        username: 'sk_test_uLsofsae3tB9Izwgeuy0Mxbh4JIxUPSG',
        password: ''
      }
    }
  );

  console.log(response.data);
}

testCharge();
```

### Expected Response

In Sandbox mode, Pursar instantly simulates the telco response and transitions the charge to `requires_action` (or `successful`):

```json theme={null}
{
  "id": "tx_4a1b2c3d4e5f",
  "object": "charge",
  "status": "requires_action",
  "amount": 25000,
  "currency": "XAF",
  "customer_name": "Amara Diallo",
  "customer_email": "amara@example.com",
  "description": "Quickstart Test License #101",
  "payment_method": {
    "type": "mobile_money",
    "network": "MTN",
    "phone": "+237671234567"
  },
  "next_action": {
    "type": "verify_with_phone",
    "instructions": "A push prompt has been sent to +237671234567. Authorize with your Mobile Money PIN."
  }
}
```

***

## Step 4: Listen for Webhooks

To update your database and unlock digital products when payments succeed, register a webhook listener at `POST /webhook_endpoints`. Pursar delivers HMAC SHA-256 signed event payloads (`charge.successful`, `payment_intent.succeeded`).

Check the [Webhook Verification Guide](https://docs.pavewaygroup.com/api-reference/webhooks/verification.md) for full signature validation examples in Python, Node.js, and PHP.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.