Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cheqpay.mx/llms.txt

Use this file to discover all available pages before exploring further.

Production Readiness

Ready to go live? Follow this comprehensive checklist to ensure a smooth launch.

Pre-Launch Checklist

1. Complete Testing

  • ✅ Successful card payments (Visa, Mastercard, Amex)
  • ✅ Declined payment handling
  • ✅ 3D Secure authentication flow
  • ✅ Saved payment method usage
  • ✅ Full refunds
  • ✅ Partial refunds
  • ✅ Multiple partial refunds
  • ✅ Refund notification workflow
  • ✅ Network errors
  • ✅ Validation errors
  • ✅ Declined payments
  • ✅ 3DS authentication failures
  • ✅ Timeout scenarios

2. Get Production Credentials

1

Contact Support

Email support@cheqpay.com to request production API keys.
2

Complete Verification

Provide required business documentation and complete KYC verification.
3

Receive Credentials

You’ll receive your production API key securely.
4

Store Securely

Add credentials to your environment variables, never hardcode them.

3. Update Configuration

Change Base URL

// Before (Sandbox)
const baseUrl = 'https://api.cheqpay.dev/pos';
const apiKey = process.env.CHEQPAY_SANDBOX_KEY;

// After (Production)
const baseUrl = 'https://prod.cheqpay.mx/pos';
const apiKey = process.env.CHEQPAY_PRODUCTION_KEY;

Environment-Based Config

const config = {
  sandbox: {
    baseUrl: 'https://api.cheqpay.dev/pos',
    apiKey: process.env.CHEQPAY_SANDBOX_KEY
  },
  production: {
    baseUrl: 'https://prod.cheqpay.mx/pos',
    apiKey: process.env.CHEQPAY_PRODUCTION_KEY
  }
};

const env = process.env.NODE_ENV || 'sandbox';
module.exports = config[env];

5. Security Review

API Keys

  • Stored in environment variables
  • Not committed to version control
  • Different keys for each environment
  • Rotation schedule defined

Data Protection

  • No card numbers logged
  • No CVCs stored
  • HTTPS on all payment pages

PCI Compliance

  • Using Cheqpay tokenization
  • No card data on your servers
  • SAQ-A compliance maintained

Access Control

  • API keys restricted to production
  • Team access properly managed
  • Audit logs enabled

6. Monitoring Setup

Log Important Events

logger.info('payment.created', {
  externalId: payment.externalId,
  amount: payment.amount,
  status: payment.status,
  timestamp: new Date().toISOString()
});

Set Up Alerts

// Alert on high failure rate
if (failureRate > 0.15) {
  alert('High payment failure rate detected');
}

// Alert on API errors
if (apiErrorRate > 0.01) {
  alert('Elevated API error rate');
}

Monitor Key Metrics

  • Payment success rate
  • Average payment amount
  • Decline rate by card type
  • 3DS challenge rate
  • Refund rate

7. Customer Communication

Set up email confirmations for:
  • Successful payments
  • Failed payments
  • Refund notifications
Provide clear support contact information:
  • Email support
  • Phone number (if available)
  • FAQ or help center
  • Expected response time
Clearly communicate:
  • Refund eligibility
  • Refund timeline (5-10 days for cards)
  • How to request refunds
  • Processing fee policy

Launch Day

Step 1: Final Verification

1

Review Configuration

Double-check all production credentials and URLs are correct.
2

Test Small Transaction

Process a small test payment in production (e.g., $1.00 MXN).
3

Test Refund

Issue a refund on the test payment to verify refund flow.

Step 2: Gradual Rollout

// Start with percentage-based rollout
const useNewPaymentGateway = Math.random() < 0.1;  // 10% of traffic

if (useNewPaymentGateway) {
  // Use Cheqpay
  return await cheqpay.payments.create(paymentData);
} else {
  // Use old payment method
  return await legacyPayments.create(paymentData);
}

Step 3: Monitor Closely

Watch for:
  • Payment success rates
  • Error rates
  • Customer feedback
  • Support tickets

Step 4: Increase Traffic

Gradually increase rollout percentage:
  • Day 1: 10%
  • Day 2: 25%
  • Day 3: 50%
  • Day 5: 100%

Post-Launch

Week 1: Close Monitoring

Daily Checks

  • Review payment metrics
  • Check error logs
  • Read customer feedback

Performance Review

  • Success rate vs sandbox
  • Decline rate analysis
  • 3DS challenge rate
  • Average processing time

Ongoing Maintenance

  • Weekly: Review metrics and error rates
  • Monthly: Analyze trends and patterns
  • Quarterly: Review and rotate API keys
  • Subscribe to Cheqpay status updates
  • Join developer community
  • Read API changelog
  • Test new features in sandbox
  • A/B test payment flows
  • Reduce friction points
  • Improve error messages
  • Update saved card prompts

Common Issues

Issue: Higher Decline Rate in Production

Possible Causes:
  • Missing device information
  • Inconsistent customer data
  • Missing billing address
  • New merchant risk profile
Solutions:
  • Include complete device information
  • Always send billing address
  • Use saved cards for returning customers
  • Contact support for merchant review

Issue: 3DS Challenges Too Frequent

Solutions:
  • Include device fingerprinting
  • Send consistent customer data
  • Use saved payment methods
  • Include billing address
  • Contact support to review risk profile

Rollback Plan

If you need to rollback:
// Quick rollback to legacy system
const USE_CHEQPAY = process.env.USE_CHEQPAY === 'true';

if (USE_CHEQPAY) {
  return await cheqpay.payments.create(paymentData);
} else {
  return await legacyPayments.create(paymentData);
}
Set environment variable to disable:
USE_CHEQPAY=false

Support

Need help going live?

Email Support

Get help from our integration team

Developer Slack

Join our developer community (contact support for invite)

Status Page

Monitor API status and incidents

Documentation

Review complete documentation

Success Checklist

Before considering your launch complete:
  • ✅ Production credentials obtained and configured
  • ✅ Base URL updated to production
  • ✅ Test transaction processed successfully
  • ✅ Monitoring and alerts configured
  • ✅ Error handling tested
  • ✅ Customer communications set up
  • ✅ Support team trained
  • ✅ Rollback plan documented
  • ✅ Success metrics defined
  • ✅ Gradual rollout completed
  • ✅ Performance metrics reviewed

Next Steps

Testing Guide

Review complete testing scenarios

Best Practices

Follow recommended patterns

Error Handling

Handle production errors

API Reference

Complete API documentation

Congratulations on going live with Cheqpay! 🎉 We’re here to support you every step of the way. Contact us anytime at support@cheqpay.com.