Selling Retail Gift Cards

API to purchase gift cards sent to a paymail wallet

Anypay offers automated purchases of major retail gift cards to over 250 American retail stores for re-selling directly in Bitcoin wallets. Direct sales of gift cards in Bitcoin wallets increases the spendable value of a person's bitcoins because they can use their Bitcoin instantly online or in person at stores such as Adidas, Home Depot, Apple and many more.

With the swipe of a button your wallet users can check out with BSV at their favorite stores instantly with zero waiting without ever leaving your wallet.

get
List of Available Retail Brands

https://pow.cards/api/giftcards/products
Get full list of available brands for purchase including branding guidelines, company name and description, brand image assets, amounts available for purchase and more.
Request
Response
Request
Response
200: OK
{
"products": {{
denominations: [
25,
500
],
shortDescription: "<p>Amtrak offers a more comfortable and convenient travel experience with free Wi-Fi on most trains, plenty of leg room and no middle seat. Amtrak operates more than 300 trains daily, connecting more than 500 destinations in 46 states, the District of Columbia and three Canadian Provinces, and reaches 400 additional destinations via connecting bus routes. See where the train can take you at Amtrak.com.<br></p>",
longDescription: "Amtrak offers a more comfortable and convenient travel experience with free Wi-Fi on most trains, plenty of leg room and no middle seat. Amtrak operates more than 300 trains daily, connecting more than 500 destinations in 46 states, the District of Columbia and three Canadian Provinces, and reaches 400 additional destinations via connecting bus routes. See where the train can take you at Amtrak.com.",
name: "Amtrak",
terms: "Gift Card issued by Amtrak, the National Railroad Passenger Corporation, and is redeemable for Amtrak transportation products/services (excludes food/beverages, other gift cards and tickets sold by third party providers). Card does not expire and no fees will be charged against the balance. Not refundable, reloadable or redeemable for cash unless required by law. Card has no value until activated. Please note Amtrak is not responsible for lost, stolen or damaged cards or unauthorized use. Purchase, use or acceptance of this card constitutes acceptance of the complete terms and conditions (including arbitration agreement and class action waiver) at Amtrak.com/giftcard. For balance inquiries, visit Amtrak.com/gift-card-balance or call 888-999-0016.",
disclaimer: "Amtrak is a registered service mark of the National Railroad Passenger Corporation.",
redemptionNote: null,
type: "Digital",
denominationType: "Variable",
meta: {
supportsApiBalanceChecks: false,
website: "www.amtrak.com",
colors: {
primary: "#558215",
secondary: "#ffffff",
primaryText: null,
secondaryText: null
}
},
media: {
faceplates: [{
name: "fp01",
path: "https://d13080yemosbe2.cloudfront.net/Images/GiftCardFaceplates/External/AMTRAK_fp01.png"
}],
logo: "https://d2g7ragyj76kvw.cloudfront.net/brands/logos/AMTRAK.svg"
},
product_id: "AMTRAK"
}]
}

post
Order A Gift Card

https://pow.cards/api/orders
Ask to purchase a gift card for a specific amount and retailer. Returns a Bitcoin payment request that may be recognized by all wallets implementing the payment protocol standard.
Request
Response
Request
Body Parameters
product_id
required
string
product_id field for exampe "AMTRAK"
value
required
integer
value amount in dollars
paymail
required
string
paymail address identity of buyer
Response
200: OK
{
"order": {
"id":7,
"uid":"890d9f5f-9a49-49c5-86e5-f1e9340ee78d",
"payment_request": {
"id":381,
"app_id":1,
"template": [{
"currency":"BSV",
"to": [{
"address":"1ErZaNaYtbUSfyXK8yc9dvH2ofMpw8r7DT",
"currency":"USD",
"amount":475
}]
}],
"status":"unpaid",
"updatedAt":"2020-10-01T18:03:34.774Z",
"createdAt":"2020-10-01T18:03:34.759Z",
"webpage_url":"https://app.anypayinc.com/invoices/W6g2wqxs7",
"uri":"pay:?r=https://api.anypayinc.com/r/W6g2wqxs7",
"uid":"W6g2wqxs7",
"metadata": {
"merchantName":"$500 at Amtrak",
"avatarUrl":"https://d2g7ragyj76kvw.cloudfront.net/brands/logos/AMTRAK.svg"
}},
"product_id":"AMTRAK",
"paymail":"stevenzeiler@relayx.io",
"amount":500,
"updatedAt":"2020-10-01T18:03:34.783Z",
"createdAt":"2020-10-01T18:03:34.783Z",
"status":"unpaid",
"webhook":null,
"egifter_order":null,
"token":null
}
}

post
Pay For Gift Card Order

https://pow.cards/api/orders/{order_id}/payments
Once your wallet signs a payment from the payment template requested by Anypay, post the signed payment hex
Request
Response
Request
Body Parameters
transaction
required
string
signed transaction hex as requested by template
Response
200: OK

get
List Gift Cards In Wallet

https://pow.cards/api/tokens/{paymail}
You wallet holds gift cards using your paymail private key as an encrypted token stored on Anypay's servers (and in the future in the blockchain). In order to list the gift cards in your wallet you must sign a message containing your paymail address. Then you receive a list of gift cards which are encrypted with your paymail private key. That way only you can access your gift cards.api
Request
Response
Request
Response
200: OK