Skip to main content

get Method

Overview​

The get method retrieves the current status of a payment from the payment processor.

Business Use Case: A webhook was missed. Check the actual status with the processor before fulfilling.

Purpose​

ScenarioBenefit
Webhook fallbackPoll when webhooks fail
ReconciliationSync payment states

Request Fields​

FieldTypeRequiredDescription
merchantTransactionIdstringYesYour unique transaction reference
connectorTransactionIdstringYesConnector's transaction ID

Response Fields​

FieldTypeDescription
merchantTransactionIdstringYour reference
connectorTransactionIdstringConnector's transaction ID
statusPaymentStatusCurrent status
amountMoneyPayment amount
statusCodeintHTTP status code

Example​

SDK Setup​

use OrchestratorXPrism\PaymentClient;

$paymentClient = new PaymentClient([
'connector' => 'stripe',
'apiKey' => 'YOUR_API_KEY',
'environment' => 'SANDBOX'
]);

Request​

$request = [
'merchantTransactionId' => 'txn_order_001',
'connectorTransactionId' => 'pi_3Oxxx...'
];

$response = $paymentClient->get($request);

Response​

[
'merchantTransactionId' => 'txn_order_001',
'connectorTransactionId' => 'pi_3Oxxx...',
'status' => 'CAPTURED',
'amount' => [
'minorAmount' => 1000,
'currency' => 'USD'
],
'statusCode' => 200
]

Next Steps​