Five-Step Sequence Simulation

A cardholder makes a $25 transaction at a gas pump. This is the same transaction shown in Five-step sequence in Card Transaction Examples, except that these examples show Mastercard instead of Visa. Also see Scenario 2: Preauthorization with Completion.

In Production, most gas pump transactions arrive at Galileo over interbank (PIN) rails. However, the simulator only simulates Visa credit or Mastercard credit rails.

Preauthorization

Call Create Simulated Card Authorization with these parameters:

ParameterValue
accountNoPAN or PRN
amount1 if you have upcharges configured for MCC 5542 or 75 if you do not
associationvisa or mc_auth
merchantNameCentral Gasoline
mcc5542
transType2
{
    "status_code": 0,
    "status": "Success",
    "processing_time": 1.59,
    "response_data": {
        "auth_response_code": "00",
        "auth_response_description": "Success",
        "auth_id": 5566
    },
    "echo": {
        "provider_transaction_id": "",
        "provider_timestamp": null,
        "transaction_id": "332b5f66-cb15-4e0c-b2bb-f5c73808caec"
    },
    "system_timestamp": "2022-10-10 09:01:14",
    "rtoken": "b48a7355-ec78-488f-bbe1-3d8061337ae3"
}

Capture the auth_id for later use.

View the preauthorization

Call Get Authorization History to see the preauthorization.

"authorizations": [
            {
                "auth_id": "5566",
                "details": "Central Gasoline       SALT LAKE CITY US",
                "details_formatted": "CENTRAL GASOLINE, SALT LAKE CIT, US",
                "amount": "-75",
                "timestamp": "2022-10-11 15:42:46",
                "type": "L",
                "mcc": "5542",
                "merchant_id": "CYwDBh4KY4LA5nX",
                "acq_id": "480334",
                "terminal_id": "36247942",
                "can_be_expired": "1",
                "original_auth_id": "0",
                "network_code": "M",
                "local_amt": "000000007500",
                "local_curr_code": "840",
                "settle_amt": null,
                "settle_curr_code": null,
                "billing_amt": null,
                "billing_curr_code": null
            }
        ]

Completion

Call Create Simulated Card Authorization with these parameters to simulate the completion, because a completion comes to Galileo through the authorization stream.

ParameterValue
accountNoPAN or PRN
amount25
associationvisa or mc_auth
mcc5542
originalAuthIdauth_id from previous response
transType4 (Visa) or 3 (Mastercard)
{
    "status_code": 0,
    "status": "Success",
    "processing_time": 3.228,
    "response_data": {
        "auth_response_code": "00",
        "auth_response_description": "Success",
        "auth_id": 8899
    },
    "echo": {
        "provider_transaction_id": "",
        "provider_timestamp": null,
        "transaction_id": "d748139c-e3fe-4367-9a10-c870b0d70bf5"
    },
    "system_timestamp": "2022-10-10 10:12:19",
    "rtoken": "9ea42dd8-9979-405d-a58f-7ed302b0e33a"
}

Capture the auth_id for later use.

View the Completion

Call Get Authorization History to see the completion. Notice that the preauthorization is no longer present. It has been replaced by this completion, which has a new auth_id, and 25 is the new hold amount. When you settle the transaction, you settle this completion. The original_auth_id field contains the auth_id from the preauthorization.

"authorizations": [
            {
                "auth_id": "8899",
                "details": "Central Gasoline       SALT LAKE CITY US",
                "details_formatted": "CENTRAL GASOLINE, SALT LAKE CIT, US",
                "amount": "-25",
                "timestamp": "2022-10-11 15:45:35",
                "type": "C",
                "mcc": "5542",
                "merchant_id": "CYwDBh4KY4LA5nX",
                "acq_id": "480334",
                "terminal_id": "36247942",
                "can_be_expired": "1",
                "original_auth_id": "5566",
                "network_code": "M",
                "local_amt": "000000002500",
                "local_curr_code": "840",
                "settle_amt": null,
                "settle_curr_code": null,
                "billing_amt": null,
                "billing_curr_code": null
            }
        ]

Settlement

Call Create Simulated Card Settlement with these parameters:

ParameterValue
authIdauth_id from the completion response
accountNoPAN or PRN
associationvisa or mc_auth
amount25 or leave blank
{
    "status_code": 0,
    "status": "Success",
    "processing_time": 5.989,
    "response_data": {
        "settle_response_code": "00",
        "settle_response_description": "Success",
        "settle_dtl": 702
    },
    "echo": {
        "provider_transaction_id": "",
        "provider_timestamp": null,
        "transaction_id": "af9714fe-e061-4ea3-99cc-12dac7d2e0ac"
    },
    "system_timestamp": "2022-10-10 10:24:20",
    "rtoken": "87c276a8-4e51-4a7a-89f5-fe1d861601ee"
}

Transactions created

Call Get All Transaction History to see the five ledger entries, in reverse chronological order.

"transactions": [
            {
                "is_savings": false,
                "deny_code": null,
                "disputable": true,
                "details": "Central Gasoline, SALT LAKE CIT, US",
                "act_type": "SE",
                "act_type_description": "Settled Authorization",
                "post_ts": "2022-10-11 15:48:32",
                "amt": -25,
                "source_id": "8899",
                "type": "5",
                "type_description": "",
                "trans_code": "SE5",
                "arn": "58761105376480333252104",
                "merchant_id": "CYwDBh4KY4LA5nX",
                "external_trans_id": "",
                "calculated_balance": 925,
                "ach_trans_id": null,
                "auth_ts": "2022-10-11 15:45:35",
                "prior_id": "0",
                "card_id": "5530",
                "formatted_merchant_desc": "CENTRAL GASOLINE, SALT LAKE CIT, US",
                "network_code": "M",
                "auth_id": "8899",
                "local_amt": null,
                "local_curr_code": "840",
                "settle_amt": null,
                "settle_curr_code": "840",
                "billing_amt": null,
                "billing_curr_code": "840",
                "pmt_ref_no": "999102163165",
                "mcc_code": "5542",
                "credit_ind": "Y"
            },
            {
                "is_savings": false,
                "deny_code": null,
                "disputable": false,
                "details": "",
                "act_type": "BO",
                "act_type_description": "Authorization Backout",
                "post_ts": "2022-10-11 15:48:32",
                "amt": 25,
                "source_id": "8899",
                "type": "5",
                "type_description": "",
                "trans_code": "BO5",
                "arn": "",
                "merchant_id": null,
                "external_trans_id": "",
                "calculated_balance": 1000,
                "ach_trans_id": null,
                "auth_ts": null,
                "prior_id": null,
                "card_id": "5530",
                "formatted_merchant_desc": "",
                "network_code": null,
                "auth_id": null,
                "local_amt": null,
                "local_curr_code": null,
                "settle_amt": null,
                "settle_curr_code": null,
                "billing_amt": null,
                "billing_curr_code": null,
                "pmt_ref_no": "999102163165",
                "mcc_code": null,
                "credit_ind": null
            },
            {
                "is_savings": false,
                "deny_code": null,
                "disputable": false,
                "details": "",
                "act_type": "BK",
                "act_type_description": "BK",
                "post_ts": "2022-10-11 15:45:35",
                "amt": 75,
                "source_id": "5566",
                "type": "BK",
                "type_description": null,
                "trans_code": "BKBK",
                "arn": "",
                "merchant_id": null,
                "external_trans_id": "",
                "calculated_balance": 1000,
                "ach_trans_id": null,
                "auth_ts": null,
                "prior_id": null,
                "card_id": "5530",
                "formatted_merchant_desc": null,
                "network_code": null,
                "auth_id": null,
                "local_amt": null,
                "local_curr_code": null,
                "settle_amt": null,
                "settle_curr_code": null,
                "billing_amt": null,
                "billing_curr_code": null,
                "pmt_ref_no": "999102163165",
                "mcc_code": null,
                "credit_ind": null
            },
            {
                "is_savings": false,
                "deny_code": null,
                "disputable": false,
                "details": "Central Gasoline, SALT LAKE CIT, US",
                "act_type": "AU",
                "act_type_description": "Authorization",
                "post_ts": "2022-10-11 15:45:35",
                "amt": -25,
                "source_id": "8899",
                "type": "C",
                "type_description": "",
                "trans_code": "AUC",
                "arn": "",
                "merchant_id": "CYwDBh4KY4LA5nX",
                "external_trans_id": "",
                "calculated_balance": 975,
                "ach_trans_id": null,
                "auth_ts": "2022-10-11 15:45:35",
                "prior_id": "0",
                "card_id": "5530",
                "formatted_merchant_desc": "CENTRAL GASOLINE, SALT LAKE CIT, US",
                "network_code": "M",
                "auth_id": "8899",
                "local_amt": 25,
                "local_curr_code": "840",
                "settle_amt": 0,
                "settle_curr_code": null,
                "billing_amt": null,
                "billing_curr_code": null,
                "pmt_ref_no": "999102163165",
                "mcc_code": "5542",
                "credit_ind": "Y"
            },
            {
                "is_savings": false,
                "deny_code": null,
                "disputable": false,
                "details": "Central Gasoline, SALT LAKE CIT, US",
                "act_type": "AU",
                "act_type_description": "Authorization",
                "post_ts": "2022-10-11 15:42:46",
                "amt": -75,
                "source_id": "5566",
                "type": "L",
                "type_description": "",
                "trans_code": "AUL",
                "arn": "",
                "merchant_id": "CYwDBh4KY4LA5nX",
                "external_trans_id": "",
                "calculated_balance": 925,
                "ach_trans_id": null,
                "auth_ts": "2022-10-11 15:42:46",
                "prior_id": "0",
                "card_id": "5530",
                "formatted_merchant_desc": "CENTRAL GASOLINE, SALT LAKE CIT, US",
                "network_code": "M",
                "auth_id": "5566",
                "local_amt": 75,
                "local_curr_code": "840",
                "settle_amt": 0,
                "settle_curr_code": null,
                "billing_amt": null,
                "billing_curr_code": null,
                "pmt_ref_no": "999102163165",
                "mcc_code": "5542",
                "credit_ind": "Y"
            }
]