Payment Result
amerta / Payments/Types / PaymentResult
Type Alias: PaymentResult
PaymentResult = {
status:"success";transactionId:string; } | {sessionId?:string;status:"redirect";url:string; } | {message:string;status:"pending";transactionId:string; }
Defined in: amerta/payload/payments/types/index.d.ts:35
Represents the result of a payment operation.
The result can have one of three states:
success: Payment completed successfully with a transaction IDredirect: Payment requires user redirect to an external URL (e.g., for authentication)pending: Payment is pending confirmation with an optional session ID
Examples
// Successful payment
const result: PaymentResult = {
status: "success",
transactionId: "txn_123456"
};
// Redirect required
const result: PaymentResult = {
status: "redirect",
url: "https://payment-gateway.com/pay",
sessionId: "sess_789"
};