Create Payment Order
How to Create a Payment Order with Stripe?
Prerequisites
const { PaymentClient } = require('hyperswitch-prism');
// stripeClient is configured in installation.md
const order = await stripeClient.createOrder({
merchantOrderId: 'order-123',
amount: {
minorAmount: 1000, // $10.00
currency: 'USD'
},
orderType: 'PAYMENT',
description: 'Test order'
});
console.log('Order ID:', order.connectorOrderId);
console.log('Client Secret:', order.sessionToken?.clientSecret);from hyperswitch_prism import PaymentClient
from hyperswitch_prism.generated import sdk_config_pb2
# stripe_client is configured in installation.md
order = stripe_client.create_order(
sdk_config_pb2.CreateOrderRequest(
merchant_order_id='order-123',
amount=sdk_config_pb2.Amount(
minor_amount=1000,
currency='USD'
),
order_type='PAYMENT',
description='Test order'
)
)
print(f"Order ID: {order.connector_order_id}")
print(f"Client Secret: {order.session_token.client_secret if order.session_token else 'N/A'}")How to Create a Payment Order with Adyen?
Prerequisites
What Just Happened?
How to use the secret to trigger the payment processor's checkout?
Next Steps
Last updated
Was this helpful?

