Skip to content

Documentation

Everything you need to integrate PayStream into your application. Explore our guides and examples.

Introduction

PayStream provides a complete set of APIs and tools for accepting payments, managing subscriptions, and sending payouts. Our APIs are organized around REST, use predictable resource-oriented URLs, and return JSON-encoded responses.

You can use our APIs in test mode, which doesn't affect your live data or interact with the banking networks. The API key you use determines whether the request is live or test mode.

Base URL

https://api.paystream.io/v1

Authentication

The PayStream API uses API keys to authenticate requests. You can view and manage your API keys in the Dashboard. Your API keys carry many privileges, so be sure to keep them secure.

Example request
curl https://api.paystream.io/v1/charges \
  -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
  -d amount=2000 \
  -d currency=usd \
  -d source=tok_visa \
  -d description="Charge for jenny@example.com"

Important

Never share your secret API key in publicly accessible areas such as GitHub, client-side code, or anywhere else that could be publicly viewed.

Accept a payment

Build a payment form or use PayStream Checkout to start accepting payments.

server.js
const paystream = require('paystream')('sk_test_...');

const paymentIntent = await paystream.paymentIntents.create({
  amount: 2000,
  currency: 'usd',
  payment_method_types: ['card'],
});

// Send paymentIntent.client_secret to the frontend

Official SDKs

We provide official libraries for popular programming languages.

Need help?

Our team is here to assist you with your integration.