Client used to interface with the virtual cards service simulator.

This client allows you to simulate the use of a virtual card at merchants to generate transaction events. The simulator is only available in sandbox environments.

It is recommended to code to this interface, rather than the implementation class (DefaultSudoVirtualCardsSimulatorClient) as the implementation class is only meant to be used for initializing an instance of the client.

Hierarchy

  • SudoVirtualCardsSimulatorClient

Implemented by

Methods

  • Simulate a debit transaction (complete).

    Simulating a debit will generate a .complete transaction. Simulating a debit does not mutate any existing records, and instead generates a new debit transaction.

    Debits can only be performed against a transaction that has already been previously authorized (.pending). Authorizations can also be partially debited, which will generate a debit record of the partially debited amount.

    Debits can exceed the total amount of a authorization.

    Parameters

    Returns Promise<SimulateDebitOutput>

  • Simulate a refund transaction (refund).

    Simulating a refund will generate a refund transaction. Simulating a refund does not mutate any existing records, and instead generates a new refund transaction.

    Refunds can only be performed against a transaction that has already been previously debited (.complete). Debits can also be partially refunded, which will generate a new refund transaction record of the partially refunded amount.

    Refunds cannot exceed the total amount of a debit, otherwise an error will be returned and no operation will be performed.

    Parameters

    Returns Promise<SimulateRefundOutput>

  • Simulate an authorization reversal transaction.

    Reversals do not generate a transaction the user can see, but will instead reverse an existing authorization (.pending) transaction. A reversal can be partial, which will cause the authorization transaction to be decremented by the input amount, or can be reversed the entire amount. If the entire amount is reversed, the authorization transaction record will be deleted.

    Reversals cannot exceed the total of the authorization, otherwise an error will be returned and no operation will be performed.

    Parameters

    Returns Promise<SimulateReversalOutput>

Generated using TypeDoc