Skip to main content
Use vivawallet.transactions for operations that target one transaction at a time: retrieving a transaction by ID, refunding or cancelling it, capturing a transaction, creating a card token, and running advanced flows such as MOTO charges, incremental pre-authorizations, rebates, fast refunds, and OCT / Pay Out.
Use vivawallet.dataServices for bulk transaction search, filtered reporting, MT940 data, and sale transaction exports. The transactions module focuses on individual transaction actions.

Retrieve a transaction

Call getTransactionById(transactionId) with the Viva transaction UUID.
Common statusId values returned by the SDK type: The SDK returns Viva’s response shape directly. It does not normalize transaction amounts or status fields.

Cancel or refund a transaction

Call cancelTransaction(transactionId, refundOptions). The current SDK type requires an amount; pass the amount you want to refund in the currency’s smallest unit.

Capture or create a transaction

Use createTransaction(options) when Viva expects a transaction payload containing the initial transaction id.
makeTransaction(options) is still available as a deprecated alias for createTransaction(options).

MOTO card charge

A Mail Order / Telephone Order (MOTO) charge uses makeMotoCardCharge(options). The charge references an existing payment order via orderCode; the card details are sent in the creditcard object.
MOTO charges require you to handle raw card details. Make sure the integration is PCI-DSS compliant before using this flow.

Create a card token

Use createCardToken(options) to obtain a reusable token associated with the card used for a previous transaction.
The returned type exposes token plus any additional fields returned by Viva.

Incremental pre-authorization

Use increasePreauth(transactionId, options) to increase the amount on an existing pre-authorized transaction.

Cancel partial authorization

Use cancelPartialAuthorization(transactionId, options) to release part of an existing partial authorization.

Rebate and fast refund

rebate(transactionId, options) and fastRefund(transactionId, options) create follow-up credit transactions tied to an original transaction.
To cancel a rebate or fast refund, call cancelRebateOrFastRefund(transactionId, options).

OCT / Pay Out

Use octAndPayout(transactionId, options) for the OCT / Pay Out endpoint. serviceId selects the operation: 6 for OCT, 14 for Pay Out.

Legacy transaction lookup

For older Basic Auth integrations, use getLegacyTransactions(transactionId?, query?).