Gift Card - API Methods
Gift Card API
The Gift Card Suite includes an API for external interaction with creation, charging, querying, and re-loading gift cards.
This API is an extension of the Magento API (SOAP web service) and users and API keys are managed in the administration section of Magento.
These are the methods provided by the Gift Card Suite.
- Balance: This method requires a gift card number in order to return the gift card balance. If the card is not valid it will return a fault ‘Invalid Card’.
- Charge: This method requires both a gift card number and an amount to be charged to the card. This will deduct funds from the cards balance and also create a payment record for that gift card that can be viewed in the Magento Administration Panel. This will also return a fault value if the card is not valid. You should check the cards balance before charging.
- Validate: This method requires a gift card number. It simply returns if the card is valid or not.
- Add: This method requires an amount. This creates a new gift card. This is for purchasing gift card externally to be used on the site. This method will return the new gift card number. A fault will also be thrown if a new card cannot be created.
- Reload: This method requires both a gift card number and an valid amount. This method aims to reload a gift card with more funds. If the call is successful then it will return the updated card details. If there is an error it will return a fault value.
Example of PHP executing an API Call
This is a simple SOAP service, and most languages support these services.
To make an integration with your particular system, please consult a developer or the documentation for making calls to SOAP services in your language.