Drains the entire balance from a DataCandy gift or loyalty card in a single operation. No Amount is required β the full available balance is removed. No commit or cancel follow-up is needed after a successful empty.
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 Empty Card 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.
Full Balance Drain β No Amount Required
This endpoint removes the entire available balance from the card in a single operation. No Amount field is sent. The response will return balanceAmount and totalBalanceAmount of 000000000000 upon success. No transactionConfirmationNumber is returned β no commit or cancel follow-up is required.
Quebec Merchants Only β Maximum Remaining Balance of $5.00
This transaction is authorized for merchants in Quebec only, and solely when the remaining balance on the card is equal to or less than $5.00. Attempting to empty a card whose balance exceeds this threshold, or from a merchant outside Quebec, will result in a declined transaction.
All parameters are passed inside the Base64-encoded payload form field. Raw body format: auth-api-key=<key>&payload=<base64>. No Amount is sent for this endpoint. For terminal transactions (InputType=N), send CardNumber as 40 space characters and ExpirationDate as 4 space characters. This endpoint has no optional fields.
Required fields
The example below uses the test endpoint and a sandbox API key, and shows an E-Commerce (InputType=I) empty card operation. Replace credentials and base URL before going live.
Always returned
Conditionally returned
The following codes are most relevant to this endpoint. For the complete catalogue see the Return Code Index.