Simulate Authorization and Settlement

Overview

Use these endpoints to create simulated authorizations and settlement in the staging environment. (Galileo only).

Simulate Authorization

POST {{domain}}/test_api/v1/card_issuing/accounts/:id/simulate/authorization

Request

FieldValueIs RequiredDescription
amountIntegerYesAuthorization Amount
card_networkStringYes"mastercard" or "visa"
currencystringYesThree digit ISO numeric UN M49 country code; Example USA=840, Canada=124
merchant_namestringYesEx: "Big Box Store"

Sample Request

{ "amount": 120, "card_network": "visa", "currency": "840", "merchant_name": "Big Box Store" }

Response

FieldValueIs RequiredDescription
authorization_idstringYesAn ID associated with the simulated authorization. authorization_id can also be used to create the corresponding simulated settlement

Sample Response

{ "data": { "authorization_id": "20052" } }

Notes

  • An authorization can be successfully simulated but still results in denied authorization due to insufficient balances, wrong currencies, etc. In such cases, an authorization_id is still returned, and using this authorization_id to create simulated settlements will result in failures. Currently, a denied authorization webhook that informs users of denied authorizations is under development.

Simulate Settlement

POST {{domain}}/test_api/v1/card_issuing/accounts/:id/simulate/settlement

Request

FieldValueIs RequiredDescription
authorization_idStringYesAuthorization ID returned by the above simulate authorization endpoint. To be used to create a simulated settlement on the corresponding authorization
card_networkStringYes"mastercard" or "visa"
currencystringYesThree digit ISO numeric UN M49 country code; Example USA=840, Canada=124
merchant_namestringYesEx: "Big Box Store"

Sample Request

{ "authorization_id": "20052", "card_network": "visa", "currency": "840", "merchant_name": "Big Box Store" }

Response

FieldValueIs RequiredDescription
authorization_idstringYesAn ID associated with the simulated authorization. authorization_id can also be used to create the corresponding simulated settlement

Sample Response

{ "data": { "authorization_id": "20052" } }

Error Response

Sample Response

{ "error": { "code": "invalid_status", "message": "Authorization is already settled or in the wrong status." } }

📘

Related pages:

Codes, Statuses and Errors
Secondary Authorizations
Webhook (event) schema