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

# Payzah Quickstart: Your First Payment in 5 Minutes

> Take your first sandbox payment with Payzah in about five minutes using our public test key: create a payment link, pay it with a test card, and verify the result.

Take your first Payzah payment in about five minutes. Copy one request, run it, and get a live payment link you can open in a browser. No account needed.

Everything on this page runs against the **sandbox**, so no real money moves.

<Note>
  متوفر أيضًا [بالعربية](/docs/ar/quickstart) — also available in [Arabic](/docs/ar/quickstart).
</Note>

<Note>
  Already on Shopify, WooCommerce, or Odoo? Skip the API entirely — [install the plugin for your platform](/docs/plugins/overview) instead.
</Note>

## What You Need

Nothing. Use the public sandbox key below and start immediately — no account required.

```text theme={null}
NzYxMGVlNjFhZDJkZGJlODAzYmU2MjZmNzZhYmM5OTZkNDdkY2JiZA==
```

This is a shared demo key, already Base64-encoded, and works only on the test environment. When you are ready to go live, [register through the Payzah app](http://onelink.to/gjt5ed) for your own private key.

<Steps>
  <Step title="Create a payment">
    Run this exactly as written — the sandbox key is already filled in.

    ```bash Terminal theme={null}
    curl --request POST \
      --url https://development.payzah.net/ws/paymentgateway/index \
      --header 'Content-Type: application/json' \
      --header 'Authorization: NzYxMGVlNjFhZDJkZGJlODAzYmU2MjZmNzZhYmM5OTZkNDdkY2JiZA==' \
      --data '{
        "trackid": "QUICKSTART-001",
        "amount": "1.000",
        "currency": "414",
        "payment_type": "3",
        "success_url": "https://example.com/success",
        "error_url": "https://example.com/error"
      }'
    ```

    You will get back something like this:

    ```json Response theme={null}
    {
      "status": true,
      "data": {
        "PaymentUrl": "https://development.payzah.net/pgaction",
        "PaymentID": "2019070115360420",
        "transit_url": "https://devgateway.trytajer.app?id=202409271806248183",
        "direct_url": ""
      }
    }
    ```

    **Save the `PaymentID`.** You need it for the next step and for any refund.

    <Tip>
      Got `status: false` instead? Code `10014` means the key was not sent correctly — check for a stray newline or space. See [Troubleshooting](/docs/guides/troubleshooting) for other codes.
    </Tip>
  </Step>

  <Step title="Pay it">
    Open the `transit_url` from the response in your browser. That is the checkout page your customers would see.

    Pay using a [sandbox test card](/docs/guides/test-credentials), then let it redirect you back.

    <Warning>
      A redirect to your success URL does **not** mean you were paid. Anyone can visit that URL directly. Always verify server-side — which is the next step.
    </Warning>
  </Step>

  <Step title="Confirm you were paid">
    Check the real outcome using your `trackid` and the `PaymentID` from step 2.

    ```bash Terminal theme={null}
    curl --request POST \
      --url https://development.payzah.net/ws/paymentgateway/get-payment-details \
      --header 'Content-Type: application/json' \
      --header 'Authorization: NzYxMGVlNjFhZDJkZGJlODAzYmU2MjZmNzZhYmM5OTZkNDdkY2JiZA==' \
      --data '{
        "trackid": "QUICKSTART-001",
        "payment_id": "2019070115360420"
      }'
    ```

    Look for `paymentStatus` in the response:

    ```json Response theme={null}
    {
      "status": true,
      "data": {
        "payzahRefrenceCode": "202303935749373001",
        "trackId": "QUICKSTART-001",
        "paymentStatus": "CAPTURED"
      }
    }
    ```

    `CAPTURED` means the funds are secured. **Only fulfil an order on `CAPTURED`** — every other value means you have not been paid. See [all status values](/docs/api-reference/response-codes).
  </Step>
</Steps>

That is a complete payment flow. Everything else builds on these three calls.

## Try It Without Any Code

Prefer to click rather than curl? Every endpoint has an interactive console pointed at the sandbox — fill in the fields and hit send.

<CardGroup cols={3}>
  <Card title="Initialize a payment" icon="play" href="/docs/api-reference/payments/initialize-a-payment">
    Create a payment session.
  </Card>

  <Card title="Check payment status" icon="magnifying-glass" href="/docs/api-reference/payments/check-payment-status">
    Verify a transaction.
  </Card>

  <Card title="Refund a payment" icon="rotate-left" href="/docs/api-reference/refunds/refund-a-payment">
    Return funds to a customer.
  </Card>
</CardGroup>

## Where to Next

<CardGroup cols={2}>
  <Card title="Choose your integration method" icon="code-branch" href="/docs/getting-started/integration-methods">
    You used the hosted Transit page above. Compare it against sending customers straight to K-Net or card.
  </Card>

  <Card title="Handle refunds" icon="rotate-left" href="/docs/guides/refund">
    Issue full or partial refunds against a completed transaction.
  </Card>

  <Card title="Test properly" icon="flask" href="/docs/guides/test-credentials">
    Sandbox cards for K-Net, Visa, and MasterCard.
  </Card>

  <Card title="Go live" icon="rocket" href="/docs/guides/go-live-checklist">
    Work through the checklist before switching to production.
  </Card>
</CardGroup>
