Set a card spending limit
curl --request POST \
--url https://b2b-api-sandbox.easyonramp.com/api/v1/cards/{cardId}/limits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 500000,
"frequency": "per24HourPeriod"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: 500000, frequency: 'per24HourPeriod'})
};
fetch('https://b2b-api-sandbox.easyonramp.com/api/v1/cards/{cardId}/limits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://b2b-api-sandbox.easyonramp.com/api/v1/cards/{cardId}/limits"
payload = {
"amount": 500000,
"frequency": "per24HourPeriod"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://b2b-api-sandbox.easyonramp.com/api/v1/cards/{cardId}/limits"
payload := strings.NewReader("{\n \"amount\": 500000,\n \"frequency\": \"per24HourPeriod\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Cards
Set a card spending limit
Set one spending cap on a card for a given frequency (for example perAuthorization or per24HourPeriod). Amount is in cents. Call again with a different frequency to set additional caps.
POST
/
api
/
v1
/
cards
/
{cardId}
/
limits
Set a card spending limit
curl --request POST \
--url https://b2b-api-sandbox.easyonramp.com/api/v1/cards/{cardId}/limits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 500000,
"frequency": "per24HourPeriod"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: 500000, frequency: 'per24HourPeriod'})
};
fetch('https://b2b-api-sandbox.easyonramp.com/api/v1/cards/{cardId}/limits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://b2b-api-sandbox.easyonramp.com/api/v1/cards/{cardId}/limits"
payload = {
"amount": 500000,
"frequency": "per24HourPeriod"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://b2b-api-sandbox.easyonramp.com/api/v1/cards/{cardId}/limits"
payload := strings.NewReader("{\n \"amount\": 500000,\n \"frequency\": \"per24HourPeriod\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Authorizations
Bearer JWT issued to your business account during onboarding
Path Parameters
Body
application/json
Limit amount in cents
Example:
500000
Rolling window for the limit (for example perAuthorization, per24HourPeriod, per7DayPeriod)
Available options:
perAuthorization, per24HourPeriod, per7DayPeriod, per30DayPeriod, perYearPeriod, allTime Example:
"per24HourPeriod"
Response
200
Spending limit updated successfully