You can convert Bitcoins into gift cards by sending an HTTP POST request to http://coincard.ndrix.com/api with the following body parameters.

card_type amazon, bestbuy, dominos, papajohns, etc. See the Gift Card drop down on the order form for a complete list
card_amount The USD or BTC amount to be placed on the gift card
currency The currency of the card_amount value. One of btc or usd
email Email address where the payment or gift card is sent. Optional if dry_run is specified
dry_run Set to 1 if you want to see the order totals but have no intention of completing the order

Success Response

On success, you get a JSON response with a Bitcoin address and both USD and BTC amounts. Send BTC payment to the address specified within 2 minutes to complete the order.

    {"btc":20.12, "usd":16.91, "btc_address":"127UjnJoegZ6PYCSpyGCBxYqPFB26EWAAk"}

Error Response

If there's an error, you get a response something like this:

    {"error":{"general":{"code":1,"message":"CoinCard is temporarily closed"}}}

It's also possible to get errors about specific API fields. These errors only happen when you have a malformed request. Since they shouldn't happen once your code is in production, error codes are not included.

    {"error":{"card_type":"Unknown card type","email":"Required"}}

Error Codes

1 CoinCard is currently down for maintenance
2 You sent a GET request but a POST request is needed
3 You tried placing an order lower than $1
4 Insufficient funds. You can try a smaller amount or wait a few hours for funds to become available before trying the request again.
5 You placed an order smaller than card_type allows. For instance, Domino's has a minimum order of $5.
6 You placed an order larger than card_type allows. For instance, Domino's has a maximum order of $100.
999 CoinCard internal error. If you encounter this code, please email us the request details so that we can fix the problem.