RELAY

Prototype sandbox. RELAY does not issue real cards yet, and nothing here moves real money.

API

Open a card, quote a load, and record practice spending. The base path is /api/v1. Send the account number in X-Account-Number. Browser calls from another site are refused.

Open a card

curl -X POST https://example.com/api/v1/card \
  -H 'content-type: application/json' \
  -H 'X-Account-Number: 1234567890123456' \
  -d '{"tier":"wallet","partner":"EA64AT"}'

tier is online or wallet. One card per account. The number on the card is a practice number starting with 0000. It is declined everywhere real.

Quote a load

curl -X POST https://example.com/api/v1/card/quote \
  -H 'content-type: application/json' \
  -H 'X-Account-Number: 1234567890123456' \
  -d '{"from":"sol","amount":"1"}'

Crypto is priced in dollars. 4% is the load fee. The first load also takes $15 to open the card. At least $25 has to remain.

Land the load

curl -X POST https://example.com/api/v1/card/loads \
  -H 'content-type: application/json' \
  -H 'X-Account-Number: 1234567890123456' \
  -d '{"from":"sol","amount":"1"}'

curl -X POST https://example.com/api/v1/card/loads/load_your_id/receive \
  -H 'X-Account-Number: 1234567890123456'

Receive marks the practice crypto as arrived and credits the dollars.

Spend, freeze, details

curl https://example.com/api/v1/card \
  -H 'X-Account-Number: 1234567890123456'

curl -X POST https://example.com/api/v1/card/purchase \
  -H 'content-type: application/json' \
  -H 'X-Account-Number: 1234567890123456' \
  -d '{"merchant":"Coffee","amount":"4.80"}'

curl -X POST https://example.com/api/v1/card/freeze \
  -H 'content-type: application/json' \
  -H 'X-Account-Number: 1234567890123456' \
  -d '{"frozen":true}'

curl https://example.com/api/v1/card/details \
  -H 'X-Account-Number: 1234567890123456'

A purchase declines when the card is frozen, the balance is short, or the online card is past $10,000 for the month. Declines stay on the activity list.