Verify Redirect Response
Last updated
Was this helpful?
Was this helpful?
const { PaymentClient } = require('hyperswitch-prism');
const paymentClient = new PaymentClient({
connector: 'stripe',
apiKey: 'YOUR_API_KEY',
environment: 'SANDBOX'
});const request = {
merchantOrderId: "order_001",
requestDetails: {
headers: {
"Content-Type": "application/x-www-form-urlencoded"
},
queryParams: {
payment_intent: "pi_3Oxxx...",
payment_intent_client_secret: "pi_3Oxxx..._secret_xxx"
},
body: ""
}
};
const response = await paymentClient.verifyRedirectResponse(request);{
merchantOrderId: "order_001",
sourceVerified: true,
connectorTransactionId: "pi_3Oxxx...",
status: "AUTHORIZED",
responseAmount: {
minorAmount: 1000,
currency: "USD"
},
statusCode: 200
}