Update Function code (Without publishing to card)

POST {{host}}/za/v1/cards/:cardkey/code

Save specified code to the specific card. Note: This allows you to save/stage the code to the card without publishing it. This implies that the code will not execute when a card transaction occurs.

Request Body

{"code"=>"// This function runs during the card transaction authorization flow.\n// It has a limited execution time, so keep any code short-running.\nconst beforeTransaction = async (authorization) => {\n    console.log(authorization);\n    return true;\n};\n\n// This function runs after a transaction.\nconst afterTransaction = async (transaction) => {\n    console.log(transaction)\n};\n\n// This function runs after a transaction.\nconst afterDecline = async (transaction) => {\n    console.log(transaction)\n};"}

HEADERS

KeyDatatypeRequiredDescription
Acceptstring