Cards/Wallet API Integration
This document is focused on the activities required from a technology perspective to integrate partner systems with the gift card / wallet program systems.
The document would be best suited to be used by the partner IT teams to support integration.
Scope
The scope of this document covers:
Checking the balance of a gift card
Redeeming
Top Up (Sale)
Check Balance
POST
/api/interface/gift-card/check
Method
EndpointURI
Main API endpoint provided separately
URI
interface/gift-card/check
Call Type
POST
HTTP Address
<endpoint>/api/interface/gift-card/check
Request Headers
Verb
POST
Authorisation
HTTP Bearer (access-token)
Content-Type
application/json
Request Body
cardNumber
string
The gift card number
Yes
Request Body Example
Responses
403
Invalid Bearer token
400
cardNumber is missing; cardNumber is not a string; cardNumber is not a numeric string;
200
Gift card found
404
Gift card not found
400
Found gift card is not active
400
Found gift card has expired
400
The access token provided has insufficient permissions to retrieve gift card. Contact UpCo to resolve
Successful Response Example
Redeem
Redem can only be performed with amount equal or smaller than the card balance
POST
/api/interface/gift-card/redeem
Method
EndpointURI
Main API endpoint provided separately
URI
interface/gift-card/redeem
Call Type
POST
HTTP Address
<endpoint>/api/interface/gift-card/redeem
Request Headers
Verb
POST
Authorisation
HTTP Bearer (access-token)
Content-Type
application/json
Request Body
cardNumber
string
The gift card number
Yes
amount
number
The amount to be redeemed
Yes
Request Body Example
Response
403
Invalid Bearer token
400
cardNumber is missing;
cardNumber is not a string;
cardNumber is not a numeric string;
amount is missing;
amount is not a number;
amount is not a positive number;
201
Successful redemption transaction created
404
Gift card not found
400
Found gift card is not active
400
Found gift card has expired
400
The access token provided has insufficient permissions to retrieve gift card. Contact UpCo to resolve
400
The amount to be redeemed exceeds the balance of the found gift card
400
The gift card was found but the redemption transaction could not be completed.
Successful Response Example
Top Up
POST
/api/interface/gift-card/top-up
Method
EndpointURI
Main API endpoint provided separately
URI
interface/gift-card/top-up
Call Type
POST
HTTP Address
<endpoint>/api/interface/gift-card/top-up
Request Headers
Verb
POST
Authorisation
HTTP Bearer (access-token)
Content-Type
application/json
Request Body
cardNumber
string
The gift card number
Yes
amount
number
The amount to be redeemed
Yes
Request Body Example
Response
403
Invalid Bearer token
400
cardNumber is missing;
cardNumber is not a string;
cardNumber is not a numeric string;
amount is missing; amount is not a number;
amount is not a positive number;
201
Successful top up transaction created
404
Gift card not found
400
Found gift card is not active
400
Found gift card has expired
400
The access token provided has insufficient permissions to retrieve gift card. Contact UpCo to resolve
400
The gift card was found but the top up transaction could not be completed.
Successful Response Example
Last updated