Skip to content

Simulate a card transaction reversal

Request

Simulates a transaction reversal request in the sandbox environment. The amount.value field can be set to 0 for a full reversal, or a positive value that represents the intended final value of the transaction after a partial reversal.

For example, if a transaction value was originally 10 SGD, and the intended final value is 3 SGD, amount.value should be set to 3. This means there is a partial refund of 7 SGD.

Security
UserToken
Path
profileIdinteger, (int64)required

The profile ID.

cardTokenstring, (uuid)required

The card token.

Headers
X-External-Correlation-Idstring, (uuid), <= 36 characters

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

Example:f47ac10b-58cc-4372-a567-0e02b2c3d479
Bodyapplication/jsonrequired
amountobject
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.

curl -i -X POST \
  'https://api.wise.com/v1/simulation/spend/profiles/{profileId}/cards/{cardToken}/transactions/reversal' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'X-External-Correlation-Id: f47ac10b-58cc-4372-a567-0e02b2c3d479' \
  -d '{
    "amount": {
      "value": 3,
      "currency": "SGD"
    },
    "transactionType": "GOODS_AND_SERVICES",
    "ref": {
      "transaction": {
        "acquirer": {
          "institutionId": "430010",
          "name": "ACQUIRER NAME",
          "city": "CITY NAME",
          "merchantCategoryCode": 5499,
          "country": "GB",
          "acceptorTerminalId": "TERMID01",
          "acceptorIdCode": "CARD ACCEPTOR",
          "forwardingInstitutionId": "400050"
        },
        "card": {
          "token": "59123122-223d-45f9-b840-0ad4a4f80937",
          "schemeName": "VISA",
          "pan": "4242424242424242",
          "pin": "1234",
          "cvv1": "123",
          "icvv": "456",
          "cvv2": "789",
          "expiration": [
            2029,
            7
          ],
          "sequenceNumber": 1,
          "profileId": 2,
          "userId": 5,
          "cardStatus": "ACTIVE",
          "country": "SG",
          "currencies": [
            "SGD"
          ]
        },
        "pos": {
          "type": "CHIP_AND_PIN",
          "acceptsOnlinePins": true,
          "maxPinLength": 12,
          "supports3ds": false,
          "hasChip": true
        },
        "transactionStartTime": 1667541087.0476434,
        "stan": "363054",
        "schemeTransactionId": "932290252416153",
        "retrievalReferenceNum": "230805363054"
      },
      "requestMti": "0200",
      "authorizationIdResponse": "123646"
    }
  }'

Responses

Simulated transaction reversal result.

Headers
X-External-Correlation-Idstring, (uuid), <= 36 characters

Echoed back when X-External-Correlation-Id was included in the request. Learn more.

Example:"f47ac10b-58cc-4372-a567-0e02b2c3d479"
x-trace-idstring

Unique trace identifier assigned by Wise. Useful when contacting support about a specific request.

Example:"fba501b6d453b96789f52338f019341f"
Bodyapplication/json
referenceobject

The transaction reference.

errorstring or null

An error returned by the transaction, if it exists.

Response
{ "reference": { "transaction": { "acquirer": {}, "card": {}, "pos": {}, "transactionStartTime": 1667541087.0476434, "stan": "363054", "schemeTransactionId": "932290252416153", "retrievalReferenceNum": "230805363054" }, "requestMti": "0200", "authorizationIdResponse": "123646" }, "error": null }