API tutorials
Cards
Simulate card management
what you will learn ✅ how to simulate these card management actions clearing reversal incremental transaction single message clearing single message reversal if you are new to card issuing we recommend you read the docid\ xjutoocha5khmt9uzys18 concept pages before starting this tutorial the tutorial assumes you have a knowledge of apis and how they work for more information on sending api calls, see docid\ puttcwq5sklzxyzin5d1b the tutorial uses these api endpoints api description docid\ klhkl7f7udkckg4lk2vwi simulates merchant authorization docid\ jkywjbbj5vzss 4vyapdu simulates replacement of a memo post with a core transaction docid zu5qby2byatnkskhgmx simulates reversal of an authorization docid\ rtqomdun8iwgfogeqzpav simulates an incremental transaction reflected in the deposit account activity docid\ foehddyznvdgf e2qnxl7 simulations the message type for cardholder verification to authorize and clear a transaction docid\ o5jr5y2scriic2hagqxgl simulates a single message clearing transaction for which you can create a reversal transaction before you begin make sure you have docid\ wmg 1fqwq3bj d3c3hffs client id register relevant webhook events to receive the webhook events for this tutorial both partner accounts need to docid\ bn5xtgkjogbe ctwomcbs each specific webhook event type once you are registered, the event objects are sent to the registered urls the event object contains a list of resource identifiers used to download details on each event simulate card management the simulate endpoints within card management allow you to simulate most of the transaction scenarios you would experience in a live environment to simulate authorization call docid\ klhkl7f7udkckg4lk2vwi this endpoint simulates a merchant authorization that affects the available balance on the deposit account simulate authorization request curl location 'https //sandbox crbcos com/cardmanagement/v1/simulate/authorization' \\ \ data '{ "amount" 1999, "cardid" "8c6a53e0 83ad 4b76 b446 b300006a3e6a", "merchantcountrycode" "us", "merchantname" "streamflix", "merchantstreet" "123 any st", "merchantcity" "anywhere", "merchantstate" "ny", "merchantpostalcode" "10001", "cardnetwork" "visa", "additionalamounts" \[], "processingcode" "billpayment" }' the response includes the retrievalreferencenumber and the cardid you need these values to replace the memo post with a core transaction to post the activity record to the account, using the endpoint post /v1/simulate/clearing as explained below simulate authorization response { "retrievalreferencenumber" "644371423186", "cardid" "8c6a53e0 83ad 4b76 b446 b300006a3e6a" } to simulate clearing in a real transaction, when the authorization request is made, a memo post reflects the account and impacts the available balance however, the memo post remains until the clearing endpoint is called calling the docid\ jkywjbbj5vzss 4vyapdu endpoint replaces the memo post with a core transaction to post the activity record to the account in this simulation, authorization is not complete and the transaction does not post on the account until the simulate/clearing endpoint is called using the retrievalreferencenumber and cardid simulate clearing request curl location 'https //sandbox crbcos com/cardmanagement/v1/simulate/clearing' \\ \ data '{ "cardid" "8c6a53e0 83ad 4b76 b446 b300006a3e6a", "retrievalreferencenumber" "644371423186", "processingcode" "billpayment" }' to simulate reversal this endpoint is used to reverse an existing authorization using the retrievalreferencenumber returned in the response to the docid zu5qby2byatnkskhgmx endpoint this reverses the original authorization placed on the account and removes it from the deposit account activity the amount in this request can be any value and does not have to be the same amount as the original clearing transaction, which allows for a partial amount reversal simulate reversal request curl location 'https //sandbox crbcos com/cardmanagement/v1/simulate/reversal' \\ \ data '{ "cardid" "8c6a53e0 83ad 4b76 b446 b300006a3e6a", "retrievalreferencenumber" "654492282074", "amount" "123" }' to simulate a incremental transaction this endpoint, used with the retrievalreferencenumber returned by the docid\ rtqomdun8iwgfogeqzpav endpoint, creates an incremental transaction reflected in the deposit account activity an example of an incremental transaction is when a hotel adds an additional charge for an item charged to your room simulate incremental request curl location 'https //sandbox crbcos com/cardmanagement/v1/simulate/incremental' \\ \ data '{ "cardid" "8c6a53e0 83ad 4b76 b446 b300006a3e6a", "retrievalreferencenumber" "654492282074", "amount" "123" }' to simulate single message clearing a single message is a message type that uses real time verification and requires the cardholder to enter their pin to authorize and clear their transaction an example of a transaction that uses the docid\ foehddyznvdgf e2qnxl7 enpoint is an atm withdrawal simulate single message clearing request curl location 'https //sandbox crbcos com/cardmanagement/v1/simulate/single message clearing' \\ \ data '{ "processingcode" "purchase", "cardid" "8c6a53e0 83ad 4b76 b446 b300006a3e6a", "amount" "22", "merchantcountrycode" "us", "merchantname" "streamflix", "merchantstreet" "123 any st", "merchantcity" "anywhere", "merchantstate" "ny", "merchantpostalcode" "10001", "cardnetwork" "visa", "additionalamounts" \[ { "amounttype" "unknown", "accounttype" "notspecified", "amount" "10" } ] } ' to simulate single message reversal this endpoint allows you to create a reversal transaction to a single message clearing transaction for example, use the docid\ o5jr5y2scriic2hagqxgl endpoint to simulate a purchase and then simulate a return with the single message reversal simulate single message reversal request curl location 'https //sandbox crbcos com/cardmanagement/v1/simulate/single message reversal' \\ \ data '{ "amount" "22", "processingcode" "purchase", "cardid" "8c6a53e0 83ad 4b76 b446 b300006a3e6a", "merchantcountrycode" "us", "merchantname" "streamflix", "merchantstreet" "123 any st", "merchantcity" "anywhere", "merchantstate" "ny", "merchantpostalcode" "10001", "cardnetwork" "visa", "additionalamounts" \[ { "amounttype" "unknown", "accounttype" "notspecified", "amount" "10" } ] } '