REST API for online redemption
The issuerID (see account page -> profile info) and transID (see home -> coupon id) are known values
on your side.
They are 3 and 26 respectively in the example.
You will also get your secret and token in the merchant center. And you only need to compute code jwt (instruction and php example will be sent to registered members on email request).
Just let user key in SN and RN on your webpage and then do a POST to www.arcoup.com/redeem_online
You need to get SN RN values from them: They are serialNo=7 and receiptNo=A683783198 in the example.
You should see keyword "result" is true from the response if redeemed successfully.
$ curl -X POST -d "jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbiI6IkJtK2R2dWNOVVc0eWFHQTEiLCJzdGFtcCI6IjIwMjEtMDQtMjUifQ.gCkrOzrcc9sqoiQ_E7a5zp9RBIDaeFkgJrKCqcmrQu4&token=Bm+dvucNUW4yaGA1&issuerID=3&transID=26&serialNo=7&receiptNo=A683783198" https://www.arcoup.com/redeem_online
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 277 0 49 100 228 49 228 0:00:01 --:--:-- 0:00:01 807
[{"result":false,"message":"authorization fail"}]
$ curl -X POST -d "jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbiI6IkJtK2R2dWNOVVc0eWFHQTEiLCJzdGFtcCI6IjIwMjEtMDQtMjUifQ.gCkrOzrcc9sqoiQ_E7a5zp9RBIDaeFkgJrKCqcmrQu4&token=Bm+dvucNUW4yaGA1&issuerID=3&transID=26&serialNo=7&receiptNo=A683783198" https://www.arcoup.com/redeem_online
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 107 0 54 100 53 54 53 0:00:01 --:--:-- 0:00:01 145
[{"result":true,"message":"This ARCoup is now successfully redeemed on 2020-08-07"}]
$ curl -X POST -d "jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbiI6IkJtK2R2dWNOVVc0eWFHQTEiLCJzdGFtcCI6IjIwMjEtMDQtMjUifQ.gCkrOzrcc9sqoiQ_E7a5zp9RBIDaeFkgJrKCqcmrQu4&token=Bm+dvucNUW4yaGA1&issuerID=3&transID=26&serialNo=7&receiptNo=A683783198" https://www.arcoup.com/redeem_online
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 135 0 82 100 53 82 53 0:00:01 --:--:-- 0:00:01 375
[{"result":false,"message":"Sorry, this ARCoup # 76-1 is already redeemed on 2020-08-07 with Online_redemption"}]
Currently we don't have test account available, because we only have one very simple API.
You can test on a known ARCoup and get false result.
And then test the other case by forcing a true result condition on your webpage.