Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mappingtravel.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The billing plans endpoints let you explore what Mapping.Travel offers before committing to a plan, and then initiate the appropriate Stripe-hosted flow to subscribe, purchase top-up credits, or manage an existing subscription. The plan list is public; the Stripe session endpoints require authentication.

GET /api/v1/billing/plans

Retrieve all available billing plans and credits pricing.
GET https://api.mapping.travel/api/v1/billing/plans
When you call this endpoint with a valid bearer token, the response also includes a currentPlan field indicating your organization’s active plan type. Unauthenticated calls still return all plan and credits data.

Response

tiers
object[]
required
List of available subscription plan tiers.
credits
object
required
Pay-as-you-go credits product details.
currentPlan
string
Your organization’s active plan type. Only returned when authenticated.

Example

curl https://api.mapping.travel/api/v1/billing/plans \
  -H "Authorization: Bearer <token>"
{
  "tiers": [
    {
      "planType": "FREE",
      "displayName": "Free",
      "monthlyPrice": "Free",
      "mappingsPerDay": 10,
      "maxSuppliers": 1,
      "pricePerMillion": null,
      "features": ["10 mappings/day", "1 suppliers"],
      "stripePriceId": null
    },
    {
      "planType": "SUBSCRIPTION",
      "displayName": "Growth",
      "monthlyPrice": "€49/month",
      "mappingsPerDay": 5000,
      "maxSuppliers": 10,
      "pricePerMillion": "€1/M",
      "features": ["5000 mappings/day", "10 suppliers", "Monthly subscription"],
      "stripePriceId": "price_abc123"
    }
  ],
  "credits": {
    "name": "Pay as you go",
    "description": "Pay per use - €1 per 1 million mappings",
    "pricePerMillion": "€1",
    "minimumCredits": 5000000,
    "stripeProductId": "prod_ULs7WbICsJiWiF",
    "stripePriceId": "price_1TNANJRYUvJROU8XldoaA3fo"
  },
  "currentPlan": "FREE"
}

POST /api/v1/billing/checkout

Create a Stripe checkout session to subscribe to a plan.
POST https://api.mapping.travel/api/v1/billing/checkout
Content-Type: application/json
Authorization: Bearer <token>
Use the stripePriceId from the plans response as the priceId. Redirect the user to the returned checkoutUrl to complete payment in the Stripe-hosted checkout flow.

Request body

priceId
string
required
Stripe price ID for the plan or product to purchase. Obtain this from GET /api/v1/billing/plans.
successUrl
string
required
URL to redirect the user to after a successful checkout.
cancelUrl
string
required
URL to redirect the user to if they abandon checkout.

Response

checkoutUrl
string
required
Stripe-hosted checkout URL. Redirect your user to this URL.

Example

curl -X POST https://api.mapping.travel/api/v1/billing/checkout \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "priceId": "price_abc123",
    "successUrl": "https://yourapp.com/billing/success",
    "cancelUrl": "https://yourapp.com/billing"
  }'
{
  "checkoutUrl": "https://checkout.stripe.com/pay/cs_test_..."
}

POST /api/v1/billing/portal

Create a Stripe customer portal session to manage an existing subscription.
POST https://api.mapping.travel/api/v1/billing/portal
Content-Type: application/json
Authorization: Bearer <token>
The portal lets your users update payment methods, view invoices, and cancel or upgrade their subscription directly in the Stripe-hosted interface.

Request body

returnUrl
string
required
URL to redirect the user to when they exit the Stripe portal.

Response

portalUrl
string
required
Stripe-hosted billing portal URL. Redirect your user to this URL.

Example

curl -X POST https://api.mapping.travel/api/v1/billing/portal \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"returnUrl": "https://yourapp.com/settings/billing"}'

POST /api/v1/billing/credits/purchase

Create a Stripe checkout session specifically for purchasing pay-as-you-go credits.
POST https://api.mapping.travel/api/v1/billing/credits/purchase
Content-Type: application/json
Authorization: Bearer <token>
The minimum credits purchase is 5,000,000 units (€5). Credits are consumed when mappings are processed and do not expire.

Request body

priceId
string
required
Stripe price ID for the credits product. Use the stripePriceId from the credits object in GET /api/v1/billing/plans.
successUrl
string
required
URL to redirect the user to after a successful purchase.
cancelUrl
string
required
URL to redirect the user to if they abandon the purchase.

Response

checkoutUrl
string
required
Stripe checkout URL for the credits purchase.

Example

curl -X POST https://api.mapping.travel/api/v1/billing/credits/purchase \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "priceId": "price_1TNANJRYUvJROU8XldoaA3fo",
    "successUrl": "https://yourapp.com/billing/credits/success",
    "cancelUrl": "https://yourapp.com/billing/credits"
  }'