Look up merchants
curl --request GET \
--url https://app.hoppier.com/api/v1/merchants \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.hoppier.com/api/v1/merchants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hoppier.com/api/v1/merchants"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"merchants": [
{
"id": 3755,
"object": "merchant",
"name": "Starbucks",
"wildcard": false,
"categories": [
"Food & Drink"
],
"countries": [
"US"
],
"logoUrl": "https://cdn.example.com/merchants/starbucks.png",
"giftCard": {
"minAmount": 500,
"maxAmount": 50000,
"currencies": [
"USD"
]
}
}
],
"hasMore": true,
"totalCount": 13
}Merchants
Look up merchants
Searches the merchants a program can allow: Visa merchants for a hoppier_card program, gift-card brands for a gift_card program. Send the ids you choose as merchantIds when you create a program.
The key’s owner must be an admin of the company.
GET
/
merchants
Look up merchants
curl --request GET \
--url https://app.hoppier.com/api/v1/merchants \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.hoppier.com/api/v1/merchants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hoppier.com/api/v1/merchants"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"merchants": [
{
"id": 3755,
"object": "merchant",
"name": "Starbucks",
"wildcard": false,
"categories": [
"Food & Drink"
],
"countries": [
"US"
],
"logoUrl": "https://cdn.example.com/merchants/starbucks.png",
"giftCard": {
"minAmount": 500,
"maxAmount": 50000,
"currencies": [
"USD"
]
}
}
],
"hasMore": true,
"totalCount": 13
}- The catalogue is the dashboard’s merchant picker: Hoppier’s merchants plus your company’s own custom ones. Another company’s custom merchants never appear, and a program can’t use them.
- Wildcards. A merchant with
wildcard: truestands for a whole category, such as local restaurants. With noquery, Visa results start with them. - Paging. Results are ranked by how well they match
query, so pages go by position: ask again withoffsetraised bylimitwhilehasMoreistrue.offsetgoes up to 1000; search for something narrower to reach further. - Gift-card values.
giftCard.minAmountandmaxAmountare in hundredths of the brand’s own currency (cents for USD).currencieslists the currencies the brand comes in. - Merchant ids are numbers, unlike the other ids in the API.
- Not verified for Visa cards? Your account’s programs are
gift_cardprograms, so look upgift_cardmerchants.
Authorizations
Send your key in the Authorization header: Authorization: Bearer hk_live.…. The word Bearer is case-sensitive.
Keys are shown once. Treat them like passwords and never put one in code that runs in a browser or an app.
Query Parameters
The type of program the merchants are for.
Available options:
hoppier_card, gift_card A merchant's name or a word to search for, such as coffee.
Maximum string length:
200Only merchants available in this country, as a two-letter code such as US.
Pattern:
^[A-Za-z]{2}$How many merchants to return, from 1 to 50.
Required range:
1 <= x <= 50How many results to skip, from 0 to 1000.
Required range:
0 <= x <= 1000