iOS SDK - Offers Module
Last updated: Sept 19th, 8:21pm
Use the endpoints of this module to retrieve and display offers made available to the mobile wallet users by WLW advertising networks, filter offer lists based on user preferences, activate offers for automatic redemption, and remove offers that are no longer desired.
Note: Within the offers module, offer campaign denotes an available offer that has not been activated by the user, while just offer designates an offer that the user has activated to make it viable for redemption.
Initialize Offers Facade
Prior to invoking any offers module endpoints:
- Create a new request object for the relevant coordinator.
- Implement the delegate for the coordinator to handle responses.
1PDOfferCoordinator *offerCoordinator = [[PDOfferCoordinator alloc] init];2 self.offerCoordinator = setDelegate:self];
retrieveAvailableOfferCampaignSummaries
Get only the minimum data describing each offer campaign that is available for the wallet, but not yet activated by the user.
Element | Value |
---|---|
Method | -(void) retrieveAvailableOfferCampaignSummaries:( PDRetrieveAvailableOfferCampaignSummariesRequest *)request; request - A request instance that specifies filtering parameters for the set of offer summaries to retrieve. |
Success Returns | void (^AvailableOfferCampaignSummariesRetrievalCompletionBlock( PDRetrieveAvailableOfferCampaignSummariesResponse *response); response - The set of offer campaign summaries matching the request criteria and status information related to the outcome of the call. Each campaign summary returned includes the following offer artifacts: Title , Summary , Thumbnail , and AdditionalInfo . |
Failure Returns | void (^AvailableOfferCampaignSummariesRetrievalFailureBlock)( PDPaydiantError *offerError); |
Configure user error messages for this call with the key: kUserErrorRetrieveAvailableOfferCampaignSummariesDomain
.
Error | Description |
---|---|
400 |
BAD_REQUEST - Offer customer suspended. |
500 |
INTERNAL_SERVER_ERROR Returned in the following use cases:- An internal server error occurred. - A processing error occurred. - Transaction not supported. |
retrieveAvailableOfferCampaignDetailWithAcceptancePartnerList
Gets the full content details for a specified offer campaign that is available for the wallet, but not yet activated by the user.
Element | Value |
---|---|
Method | -(void) retrieveAvailableOfferCampaignDetailWithAcceptancePartnerList:( PDRetrieveAvailableOfferCampaignDetailRequest *)request; request - Identifies the offer for which full detail is requested. |
Success Returns | void (^AvailableOfferCampaignDetailRetrievalCompletionBlock( PDRetrieveAvailableOfferCampaignDetailResponse *response); response - The entire body of data related to the requested offer campaign and its redemption criteria. |
Failure Returns | void (^AvailableOfferCampaignDetailRetrievalFailureBlock) PDPaydiantError *offerError);` |
Configure user error messages for this call with the key kUserErrorRetrieveAvailableOfferCampaignDetailWithAcceptancePartnerListDomain
.
Error | Description |
---|---|
400 |
BAD_REQUEST - Returned in the following use cases:- Offer customer suspended. - Specified offer could not be located. - Specified offer no longer exists. |
500 |
INTERNAL_SERVER_ERROR - Returned in the following use cases:- An internal server error occurred. - A processing error occurred. - Transaction not supported. |
retrieveMyOfferSummaries
Get only the minimum data describing each offer that the user has activated for eligibility in qualified transactions.
Element | Value |
---|---|
Method | -(void) retrieveMyOfferSummaries:( PDRetrieveMyOfferSummariesRequest *)request; request - Specifies filtering parameters for the set of offer summaries to retrieve. |
Success Returns | void (^MyOfferSummariesRetrievalCompletionBlock( PDRetrieveMyOfferSummariesResponse *response); response - The set of offer summaries matching the request criteria and status information related to the outcome of the call. Each offer summary returned includes the following offer artifacts: Title , Summary , Thumbnail , and AdditionalInfo . |
Failure Returns | void (^MyOfferSummariesRetrievalFailureBlock)( PDPaydiantError *offerError); |
Configure user error messages for this call with the key kUserErrorRetrieveMyOfferSummariesDomain
.
Error | Description |
---|---|
400 |
BAD_REQUEST - Offer customer suspended. |
500 |
INTERNAL_SERVER_ERROR - Returned in the following use cases:- An internal server error occurred. - A processing error occurred. - Transaction not supported. |
retrieveMyOfferDetailWithAcceptancePartnerList
Gets the full content details for a specified offer that the user has activated for eligibility in qualified transactions.
Element | Value |
---|---|
Method | -(void) retrieveMyOfferDetailWithAcceptancePartnerList:( PDRetrieveMyOfferDetailRequest *)request; request - Identifies the offer for which full detail is requested. |
Success Returns | void (^MyOfferDetailRetrievalCompletionBlock( PDRetrieveMyOfferDetailResponse *response); response - The entire body of data related to the requested offer campaign and its redemption criteria. |
Failure Returns | void (^MyOfferDetailRetrievalFailureBlock ( PDPaydiantError *offerError); |
Configure user error messages for this call with the key: kUserErrorRetrieveMyOfferDetailWithAcceptancePartnerListDomain
.
Error | Description |
---|---|
400 |
BAD_REQUEST - Returned in the following use cases:- Offer customer suspended. - Specified offer could not be located. - Specified offer no longer exists. |
500 |
INTERNAL_SERVER_ERROR - Returned in the following use cases:- An internal server error occurred. - A processing error occurred. - Transaction not supported. |
retrieveOfferCampaignSummaryUsingCouponCode
Gets the list of campaigns associated with a coupon code.
Coupons are a customer-agnostic offer type in the WLW platform that can be distributed to and used by customers through a variety of channels such as email and social media. If a wallet user obtains a coupon code and wants to convert it to an active offer for use in mobile wallet transactions, this method will find the associated campaign data needed.
Coupon codes are not required to be unique for an issuing partner, so it is possible to have multiple campaigns returned. However, a coupon code can only be associated with one active campaign per acceptance partner, so it may be helpful to set filter parameters in the request that specify the AP (merchant) and start/end dates to optimize the match.
Element | Value |
---|---|
Method | -(void) retrieveOfferCampaignSummaryUsingCouponCode:( PDRetrieveOfferCampaignSummaryUsingCouponCodeRequest *)request; request - Specifies the coupon code for which campaigns are requested and any parameters by which the returned list is to be filtered. |
Success Returns | void (^OfferCampaignSummaryRetrievalUsingCouponCodeCompletionBlock( PDRetrieveOfferCampaignSummaryUsingCouponCodeResponse *response); response - The set of offer campaign summaries that match the coupon code and filtering criteria in the request. |
Failure Returns | void (^OfferCampaignSummaryRetrievalUsingCouponCodeFailureBlock)( PDPaydiantError *offerError); |
Configure user error messages for this call with the key: kUserErrorRetrieveOfferCampaignSummaryUsingCouponCodeDomain
.
Error | Description |
---|---|
400 |
BAD_REQUEST - Returned in the following use cases:- Offer customer suspended. - Specified offer could not be located. - Specified offer no longer exists. |
500 |
INTERNAL_SERVER_ERROR - Returned in the following use cases:- An internal server error occurred. - A processing error occurred. - Transaction not supported. |
activateOffer
Creates a myOffer instance in the wallet from an available campaign or external coupon code, making the offer eligible for redemption in qualified transactions with this wallet.
Element | Value |
---|---|
Method | -(void) activateOffer:( PDActivateOfferRequest *)request; request - The object that identifies the offer campaign to be activated using either the offerCampaignUri , checkoutTokenValue , or couponCode , depending on the manner in which the offer was obtained by the wallet user. |
Success Returns | void (^OfferActivationCompletionBlock( PDActivateOfferResponse *)response; response - Returns an instance of the activated offer. |
Failure Returns | void (^OfferActivationFailureBlock)( PDPaydiantError *offerError); |
Configure user error messages for this call with the key kUserErrorActiateMyOfferDomain
.
Error | Description |
---|---|
404 |
The specified offer could not be located. |
410 |
The specified offer is no longer available. |
414 |
The specified offer is not redeemable. |
500 |
An internal server error occurred. |
cancelActivatedOffer
Release a previously activated offer, making it no longer eligible for use in a qualified transaction and returning it to available status.
Element | Value |
---|---|
Method | -(void) cancelActivatedOffer:(NSString *)offerUri; offerUri - WLW's unique identifier for the offer to be released. |
Success Returns | void (^CancelActivatedOfferCompletionBlock(); |
Failure Returns | void (^CancelActivatedOfferFailureBlock)( PDPaydiantError *offerError); |
Configure user error messages for this call with the key: kUserErrorCancelActivatedOfferDomain
.
Error | Description |
---|---|
404 |
The specified offer could not be located. |
410 |
The specified offer is no longer available. |
414 |
The specified offer is not redeemable. |
500 |
An internal server error occurred. |