Create a Transaction Intent
Create a Transaction Intent
PUT
https://api.pos.zmyle.de/service/v1.1/transaction_intents
Create a new transaction intent. This will reserve funds on a gift card and hold them for you for redeeming. You can then commit the action by confirming the transaction intent. If you do not confirm nor cancel the transaction intent then the funds will automatically be released back into the gift card after some time (usually 30 minutes).
Request Body
Name | Type | Description |
---|---|---|
giftcardId | string | Unique ID of the gift card that you want to redeem. |
accessToken | string | Access token of the gift card that you want to redeem. |
amount | integer | Amount that you want to redeem. Must be a positive integer representing a money amount in the smallest currency unit. May not exceed the gift card's available balance. |
metadata | object | A set of key-value pairs that you can attach to this transaction intent. This metadata will be copied into the gift card transaction upon confirmation. |
This endpoint supports idempotency.
Example Request
Response Error Codes
error code | reason |
api:io:missingRequiredParam | A required parameter is missing. |
api:io:malformedNumber | The amount is not a positive integer. |
api:io:negativeNumber | The amount is not a positive integer. |
api:io:malformedId | The gift card ID is not right. |
api:io:malformedToken | The access token is not right. |
api:biz:noSuchGiftcard | The API could not find the gift card. This either means that such a gift card simply does not exist, or that you are not authorized to access this gift card at all (not your gift card or not your network). |
api:biz:notAuthorizedToRedeemGiftcard | You don't have permission to redeem this gift card. |
api:biz:unpaidGiftcard | The gift card was not paid yet. |
api:biz:insufficientFunds | The amount you provided exceeds the available balance of the gift card. |
api:biz:retailerStatus | Your account is not in good standing. |
Last updated