PHP SDK
🎯 What is Prism?
❌ Without Prism
✅ With Prism
Installation
composer require hyperswitch/prismQuick Start
<?php
require_once 'vendor/autoload.php';
use HyperswitchPrism\PaymentClient;
$paymentClient = new PaymentClient([
'connector' => 'stripe',
'apiKey' => 'YOUR_API_KEY',
'environment' => 'SANDBOX'
]);
// Authorize a payment
$response = $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'
]);
echo $response['status']; // AUTHORIZEDServices
Service
Description
Configuration
Option
Type
Required
Description
Error Handling
Support
Last updated
Was this helpful?

