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

# Play around with our API using Postman

The PawaPay API enables you to pay and get paid with mobile money in Sub-Saharan Africa.

## Let's play around with the API in Postman

<Steps>
  <Step title="Fork our API to your workspace in Postman">
    [    <img src="https://run.pstmn.io/button.svg" alt="Run In Postman" width="128" height="32" />](https://app.getpostman.com/run-collection/25129489-56cbaf62-56c2-4734-bf1f-f61d369cc9e3?action=collection%2Ffork\&source=rip_markdown\&collection-url=entityId%3D25129489-56cbaf62-56c2-4734-bf1f-f61d369cc9e3%26entityType%3Dcollection%26workspaceId%3D8c3e7775-3da5-4bab-8a8c-ffb331ccfe27)
  </Step>

  <Step title="Create an account with PawaPay">
    If you haven't done so already, [create an account](https://dashboard.sandbox.pawapay.io/#/merchant-signup) in our sandbox.
    It only takes a few minutes and you can start testing our API immediately.
  </Step>

  <Step title="Generate the API token">
    Now go to [Developers > API tokens](https://dashboard.sandbox.pawapay.io/#/system/api-token) and generate an API token.

    <Frame>
      <img src="https://mintcdn.com/pawapay/HJiOScAQ34lKT2Kj/images/dashboard/other/generate_token.png?fit=max&auto=format&n=HJiOScAQ34lKT2Kj&q=85&s=e2a22bab168082be18f724db1338ccd3" width="2592" height="713" data-path="images/dashboard/other/generate_token.png" />
    </Frame>

    <Info>
      Please store it immediately. We do not store the tokens in PawaPay for security reasons.
    </Info>
  </Step>

  <Step title="Set up an environment in Postman">
    1. Choose "Environments" from the sidebar in Postman and select the little "+" button.
    2. Name the environment as you please. For example, "PawaPay sandbox".
    3. Add the following variables into your environment:

    | Variable | Value                                                            |
    | -------- | ---------------------------------------------------------------- |
    | apiToken | Paste the token you just generated as the value                  |
    | baseUrl  | [https://api.sandbox.pawapay.io](https://api.sandbox.pawapay.io) |

    4. Remember to save your changes.
    5. Choose the newly created environment from the environment dropdown in the upper right corner.
  </Step>

  <Step title="All done!" titleSize="h2">
    You can now start sending requests to the PawaPay API in the sandbox. Try "Initiate deposit" for example.

    And explore our API reference to learn more about:

    <CardGroup cols={2}>
      <Card title="Deposits" href="/v2/api-reference/deposits/">
        Find out how to get paid.
      </Card>

      <Card title="Payouts" href="/v2/api-reference/payouts/">
        Find out how to pay someone.
      </Card>

      <Card title="Refunds" href="/v2/api-reference/refunds/">
        Find out how to refund someone's payment.
      </Card>

      <Card title="Active configuration" href="/v2/api-reference/toolkit/active-configuration">
        Find out what's available on your account and all the parameters you need to pay and get paid.
      </Card>
    </CardGroup>

    ...and much more.
  </Step>
</Steps>

## Want to test callbacks with Postman as well?

The PawaPay API is asynchronous.
The fastest way to find out about the final status of a payment is through [callbacks](/v2/docs/what_to_know#callbacks).
Let's configure those as well so you can see the whole flow in Postman.

<Steps>
  <Step title="Set up a mock server in Postman">
    1. Choose "Mock servers" from the sidebar and select the little "+" button.
    2. Choose "Select an existing collection".
    3. Select the "PawaPay Merchant API" as the collection to mock.
    4. Name the server as you please. For example, "PawaPay sandbox".
    5. Select "Create Mock Server".
    6. Copy the mock server URL.
  </Step>

  <Step title="Set up callbacks">
    Sign in to the sandbox dashboard and go to [Developers > Callback URLs](https://dashboard.sandbox.pawapay.io/#/system/callback-url).

    Select "Edit" and paste the callback URL you copied from Postman into the input boxes.

    <Frame>
      <img src="https://mintcdn.com/pawapay/HJiOScAQ34lKT2Kj/images/dashboard/other/specify_callback_urls.png?fit=max&auto=format&n=HJiOScAQ34lKT2Kj&q=85&s=4a7de2730fa61f76cd253b0a2476e840" width="2780" height="1866" data-path="images/dashboard/other/specify_callback_urls.png" />
    </Frame>

    Once configured for all your flows, select "Save Changes".
  </Step>

  <Step title="All done.">
    You can now start sending requests to the PawaPay API in the sandbox.

    You will see the callbacks in the Mock servers tab when clicking on the mock server you just created.

    <Tip>
      Don't forget to click "Refresh logs" after initiating a payment.
    </Tip>
  </Step>
</Steps>

## What to do next?

Check out the guides we have for different payment flows.
You can test them in Postman as you go through them.

<CardGroup cols={2}>
  <Card title="Deposits" href="/v2/docs/deposits">
    Step by step guide on how to get paid by your customers.
  </Card>

  <Card title="Payouts" href="/v2/docs/payouts">
    Step by step on how to pay your customers.
  </Card>

  <Card title="Refunds" href="/v2/docs/refunds">
    Sometimes you need to refund. Follow this guide to refund your customers.
  </Card>

  <Card title="Payment page" href="/v2/docs/payment_page">
    Find out how to get paid, with an out-of-the-box payment experience.
  </Card>
</CardGroup>
