Skip to main content
Payment result types define the normalized response structure returned by VaultSaaS SDK operations.

PaymentResult

Normalized result returned by charge, authorize, and capture operations. Provider-specific data is available via providerMetadata.
id
string
VaultSaaS-normalized transaction identifier.
status
PaymentStatus
Normalized payment status across all providers.Possible values: 'completed', 'pending', 'requires_action', 'declined', 'failed', 'cancelled', 'authorized'
provider
string
Name of the provider that processed the transaction (e.g. “stripe”).
providerId
string
Provider’s own identifier for this transaction.
amount
number
Amount in smallest currency unit.
currency
string
ISO 4217 currency code.
paymentMethod
object
Snapshot of the payment method used.
customer
object
Customer information associated with the transaction.
metadata
Record<string, string>
Merged metadata from the request and provider response.
routing
object
How the provider was selected for this transaction.
createdAt
string
ISO 8601 timestamp of when the transaction was created.
providerMetadata
Record<string, unknown>
Raw provider-specific fields not mapped to the normalized schema.

RefundResult

Normalized result returned by a refund operation.
id
string
Unique refund identifier.
transactionId
string
The original transaction that was refunded.
status
'completed' | 'pending' | 'failed'
Status of the refund operation.
amount
number
Refunded amount in smallest currency unit.
currency
string
ISO 4217 currency code.
provider
string
Name of the provider that processed the refund.
providerId
string
Provider’s own identifier for this refund.
reason
string
Human-readable reason for the refund.
createdAt
string
ISO 8601 timestamp of when the refund was created.

VoidResult

Normalized result returned by a void (cancellation) operation.
id
string
Unique void operation identifier.
transactionId
string
The original authorized transaction that was voided.
status
'completed' | 'failed'
Status of the void operation.
provider
string
Name of the provider that processed the void.
createdAt
string
ISO 8601 timestamp of when the void was created.

TransactionStatus

Full transaction status including status history, returned by getStatus.
id
string
Transaction identifier.
status
PaymentStatus
Current normalized payment status.Possible values: 'completed', 'pending', 'requires_action', 'declined', 'failed', 'cancelled', 'authorized'
provider
string
Name of the provider that processed the transaction.
providerId
string
Provider’s own identifier for this transaction.
amount
number
Amount in smallest currency unit.
currency
string
ISO 4217 currency code.
history
StatusChange[]
Chronological status changes for this transaction.
updatedAt
string
ISO 8601 timestamp of the most recent status update.

Build docs developers (and LLMs) love