Update a Transaction Intent
Update a Transaction Intent
POST
/service/v1.1/transaction_intents/:intentId
You can update a transaction intent as long as it has the "NEEDS_CONFIRMATION"
status. This endpoint will always consider all possible body parameters. For example: if you provided metadata when creating the gift card, and you want to keep this metadata even after this update, then you must resubmit the metadata. Omitting the metadata will delete any previously attached metadata. The values as provided in an update represent the ultimate values in the transaction intent.
Path Parameters
intentId
string
Unique ID of the transaction intent.
Request Body
amount
integer
Updated amount that you want to redeem. You must provide this value, even if you don't actually change it.
metadata
object
A set of key-value pairs that you can attach to this transaction intent. Omitting this value will delete any previously attached metadata in this transaction intent.
{
"expiresAt": "20171127T052256Z",
"statementDescriptor": "MegaStore",
"retailerId": "15h3k83g45anfnwibyie",
"amount": 200,
"giftcardId": "18jja4mf08fn08f7gp9l",
"id": "18k78hj3e2j65686vhipw560u6sm",
"status": "NEEDS_CONFIRMATION",
"createdAt": "20171127T045256Z",
"currency": "EUR",
"metadata": {
"store": "megastore-filiale-holzweg",
"receiptNumber": "Bon 2017-79732"
}
}
Example Request
curl -X POST https://posapi.zmyledemo.de/service/v1.1/transaction_intents/18k78hj3e2j65686vhipw560u6sm \
-u {api_key}:{api_secret}
-d '{"amount": 200,"metadata": {"store": "megastore-filiale-holzweg","receiptNumber": "Bon 2017-79730"}}'
Error Response Codes
error code
reason
api:io:missingRequiredParam
A required parameter is missing.
api:io:malformedId
The transaction intent ID is not right.
api:io:negativeNumber
The amount is not a positive integer.
api:io:malformedNumber
The amount is not a positive integer.
api:biz:noSuchTransactionIntent
The API could not find the transaction intent.
api:biz:transactionIntentStatus
This transaction intent cannot be updated b/c its status does not allow updates.
api:biz:insufficientFunds
The amount you provided exceeds the available balance of the gift card.
Last updated
Was this helpful?