Payments Documentation

Accept Payments

Learn how to accept one-time and recurring payments with PayAiML's powerful payment processing platform.

Payment Methods

Credit & Debit Cards
Accept all major card brands worldwide
  • • Visa, Mastercard, American Express
  • • 3D Secure authentication
  • • Dynamic currency conversion
Digital Wallets
Support for popular mobile payment methods
  • • Apple Pay & Google Pay
  • • PayPal & Amazon Pay
  • • One-click checkout
Local Payment Methods
Regional payment options for global reach
  • • SEPA Direct Debit
  • • Alipay & WeChat Pay
  • • Bank transfers

Implementation Examples

Create a Payment Intent
Server-side code to create a payment intent
const payaiml = require('@payaiml/node')('sk_test_...');

const paymentIntent = await payaiml.paymentIntents.create({
  amount: 2000, // $20.00
  currency: 'usd',
  automatic_payment_methods: {
    enabled: true,
  },
  metadata: {
    order_id: '12345',
  },
});
Recurring Payments
Set up subscription billing
const subscription = await payaiml.subscriptions.create({
  customer: 'cus_customer_id',
  items: [{
    price: 'price_monthly_plan',
  }],
  payment_behavior: 'default_incomplete',
  expand: ['latest_invoice.payment_intent'],
});

Best Practices

Security
  • • Never store card details on your servers
  • • Use HTTPS for all payment pages
  • • Implement webhook signature verification
  • • Use test keys in development
User Experience
  • • Show payment progress clearly
  • • Handle errors gracefully
  • • Provide multiple payment options
  • • Optimize for mobile devices

Ready to start accepting payments?

Get your API keys and start processing payments in minutes.