API Reference

Integration After KYB Approval

After a client’s KYB (Know Your Business) verification is approved, they can begin activating provider services through Paystrator. This page explains how the automated connection test works and how Paystrator shares the callback endpoint the provider must store and use.

✅ Post-KYB Integration Flow

Once KYB is approved, the client proceeds to:

  1. Select a provider
  2. Choose the service(s) to activate (e.g. QR Code Payment, Virtual Account)
  3. Submit the required API credentials (Client Key, Client Secret)
  4. Click Test Connection & Save

This action triggers an automated connection test, during which Paystrator also sends the required callback URL to the provider.


🔄 What Happens During Connection Test

When the client submits the form, Paystrator will:

  1. Generate a short-lived Bearer token using the provided credentials
  2. Detect whether the environment is sandbox or production
  3. Send a POST request to the provider’s registered test endpoint for that environment
  4. Include in the payload a standardized callback endpoint that must be stored by the provider

📤 Payload Sent to Provider

{
  "service": "qrcode",
  "env": "sandbox",
  "endpoint": "https://sandbox.paystrator.com/v1/callback/receive/qrcode/{codename}"
}

Field Descriptions

FieldDescription
serviceThe service being activated (e.g. qrcode, virtual_account, etc.)
envThe environment in which the connection test is performed
endpointThe callback URL Paystrator expects the provider to use for notifications

{codename} is automatically generated by Paystrator and uniquely represents the provider-service combination.


📡 Paystrator Callback URL Format

Paystrator uses a standardized format for all callback endpoints:

Sandbox

Receive Money:
https://sandbox.paystrator.com/v1/callback/receive/{type}/{codename}

Send Money:
https://sandbox.paystrator.com/v1/callback/send/{type}/{codename}

Production

Receive Money:
https://api.paystrator.com/v1/callback/receive/{type}/{codename}

Send Money:
https://api.paystrator.com/v1/callback/send/{type}/{codename}

Supported type Values

  • Receive Money: qrcode, virtual_account, ewallet, credit_cardreceive
  • Send Money: bifast, reguler

🧾 Request Headers

Content-Type: application/json
Authorization: Bearer <generated_token>

✅ Expected Provider Response

The provider must respond with the following structure:

{
  "status": "passed"
}
FieldDescription
statusMust return "passed" if the connection test was successful (in both sandbox or production)

If the response is not "passed", the provider will not added as new provider.

  • Yellow = Sandbox Passed
    This indicates the provider’s API has passed testing in the sandbox environment only. The service is not yet live, further testing is required in production.
  • Green = Production Passed
    This means the provider’s API has successfully passed all integration diagnostics in the production environment. The service is fully available for clients to use in live transactions.

Our Goal:
We encourage providers to ensure all services turn green, so clients can immediately begin using them without delays or manual steps..


🛠️ Provider Responsibilities

To support this automated flow, the provider must:

  • Expose test endpoints for both sandbox and production
  • Validate the Bearer token in the request header
  • Parse the service, env, and endpoint fields from the request body
  • Store the provided endpoint internally for future callback delivery
  • Respond with { "status": "passed" } if all validations succeed

📋 Integration Checklist

RequirementStatus
Provide sandbox and production test endpoints
Accept and validate Bearer token
Parse and store Paystrator’s callback endpoint
Return { "status": "passed" } on success
Use the stored endpoint for actual callbacks

🤝 Need Help?

If you need assistance in preparing your sandbox and production endpoints, please contact your integration manager.