API Version 2.0 Now Available

SafePays APIDocumentation

Build powerful payment integrations with our simple, secure, and scalable API. Everything you need to manage customers and process invoices.

Everything You Need

Powerful features to streamline your payment processing workflow

Customer Management

Create and manage customer profiles with detailed information and preferences.

Invoice Processing

Generate and track invoices with line items, custom due dates, and multiple currencies.

Webhook Notifications

Real-time updates when invoice status changes with reliable webhook delivery.

Simple Integration

Get started with just a few lines of code

create-invoice.js
// Create a new invoice
const response = await fetch('https://app.safepays.com/api/invoice', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    api_key: 'your_api_key_here',
    customer_id: '550e8400-e29b-41d4-a716',
    currency: 'USD',
    items: [
      { name: 'Product A', qty: 2, price: 50.00 },
      { name: 'Product B', qty: 1, price: 25.00 }
    ],
    due_date: '2024-12-31'
  })
});

const invoice = await response.json();
console.log('Invoice created:', invoice.payment_link);

Ready to get started?

Explore our comprehensive documentation and start integrating SafePays today.