Redeems (debits) a specified amount from a DataCandy gift or loyalty card balance at point of sale. Returns a transactionConfirmationNumber that must be saved β a follow-up call to /v1/datacandy/completeCancel is required to commit or cancel the redemption. If the card balance is lower than the requested amount, the remainingAmount indicates the outstanding balance the customer must pay by another method.
API Key
Generate your API key from the Payments Manager: Administrator Client β API Key β Add New Key. Pass it as auth-api-key in every request.
Company & Merchant Numbers
Your CompanyNumber (5-digit) and MerchantNumber (8-digit) are issued by PayFacto during onboarding. Both are required on every DataCandy Redemption request.
Environment Base URL
Test: https://test.api.payfacto.cloud/v1 | Production: Provided by the PayFacto Integration team upon certification.
Request Format β Base64-Encoded Payload
Requests use HTTP POST with an application/x-www-form-urlencoded body. Assemble all parameters as a cleartext query string, Base64-encode it, then send: auth-api-key={key}&payload={base64}. For terminal transactions (InputType=N), send CardNumber as 40 space characters and ExpirationDate as 4 space characters.
DataCandy Gift & Loyalty Cards
DataCandy is a gift and loyalty card solution integrated through PayFacto. All DataCandy endpoints operate on cards identified by CardNumber. DataCandy card transactions are identified by card type F (Datacandy/fidelity) in the response. Refer to the DataCandy documentation for account type numbers and card program specifics.
Transaction Confirmation Number
The transactionConfirmationNumber returned in the response must be saved. It is required to commit the redemption (Action=C) or cancel it (Action=A) via /v1/datacandy/completeCancel, and to unlock the card if it has been locked. Without this number, these follow-up operations cannot be performed.
Partial Redemption β Remaining Amount
If the card's available balance is lower than the requested Amount, the transaction will still be approved (returnCode=00) and the full available balance will be redeemed. The remainingAmount in the response indicates the outstanding amount the customer must pay by another method. Always check remainingAmount after a successful redemption.
All parameters are passed inside the Base64-encoded payload form field. Raw body format: auth-api-key=<key>&payload=<base64>. For terminal transactions (InputType=N), send CardNumber as 40 space characters and ExpirationDate as 4 space characters.
Required fields
Optional fields
The example below uses the test endpoint and a sandbox API key, and shows an E-Commerce (InputType=I) redemption. Replace credentials and base URL before going live. Remember to follow up with /v1/datacandy/completeCancel using the returned transactionConfirmationNumber.
Always returned
Conditionally returned
The following codes are most relevant to this endpoint. For the complete catalogue see the Return Code Index.