v5

latestOpenAPI 3.1.02026-07-262421791.5 MB
simulation

Simulate a card transaction clearing

Simulates a transaction clearing request in the sandbox environment. This is done after the authorisation. The ref field can be copied from the reference object in the authorisation response.

To clear a previous authorisation, the ref details must match the previous authorisation request. The amount does not have to match the previous authorisation request, it can be more or less than the authorisation request amount.

{% admonition type="warning" %} Clearing simulation doesn't work with Mastercard. {% /admonition %}

Refund

A refund is a 2-step process: first authorise with transactionType set to REFUND, then clear using this endpoint with the same transaction type.

post/v1/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions/clearing

Path parameters

profileIdinteger required

The profile ID.

cardTokenstring uuid required

The card token.

Headers

X-External-Correlation-Idstring uuid

Optional UUID for correlating requests across systems. If provided, Wise echoes it back in the response. Maximum 36 characters. Learn more.

Request body

transactionTypestring

The type of the transaction. Use the same transaction type from the previous authorisation request.

refobject

The transaction reference. This can be obtained from a previous authorisation request.

Response

Simulated transaction clearing result.

referenceobject

The transaction reference.

errorstring nullable

An error returned by the transaction, if it exists.