English
Introduction

Pass2U offer the standardized interface in mobile app and website for Pass2U Checkout Service. It is able to be redeemed and rewarded by merchants with customers. Also, we can help you integrate Pass2U Checkout Service into your existing POS or create your own brand checkout service.
Technical Platform
  • RESTful JSON web services via HTTPS connections
  • Pass2U Runs a Series of Services on AWS
  • Pass2U Takes PCI DSS(Payment Card Industry Data Security Standard Standard) to Protect Your Data
Getting Started
In order to get started, you’ll need to do the following steps on Pass2U:
  • Register as a Pass2U account
  • Contact Pass2U Support via contact@micromacro.com.tw before we generate the API Key for you

  • Design your Pass Model viewing on Pass2U and set up campaigns for multiple checkout scenarios to be redeemed by Pass2U Checkout Service
  • Use public download link, Email Service, SMS Service or Pass2U Pass Distribution APIs to generate and distribute your passes
API Key Security
Pass2U uses 32-characters length of Base64 encoded string as API Key to authenticate request. The API Key must be included in all API requests to Pass2U server in header ‘Authorization’ like the following sample: x-api-key: e6a45207817bb8e9b1f3e67bb696067c
API Key should not be shared outside of your company
API Key allows access to your private data in Pass2U. They should not be shared outside of your company. If you have to change the API Key, please contact us to change your API Key.
Pass2U Checkout Service APIs User Guide

The Pass2U Checkout Service APIs provides a series of RESTful programmatic ways to interact with the Pass2U platform in order to check the validity of the pass,Cancel the used record of the pass, and more.
2.0
Version
Oct 02, 2017
Released
Get redeemable campaigns about the checkout account

Get the redeemable campaigns that be set up with the checkout account.
URL Structure
GET to https://api.pass2u.net/v2/checkout/models?account={checkoutAccount}
URL Parameters
Name Type Required Description
checkoutAccount String Yes You have created the checkout account under your Pass2U account.
HTTP Request Headers
x-api-key {API_Key}
HTTP Request Body
    none
		
Example Response Body
Status: 200 OK , Return redeemable models successufully
    [{
			"campaigns": [{
					"name": "Get 10% discount",
					"id": 381
				},
				{
					"name": "Get a cup of drink",
					"id": 382
				},
				{
					"name": "Get 20% discount",
					"id": 383
				}
			],
			"modelId": 1248,
			"name": "Cake Shop Loyalty Card"
		}, {
			"campaigns": [{
					"name": "12/10 Lession",
					"id": 355
				},
				{
					"name": "12/11 Lession",
					"id": 356
				}
			],
			"modelId": 1250,
			"name": "Cake Shop Cooking Class"
		}]
		
Name Description
campaignName The description of the checkout campaign name.
campaignId The unique identifier of the checkout campaigns under your Pass2U account.
modelId The unique identifier of the pass model. it has been set up related checkout campaigns with this checkout account.
name The name of the pass name.
The following figure shows the recommended steps that occur when you request the checkout campaign list

header_fields_order_sample

First, merchants need to choose the pass model which the customers want to use. If the pass have different redemption campaigns can also be used to identify different redemption purposes, you should be list the campaigns.

Error Codes
HTTP Status Code Error Message
401 Unauthorized API key is not valid. This account is not valid. No admin account.
404 Not Found This account is not assigned for any campaign.
500 Internal Error Internal error.
Redeem the pass(One-time redemption)

Check the validity of the barcode in the checkout campaign. For example, the same pass can be used to redeem for a discount campaign or a free drink campaign.
URL Structure
POST to https://api.pass2u.net/v2/checkout/models/{modelId}/campaigns/{campaignId}/barcodes/{barcode}/records?account={checkoutAccount}
URL Parameters
Name Type Required Description
modelId String Yes The unique identifier of the pass model. it has been set up related checkout campaigns with this checkout account.
campaignId String Yes The unique identifier of the checkout campaigns under your Pass2U account.
barocde String Yes The Information specific to the pass distribution’s barcode.
checkoutAccount String Yes The checkout account under your Pass2U account. It be set the related checkout campaign with the pass model
HTTP Request Headers
x-api-key {API_Key}
HTTP Request Body
none
Example Response Body
content-type application/json
location https://api.pass2u.net/v2/checkout/models/1185/campaigns/341
/barcodes/63873671/records/273
Returns HTTP response code 201, if the barcode is redeemed successfully. if the checkout account can cancel the used record of the barcode, the function URL will be shown in Location header.
{
		"distributionId":"T2bzXfEuEFXx",
		"unredeemable":true,
		"redeemedAt":"2017-09-29T15:38:44",
		"barcode":"63873671"
	}
Name Description
distributionId The unique identifier of the created pass distribution.
unredeemable The checkout account can cancel the used record of the barcode.
redeemedAt Time of redemption. ISO-8601 date format.
barcode The Information specific to the pass distribution’s barcode.
The following figure shows the recommend steps that occur when you request to redeem the pass:

header_fields_order_sample

Use the camera, barcode scanner or keyboard to enter and redeem the pass. If the customer want to unredeem the pass, the unredemption URL will include a Location header. The premise is that the checkout account have been authorized to improve if the checkout account need to cancel the used record.

Error Codes
HTTP Status Code Error Message
400 Bad Request modelId, campaignId, or barcode must be assigned.
401 Forbidden The pass is expired. The pass is voided.
The pass of the TickeBao order is refunded.
The pass of the TickeBao order is redeemed.
No TicketBao order details for this pass.
This campaign is not enabled.
This campaign does not start yet.
This campaign ends already.
This account is not assigned for the campaign.
The pass was not redeemed. This account is not allowed to redeem.
Point / credit / stamp campaign is not supported yet
404 Bad Request This account is not assigned for any campaign. Not valid barcode. This campaign is not found.
500 Internal Error Internal error
Unredeem the pass(One-time redemption)

URL Structure
DELETE to https://api.pass2u.net/v2/checkout/models/{modelId}/campaigns/{campaignId}/barcodes/{barcode}/records?account={checkoutAccount}
URL Parameters
Name Type Required Description
modelId String Yes The unique identifier of the pass model. it has been set up related checkout campaigns with this checkout account.
campaignId String Yes The unique identifier of the checkout campaigns under your Pass2U account.
barcode String Yes The Information specific to the pass distribution’s barcode.
HTTP Request Headers
x-api-key {API_Key}
HTTP Request Body
none
Example Response Body
Status: 204 No Content, The barcode is unredeemed successfully
none
The following figure shows the recommend steps that occur when you request to unredeem the pass:
Error Codes
HTTP Status Code Error Message
400 Bad Request modelId, campaignId, or barcode must be assigned.
401 Forbidden The pass is expired. The pass is voided.
The pass of the TickeBao order is refunded.
The pass of the TickeBao order is redeemed.
No TicketBao order details for this pass.
This campaign is not enabled.
This campaign does not start yet.
This campaign ends already.
This account is not assigned for the campaign.
The pass was not redeemed. This account is not allowed to redeem.
Point / credit / stamp campaign is not supported yet
404 Bad Request This account is not assigned for any campaign. Not valid barcode. This campaign is not found.
500 Internal Error Internal error