Skip to main content

Subscription and credits

Check your plan and how many credits you have left, for example before launching a big bulk search. This endpoint is free.

The response also contains your user id, also shown on the API page.

Deprecated field

quotas.daily is not used anymore. It's still in the response for backward compatibility, but don't rely on it: use credits to know what you can spend.

POSThttps://app.icypeas.com/api/a/actions/subscription-information

Retrieve all the informations about your subscription and your credits.

Headers
  • Authorizationstringrequired

    Your API key, as is (no Bearer prefix).

  • Content-Typestringrequired

    Always application/json.

Body parameters
  • emailstringrequired

    The email of the user you want to retrieve the subscription.

    Rule: has to be an email

Request example
curl -X POST "https://app.icypeas.com/api/a/actions/subscription-information" \
-H "Content-Type: application/json" \
-H "Authorization: YOUR_API_KEY" \
-d '{
"email": "example@icypeas.com"
}'
Responses
200SuccessResponse when your input is good.
Example response · 200
{
"userId": "ax782432ezeze89087",
"customerId": "cus_NUigN0lSe4hOh9",
"currency": "eur",
"checkoutSession": "https://checkout.stripe.com/c/pay/cs_test_a1ekmO20jcbyBsDsNQjI5UUuM9VK4YIPgswGG9h7K6EQI9N7GENBcocA0z#fidkdWxOYHwnPyd1blpxYHZxWmNzZFBIfW5tfHJ1SE1VTE9cdEFDNWgycTU1R3BHM2tMPEQnKSdjd2poVmB3c2B3Jz9xd3BgKSdpZHxqcHFRfHVgJz8ndmxrYmlgWmxxYGgnKSdga2RnaWBVaWRmYG1qaWFgd3YnP3F3cGB4JSUl",
"lastInvoiceUrl": "",
"priceId": "price_1JPMUiIEPTjHbN3mQjFJqD46",
"plan": "Basic Plan",
"status": "paid",
"credits": 24,
"quotas": {
"daily": 1000
}
}
Response fields
  • userIdstring

    Icypeas user ID

  • customerIdstring

    Stripe user ID

  • statusstring

    Status of the user's payment

  • creditsnumber

    Number of credits

  • planstring

    Name of the user's plan

  • priceIdstring

    ID of the price the user subscribed to

  • lastInvoiceUrlstring

    URL for the user's last invoice

  • checkoutSessionstring

    Stripe checkout session

  • currencystring

    Chosen currency of the user. It is an empty string is the user has never had a plan

  • quotasobject

    Quotas available in Icypeas

    Show properties (1)
    • dailynumberdeprecated

      Daily quota that was used by the SalesNav extractor.

      Deprecated: Not used anymore. The value is still returned for backward compatibility but has no effect: ignore it.

200Validation errorResponse when there are validation errors

The request reached Icypeas but some fields are wrong. The response lists every problem in validationErrors. See how to read and fix errors.

Example response · 200
{
"validationErrors": [
{
"expected": "email",
"type": "stringEmpty",
"actual": "",
"field": "email",
"message": "validation_string_empty"
}
],
"success": false
}
TypeFieldsWhen it happens
required
validation_required
emailError sent when the field is missing
string
validation_string
emailError sent when the field is not a string
stringEmpty
validation_string_empty
emailError sent when the field is empty
email
validation_email
emailError sent when the field is not an email address
401UnauthorizedResponse when we could not authenticate you.
Example response · 401
{
"message": "Unauthorized access.",
"error": "UnauthorizedAccessError",
"status": 401,
"code": "unauthorized_access_error"
}
Response fields
  • messagestring

    Human-readable message.

  • errorstring

    Error name

  • statusnumber

    HTTP error code

  • codestring

    Error code

429Too many requestsError received when rate limit is exceeded
Example response · 429
{
"message": "You have exceeded the max number of requests per minute.",
"error": "RateLimitExceededError",
"status": 429,
"code": "rate_limit_exceeded_error"
}
Response fields
  • messagestring

    Human-readable message.

  • errorstring

    Error name

  • statusnumber

    HTTP error code

  • codestring

    Error code