Digital Wallet Token Simulations

Digital Wallet Token simulations are intended to mock the usage of provisioning a card to a digital wallet. A successful simulation call will return a 202 status. An object id will not be returned, but you will receive a digital_wallet_token.create webhook with the object id. This object id can be used on the /digital_wallet_token/:id endpoint. There is currently one simulation below.

Simulation typeToken message typeExplanation
digital_wallet_token.provisioningprovisioningSimulate a card getting added to a digital wallet

Create a Digital Wallet Token Simulation

Initiate a Digital Wallet Token simulation.

POST https://api.sandbox.treasuryprime.com/simulation

Digital Wallet Token Request Body

Provisioning

ParameterTypeRequired?Description
card_idstringRequiredID of the card to use as the source for simulated tokens.
fulfillmentobjectAn object that defines additional fields for fulfillment of the token.
token_service_providerobjectAn object that defines additional fields for requestor of the token.

Fulfillment Sub-Object

ParameterTypeDescription
statusstringProvisioning status of the token. One of decision_green, decision_red, decision_yellow, rejected, or provisioned.

Token Service Provider Sub-Object

ParameterTypeDescription
token_requestor_namestringName of the token requestor within the card network. One of APPLE_PAY or ANDROID_PAY.
token_requestor_idstringUnique numerical identifier of the digital wallet token requestor within the card network. These IDs map to a token_requestor_name. 50110030273 for Apple Pay, 50120834693 for Google Pay, and 50139059239 for Samsung Pay.

Example Request

$ curl -u $API_KEY_ID:$API_SECRET_KEY https://api.sandbox.treasuryprime.com/simulation \
    -H 'Content-Type: application/json' \
    -d '{
          "type": "digital_wallet_token.provisioning",
          "simulation": {
            "card_id": "card_104",
            "fulfillment": {
                 "status": "provisioned"
            },
            "token_service_provider": {
                "token_requestor_name": "APPLE_PAY",
                "token_requestor_id": "50110030273"
            }
          }
        }'

Example Response

Success

There will be no response body. The response code will be a 202 - accepted

Error

{
 "error": "Simulation not implemented for digital_wallet_token.not_implemented_event"
}