POST https://api.cryptohopper.com/v1/market/giftcards/user

Creates a custom gift card design under your account. A credits gift card has a value between 5 and 2000 USD; values outside that range are set to the nearest limit.

OAuth scope: read manage About scopes

Body fields: name (required, checked by a profanity filter), giftcard_type (credits or subscription, default credits), giftcard_value (required for credits), giftcard_image (required, one of the URLs from GET /market/giftcards/images) and payment_term (subscription only: 1year, 3months or 6months, anything else is one month). In the current code the chosen image is not stored, and subscription gift cards get no price because no plan is set.

Example request

curl -X POST "https://api.cryptohopper.com/v1/market/giftcards/user" \
  -H "access-token: YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Birthday gift","giftcard_type":"credits","giftcard_value":50,"giftcard_image":"https://cdn.cryptohopper.com/images/giftcards/templates/birthday.png"}'

Parameters

Headers

NameTypeRequiredDescription
access-token string Required The OAuth access token of the user.

Response

Example response (illustrative values)

{
    "data": {
        "giftcard_id": 57,
        "message": "Your new giftcard has been saved."
    }
}

Status codes: 200. Errors return JSON with status, error and message. See How the API works for response codes and rate limits.