Skip to main content
GET
/
gift_cards
/
merchant_config
curl https://api.thanxsandbox.com/gift_cards/merchant_config \
  -X GET \
  -H "Content-Type: application/json"  \
  -H "Accept-Version: v4.0" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer ${token}" \
  -H "X-ClientId: ${client_id}"
{
  "merchant_config": {
    "id": "abc123def456ghi789j",
    "state": "active",
    "external_link": {
      "enabled": true,
      "url": "https://example.com/buy-gift-card",
      "image": {
        "small": "https://example.com/images/gift-card-button-2x.png",
        "large": "https://example.com/images/gift-card-button-3x.png",
        "default": "https://example.com/images/gift-card-button-2x.png"
      }
    },
    "card_background": {
      "color": "#1E88E5",
      "type": "image",
      "image": {
        "small": "https://example.com/images/card-bg-2x.png",
        "large": "https://example.com/images/card-bg-3x.png",
        "default": "https://example.com/images/card-bg-2x.png"
      }
    }
  }
}
This endpoint retrieves the merchant’s gift card configuration, including settings for external purchase links and card background styling. Use this information to customize how gift cards are displayed in your application and to provide users with links to purchase new gift cards.
This configuration is useful for rendering gift card purchase buttons and customizing the appearance of gift cards in your UI.
Please review proper request headers here.

Response

id
string
Merchant configuration ID
state
enum
Configuration state (active, inactive)
External purchase link configuration
card_background
object
Card background styling configuration
curl https://api.thanxsandbox.com/gift_cards/merchant_config \
  -X GET \
  -H "Content-Type: application/json"  \
  -H "Accept-Version: v4.0" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer ${token}" \
  -H "X-ClientId: ${client_id}"
{
  "merchant_config": {
    "id": "abc123def456ghi789j",
    "state": "active",
    "external_link": {
      "enabled": true,
      "url": "https://example.com/buy-gift-card",
      "image": {
        "small": "https://example.com/images/gift-card-button-2x.png",
        "large": "https://example.com/images/gift-card-button-3x.png",
        "default": "https://example.com/images/gift-card-button-2x.png"
      }
    },
    "card_background": {
      "color": "#1E88E5",
      "type": "image",
      "image": {
        "small": "https://example.com/images/card-bg-2x.png",
        "large": "https://example.com/images/card-bg-3x.png",
        "default": "https://example.com/images/card-bg-2x.png"
      }
    }
  }
}