Create a hosted checkout payment intent
{ "amount": 50000, "currency": "PKR", "description": "Order 12345", "customerRef": { "name": "Ayesha Khan", "email": "ayesha@example.com", "phone": "+923001234567" }, "orderRef": { "orderRef": "ORD12345" }, "successUrl": "https://merchant.example.com/checkout/success", "cancelUrl": "https://merchant.example.com/checkout/cancel", "metadataJson": "{\"cartId\":\"c_abc123\"}" }
{ "paymentIntentId": "2c4b7c5a-f7a6-4f2d-a8b9-9b1b2c3d4e5f", "checkoutUrl": "https://pay.swich.com/checkout?token=2c4b7c5a-f7a6-4f2d-a8b9-9b1b2c3d4e5f", "expiresAt": "2025-11-15T12:00:00Z" }
{ "code": "validation_error", "message": "description must match ^[A-Za-z0-9 ]{1,200}$", "details": { "field": "description", "issue": "invalid_format" } }