Docs / Quick Start

Quick Start

Get up and running with the PayItFast API in minutes. This guide covers environments, authentication, and making your first API call.

Environments

PayItFast provides two environments. Use Sandbox for development and testing, then switch to Production when you are ready to go live.

Environment Base URL Purpose
Sandbox https://sandbox-api.payitfast.com Development and testing. No real funds are moved. Use sandbox credentials provided in your PayItFast dashboard.
Production https://api.payitfast.com Live environment. Real transactions are processed. Requires approved production credentials.
Tip

Always develop and test against the Sandbox environment first. Sandbox credentials are available immediately after creating your PayItFast account.

Authentication

All API requests must be authenticated using HTTP Basic Authentication. Your credentials consist of a username and password pair, which you can find in the PayItFast dashboard under API Settings.

Authorization Header Format

Encode your username:password pair using Base64, then pass it in the Authorization header:

HTTP Header
Authorization: Basic <base64(username:password)>

For example, if your username is pif_user and your password is s3cret, the Base64-encoded string of pif_user:s3cret would be cGlmX3VzZXI6czNjcmV0, and your header would be:

Example
Authorization: Basic cGlmX3VzZXI6czNjcmV0
Important

Never expose your API credentials in client-side code or public repositories. All API calls should be made from your server.

Common Headers

Include the following headers with every API request.

Header Value Required Description
Authorization Basic <credentials> Required HTTP Basic Auth header with your Base64-encoded username:password.
Content-Type application/json Required All request and response bodies are JSON.
MID <your-merchant-id> Conditional Merchant identifier. Required if you have multiple merchant profiles configured under your account.

Making Your First Request

Let's verify your setup by fetching the list of supported currencies for deposits. This is a simple GET request that requires only authentication.

GET /v2/supported-currencies List supported currencies
cURL
curl -X GET "https://sandbox-api.payitfast.com/v2/supported-currencies?direction=deposit" \
  -H "Authorization: Basic <your-base64-credentials>" \
  -H "Content-Type: application/json"
Response 200 OK
JSON
{
  "status": "success",
  "data": {
    "fiat": [
      {
        "currency": "USD",
        "name": "US Dollar",
        "paymentMethods": ["bank_transfer", "card"]
      },
      {
        "currency": "EUR",
        "name": "Euro",
        "paymentMethods": ["bank_transfer", "sepa"]
      }
    ],
    "crypto": [
      {
        "currency": "USDC",
        "networks": ["ethereum", "polygon", "solana"]
      }
    ]
  }
}
Success

If you received a 200 response with currency data, your credentials are working and you are ready to start integrating.

Next Steps

Now that you have authenticated successfully, explore these resources to build your integration: