{"swagger":"2.0","paths":{"/purchase":{"post":{"tags":["1foryou"],"summary":"Purchase a 1FORYOU voucher","operationId":"1foryouGetVoucher","consumes":[],"parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/1foryouPurchaseRequest"}}],"responses":{"200":{"description":"Status 200","schema":{"$ref":"#/definitions/1foryouPurchaseResponse"}}},"x-auth-type":"Application & Application User","x-throttling-tier":"Unlimited"}},"/redeem":{"post":{"tags":["1foryou"],"summary":"Redeem a 1FORYOU voucher. A partial amount or the full amount can be redeemed. If only a partial amount, the remaining value is transferred to a new voucher.","operationId":"1foryouPartialRedeem","consumes":[],"parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/1foryouRedeemRequest"}}],"responses":{"200":{"description":"Status 200","schema":{"$ref":"#/definitions/1foryouRedeemResponse"}},"400":{"description":"Status 400","schema":{"$ref":"#/definitions/IncompletePayloadError"}},"401":{"description":"Status 401","schema":{"$ref":"#/definitions/AuthenticationError"}},"403":{"description":"Status 403","schema":{"$ref":"#/definitions/ForbiddenError"}},"429":{"description":"Status 429","schema":{"$ref":"#/definitions/RateLimitingError"}},"500":{"description":"Status 500","schema":{"$ref":"#/definitions/UnclassifiedError"}},"503":{"description":"Status 503","schema":{"$ref":"#/definitions/LimitError"}}},"x-auth-type":"Application & Application User","x-throttling-tier":"Unlimited"}},"/refundRedemption":{"post":{"tags":["1foryou"],"summary":"Refund a prior redemption. The value of the amount previously redeemed and requested for a refund is transferred to a new voucher.","operationId":"1foryouRefundRedeem","consumes":[],"parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/1foryouRefundRedeemRequest"}}],"responses":{"200":{"description":"Status 200","schema":{"$ref":"#/definitions/1foryouRefundRedeemResponse"}},"400":{"description":"Status 400","schema":{"$ref":"#/definitions/IncompletePayloadError"}},"401":{"description":"Status 401","schema":{"$ref":"#/definitions/AuthenticationError"}},"403":{"description":"Status 403","schema":{"$ref":"#/definitions/ForbiddenError"}},"429":{"description":"Status 429","schema":{"$ref":"#/definitions/RateLimitingError"}},"500":{"description":"Status 500","schema":{"$ref":"#/definitions/UnclassifiedError"}},"503":{"description":"Status 503","schema":{"$ref":"#/definitions/LimitError"}}},"x-auth-type":"Application & Application User","x-throttling-tier":"Unlimited"}},"/reverseRedemption":{"post":{"tags":["1foryou"],"summary":"Reverse a prior redemption. Action this operation within 90 seconds of a /redeem operation. The value of the redemption is reversed and made available on the same voucher used for the redemption.","operationId":"1foryouReverseRedeem","consumes":[],"parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/1foryouReverseRedeemRequest"}}],"responses":{"200":{"description":"Status 200","schema":{"$ref":"#/definitions/1foryouReverseRedeemResponse"}},"400":{"description":"Status 400","schema":{"$ref":"#/definitions/IncompletePayloadError"}},"401":{"description":"Status 401","schema":{"$ref":"#/definitions/AuthenticationError"}},"403":{"description":"Status 403","schema":{"$ref":"#/definitions/ForbiddenError"}},"429":{"description":"Status 429","schema":{"$ref":"#/definitions/RateLimitingError"}},"500":{"description":"Status 500","schema":{"$ref":"#/definitions/UnclassifiedError"}},"503":{"description":"Status 503","schema":{"$ref":"#/definitions/LimitError"}}},"x-auth-type":"Application & Application User","x-throttling-tier":"Unlimited"}}},"info":{"title":"1foryou","version":"1.0.0"},"consumes":["application/json"],"produces":["application/json"],"definitions":{"1foryouPurchaseRequest":{"type":"object","required":["requestId","acquirer","amount","account","accountNumber"],"properties":{"requestId":{"type":"string","description":"Client-provided unique transaction identifier","example":"bacdeae9-baa0-4da9-bd3f-284c44c14cdf"},"amount":{"type":"number","description":"The value (minor denomination) of the voucher to be purchased","example":"1000"},"acquirer":{"type":"object","description":"Container of information about the entity which is transacting on behalf of a customer","properties":{"account":{"type":"object","properties":{"accountNumber":{"type":"string","example":"100100100011","description":"The account number that was provided to you by your integration specialist. Note that the account number for transacting against sandbox or production may differ"}}},"entityTag":{"type":"string","description":"Client-provided metadata about the transaction. The content will be agreed upon with your integration specialist","example":"entityReferenceTag"}}}}},"1foryouRedeemRequest":{"type":"object","required":["requestId","voucherPin","amount","customerContact","acquirer"],"properties":{"requestId":{"type":"string","example":"00df0e82-830f-40ce-b7a2-5f5700eda376","description":"Client-provided unique transaction identifier"},"voucherPin":{"type":"string","example":"1109167509116501","description":"The pin of the voucher to be redeemed"},"amount":{"type":"number","example":"900","description":"The value (minor denomination) of the voucher to be redeemed. 0 will redeem the full value of the voucher. If partially redeemed, a new voucher will be issued for the balance of the original voucher"},"customerContact":{"type":"object","description":"Receipt delivery definition of the customer to whom the change voucher will be issued. The requirement will be in accordance with your agreement for delivery of the receipt. A null value should be passed if not required","properties":{"mechanism":{"type":"string","description":"The selected preferred communication mechanism","enum":["SMS"]},"address":{"type":"string","description":"The appropriate address (per selected delivery mechanism) of the customer","example":"27835249137"}}},"acquirer":{"type":"object","properties":{"account":{"type":"object","properties":{"accountNumber":{"type":"string","example":"100100100011","description":"The account number that was provided to you by your integration specialist. Note that the account number for transacting against sandbox or production may differ"}}},"entityTag":{"type":"string","description":"Client-provided metadata about the transaction. The content will be agreed upon with your integration specialist","example":"entityReferenceTag"}}}}},"1foryouRefundRedeemRequest":{"type":"object","required":["requestId","redemptionTransactionId","amount","customerContact","acquirer"],"properties":{"requestId":{"type":"string","example":"00df0e82-830f-40ce-b7a2-5f5700eda376","description":"Client-provided unique transaction identifier"},"redemptionTransactionId":{"type":"string","example":732557782,"description":"Transaction identifier of the redemption transaction that should be refunded"},"amount":{"type":"number","example":"1000","description":"The value (minor denomination) of the voucher to be refunded"},"customerContact":{"type":"object","description":"Receipt delivery definition of the customer to whom the refunded voucher will be issued. The requirement will be in accordance with your agreement for delivery of the receipt. A null value should be passed if not required","properties":{"mechanism":{"type":"string","description":"The selected preferred communication mechanism","example":["SMS"],"enum":["SMS"]},"address":{"type":"string","description":"The appropriate address (per selected delivery mechanism) of the customer","example":"27835249137"}}},"acquirer":{"type":"object","description":"Container of information about the entity which is transacting on behalf of a customer","properties":{"account":{"type":"object","description":"Container of information about the account of the acquirer","properties":{"accountNumber":{"type":"string","description":"The account number that was provided to you by your integration specialist. Note that the account number for transacting against sandbox or production may differ"}}},"entityTag":{"type":"string","description":"Client-provided metadata about the transaction. The content will be agreed upon with your integration specialist","example":"entityReferenceTag"}}}}},"1foryouReverseRedeemRequest":{"type":"object","required":["requestId","redemptionTransactionId","acquirer","amount","account","accountNumber"],"properties":{"requestId":{"type":"string","description":"Client-provided unique transaction identifier","example":"bacdeae9-baa0-4da9-bd3f-284c44c14cdf"},"redemptionTransactionId":{"type":"number","description":"Transaction identifier of the redemption transaction that should be reversed","example":"732557782"},"acquirer":{"type":"object","description":"Container of information about the entity which is transacting on behalf of a customer","properties":{"account":{"type":"object","description":"Container of information about the account of the acquirer","properties":{"accountNumber":{"type":"string","example":"100100100011"}}},"entityTag":{"type":"string","description":"Client-provided metadata about the transaction. The content will be agreed upon with your integration specialist","example":"entityReferenceTag"}}}}},"1foryouPurchaseResponse":{"type":"object","required":["requestId","responseCode","responseMessage","transactionId","transactionDate","voucher","pin","serialNumber","expiryDate","amount","acquirer","account","accountNumber","balance","availableBalance"],"properties":{"requestId":{"type":"string","example":"bacdeae9-baa0-4da9-bd3f-284c44c14cdf","description":"Client-provided unique transaction identifier that was received in the request"},"responseCode":{"type":"number","description":"Back-end system response code that indicates success or failure during processing","example":0},"responseMessage":{"type":"string","example":"Success","description":"Back-end system information that describes the response code"},"transactionId":{"type":"string","example":"732558211","description":"Back-end system transaction reference id"},"transactionDate":{"type":"string","example":"2020-04-24T13:53:23.123+02:00","description":"Date and time at which back-end system transaction processing was initiated"},"voucher":{"type":"object","description":"Container of information about the voucher that was purchased - null if failed","properties":{"pin":{"type":"string","example":"1109167509116501","description":"Redeemable pin"},"serialNumber":{"type":"string","example":"20200428041014590000","description":"Voucher serial number"},"expiryDate":{"type":"string","example":"28-04-2023 04:10:14","description":"Date on which the voucher is invalidated"},"amount":{"type":"number","example":1000,"description":"The value (minor denomination) of the voucher"}}},"acquirer":{"type":"object","description":"Container of information about the entity which is transacting on behalf of a consumer","properties":{"account":{"type":"object","description":"Container of information about the account of the acquirer","properties":{"accountNumber":{"type":"string","example":"100100100011","description":"The account number that was provided in the request"},"balance":{"type":"number","example":"-1000","description":"The account balance (minor denomination) after completion of the transaction"},"availableBalance":{"type":"number","example":"9000","description":"The balance (minor denomination) that is available for trading after the transaction was completed"}}},"entityTag":{"type":"string","description":"Client-provided metadata about the transaction. The content will be agreed upon with your integration specialist","example":"entityReferenceTag"}}}}},"1foryouRedeemResponse":{"type":"object","required":["requestId","responseCode","responseMessage","transactionId","transactionDate","changeVoucher","pin","serialNumber","expiryDate","amount","acquirer","account","accountNumber","balance","availableBalance"],"properties":{"requestId":{"type":"string","example":"bacdeae9-baa0-4da9-bd3f-284c44c14cdf","description":"Client-provided unique transaction identifier that was received in the request"},"responseCode":{"type":"number","example":0,"description":"Back-end system response code that indicates success or failure during processing"},"responseMessage":{"type":"string","example":"Success","description":"Back-end system information that describes the response code"},"transactionId":{"type":"string","example":"732558211","description":"Back-end system transaction reference id"},"transactionDate":{"type":"string","example":"2020-04-24T13:53:23.123+02:00","description":"Date and time at which back-end system transaction processing was initiated"},"amount":{"type":"number","example":1000,"description":"The amount (minor denomination) that was redeemed from the voucher"},"changeVoucher":{"type":"object","description":"Container of information about the change voucher that was issued - null if failed or full value was redeemed","properties":{"pin":{"type":"string","example":"1109167509116501","description":"Redeemable pin"},"serialNumber":{"type":"string","example":"20200428041014590000","description":"Voucher serial number"},"expiryDate":{"type":"string","example":"28-04-2023 04:10:14","description":"Date on which the voucher is invalidated"},"amount":{"type":"number","example":1000,"description":"The value (minor denomination) of the voucher"}}},"acquirer":{"type":"object","description":"Container of information about the entity which is transacting on behalf of a consumer","properties":{"account":{"type":"object","description":"Container of information about the account of the acquirer","properties":{"accountNumber":{"type":"string","example":100100100011,"description":"The account number that was provided in the request"},"balance":{"type":"number","example":-100,"description":"The account balance (minor denomination) after completion of the transaction"},"availableBalance":{"type":"number","example":9900,"description":"The balance (minor denomination) that is available for trading after the transaction was completed"}}},"entityTag":{"type":"string","description":"Client-provided metadata about the transaction. The content will be agreed upon with your integration specialist","example":"entityReferenceTag"}}}}},"1foryouRefundRedeemResponse":{"type":"object","required":["requestId","responseCode","responseMessage","transactionId","transactionDate","voucher","pin","serialNumber","expiryDate","amount","acquirer","account","accountNumber","balance","availableBalance"],"properties":{"requestId":{"type":"string","example":"bacdeae9-baa0-4da9-bd3f-284c44c14cdf","description":"Client-provided unique transaction identifier that was received in the request"},"responseCode":{"type":"number","example":0,"description":"Back-end system response code that indicates success or failure during processing"},"responseMessage":{"type":"string","example":"Success","description":"Back-end system information that describes the response code"},"transactionId":{"type":"string","example":"732558211","description":"Back-end system transaction reference id"},"transactionDate":{"type":"string","example":"2020-04-24T13:53:23.123+02:00","description":"Date and time at which back-end system transaction processing was initiated"},"voucher":{"type":"object","properties":{"pin":{"type":"string","example":"1109167509116501"},"serialNumber":{"type":"string","example":"20200428041014590000"},"expiryDate":{"type":"string","example":"28-04-2023 04:10:14"},"amount":{"type":"number","example":1000}}},"acquirer":{"type":"object","description":"Container of information about the entity which is transacting on behalf of a consumer","properties":{"account":{"type":"object","description":"Container of information about the account of the acquirer","properties":{"accountNumber":{"type":"string","example":100100100011,"description":"The account number that was provided in the request"},"balance":{"type":"number","example":-1000,"description":"The account balance (minor denomination) after completion of the transaction"},"availableBalance":{"type":"number","example":-900,"description":"The balance (minor denomination) that is available for trading after the transaction was completed"}}},"entityTag":{"type":"string","description":"Client-provided metadata about the transaction. The content will be agreed upon with your integration specialist","example":"entityReferenceTag"}}}}},"1foryouReverseRedeemResponse":{"type":"object","required":["requestId","responseCode","responseMessage","transactionId","transactionDate","voucher","pin","serialNumber","expiryDate","acquirer","account","accountNumber","balance","availableBalance"],"properties":{"requestId":{"type":"string","example":"bacdeae9-baa0-4da9-bd3f-284c44c14cdf","description":"Client-provided unique transaction identifier that was received in the request"},"responseCode":{"type":"number","example":0,"description":"Back-end system response code that indicates success or failure during processing"},"responseMessage":{"type":"string","example":"Success","description":"Back-end system information that describes the response code"},"transactionId":{"type":"string","example":"732558211","description":"Back-end system transaction reference id"},"transactionDate":{"type":"string","example":"2020-04-24T13:53:23.123+02:00","description":"Date and time at which back-end system transaction processing was initiated"},"acquirer":{"type":"object","description":"Container of information about the entity which is transacting on behalf of a consumer","properties":{"account":{"type":"object","description":"Container of information about the account of the acquirer","properties":{"accountNumber":{"type":"string","example":100100100011,"description":"The account number that was provided in the request"},"balance":{"type":"number","example":-1000,"description":"The account balance (minor denomination) after completion of the transaction"},"availableBalance":{"type":"number","example":9000,"description":"The balance (minor denomination) that is available for trading after the transaction was completed"}}},"entityTag":{"type":"string","description":"Client-provided metadata about the transaction. The content will be agreed upon with your integration specialist","example":"entityReferenceTag"}}}}},"IncompletePayloadError":{"type":"object","properties":{"fault":{"type":"object","properties":{"code":{"type":"number"},"type":{"type":"string"},"message":{"type":"string"},"description":{"type":"string"}}}},"example":{"fault":{"code":102511,"type":"Status report","message":"Runtime Error","description":"Incomplete payload"}}},"AuthenticationError":{"type":"object","properties":{"fault":{"type":"object","properties":{"code":{"type":"number"},"type":{"type":"string"},"message":{"type":"string"},"description":{"type":"string"}}}},"example":{"fault":{"code":900901,"type":"Status report","message":"Runtime Error","description":"Invalid credentials"}}},"ForbiddenError":{"type":"object","properties":{"fault":{"type":"object","properties":{"code":{"type":"number"},"type":{"type":"string"},"message":{"type":"string"},"description":{"type":"string"}}}},"example":{"fault":{"code":900906,"type":"Status report","message":"Runtime Error","description":"No matching resource found in the API for the given request"}}},"RateLimitingError":{"type":"object","properties":{"fault":{"type":"object","properties":{"code":{"type":"number"},"type":{"type":"string"},"message":{"type":"string"},"description":{"type":"string"}}}},"example":{"fault":{"code":900800,"type":"Status report","message":"Runtime Error","description":"Message throttled out"}}},"UnclassifiedError":{"type":"object","properties":{"fault":{"type":"object","properties":{"code":{"type":"number"},"type":{"type":"string"},"message":{"type":"string"},"description":{"type":"string"}}}},"example":{"fault":{"code":900900,"type":"Status report","message":"Runtime Error","description":"Unclassified authentication failure"}}},"LimitError":{"type":"object","properties":{"fault":{"type":"object","properties":{"code":{"type":"number"},"type":{"type":"string"},"message":{"type":"string"},"description":{"type":"string"}}}},"example":{"fault":{"code":900801,"type":"Status report","message":"Runtime Error","description":"Hard limit exceeded"}}}},"host":"api.flashswitch.flash-group.com","basePath":"/1foryou/1.0.0","schemes":["https","http"],"securityDefinitions":{"default":{"type":"oauth2","authorizationUrl":"https://api-wso2.flash-group.com:443/authorize","flow":"implicit","scopes":{}}}}