Developers

API documentation

Our REST API is intuitive and well-documented. Use webhooks for real-time events and our sandbox to test every scenario before going live.

Authentication

All API requests require a secret API key passed in the Authorization header.

Authorization: Bearer sk_live_...

Base URL

https://api.stackpay.com/v1

Core endpoints

POST
/payments

Create a new payment

GET
/payments/{id}

Retrieve a payment

POST
/refunds

Refund a payment

GET
/balance

Check account balance

  • Full API reference & interactive docs
  • Official SDKs for 8+ languages
  • Sandbox environment with test cards
  • Webhook signature verification
payment.php
use StackPay\StackPayClient;

// Initialize the client
$stackPay = new StackPayClient('sk_live_...');

// Create a payment
$payment = $stackPay->payments->create([
    'amount'   => 245000,
    'currency' => 'usd',
    'source' => 'tok_visa',
]);

echo $payment->status; // "succeeded"