Node.js SDK
🎯 What is Prism?
❌ Without Prism
✅ With Prism
Installation
npm install hyperswitch-prismQuick Start
const { PaymentClient } = require('hyperswitch-prism');
const paymentClient = new PaymentClient({
connector: 'stripe',
apiKey: 'YOUR_API_KEY',
environment: 'SANDBOX'
});
// Authorize a payment
const response = await paymentClient.authorize({
merchantTransactionId: 'txn_order_001',
amount: {
minorAmount: 1000,
currency: 'USD'
},
paymentMethod: {
card: {
cardNumber: { value: '4242424242424242' },
cardExpMonth: { value: '12' },
cardExpYear: { value: '2027' },
cardCvc: { value: '123' },
cardHolderName: { value: 'John Doe' }
}
},
authType: 'NO_THREE_DS'
});
console.log(response.status); // AUTHORIZEDServices
Service
Description
Configuration
Option
Type
Required
Description
Error Handling
Support
Last updated
Was this helpful?

