API ReferenceView as MarkdownOpenAPI

Price plans & subscriptions

View as Markdown

Price plans are recurring memberships (monthly, yearly) with features and a free trial. A subscription is a user's active plan; content can be limited to subscribers of a plan.

Endpoints that need a token: the site owner creates it in their admin (Developers > API reference). AI assistants: how to ask the user for one.

26 endpoints in 2 parts: Price Plan, Subscription.

Retrieve the owner price plan

One of the signed-in user's price plans (?id). 404 when there is no such plan.

User token

Needs the token of a signed-in user.

Query parameters
idstring

The ID of the owner price plan.

Returns

Returns the PricePlan object.

Status codes

200 401 404 500

GET/owner-price-plan
curl -X GET 'http://bulgariandebateassociation.max-media.io/owner-price-plan?ionic=true&id=...' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "name": "Example",
  "description": "Text shown on the site.",
  "statement_descriptor": "example",
  "plan_features": [
    {
      "feature_type": "example",
      "feature_name": "Example",
      "feature_value": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "price": 49.9,
  "link": "example-item",
  "image": "6543210fedcba98765432100",
  "price_id": "example",
  "payment_link_id": "example-item",
  "free_trial_days": 0,
  "billing_address_collection": "auto",
  "owner_id": "6543210fedcba98765432100",
  "times_showed": 0,
  "views": [
    "6543210fedcba98765432101"
  ],
  "total_views": 0,
  "disabled": false,
  "ribbon": "example",
  "linked_plans": [
    "6543210fedcba98765432101"
  ],
  "is_hidden": false,
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z",
  "recurring_options": {
    "interval": "example",
    "interval_count": 0
  }
}

Retrieve the price plan

The price plans page, or the plans as JSON with ?ionic. Paged with ?skip. Cached for an hour.

Public

Public - no token needed.

Query parameters
skipstring

How many results to skip - for paging.

Returns

Returns the PricePlan object.

Status codes

200 500

GET/price-plan
curl -X GET 'http://bulgariandebateassociation.max-media.io/price-plan?ionic=true&skip=...'
Response
{
  "name": "Example",
  "description": "Text shown on the site.",
  "statement_descriptor": "example",
  "plan_features": [
    {
      "feature_type": "example",
      "feature_name": "Example",
      "feature_value": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "price": 49.9,
  "link": "example-item",
  "image": "6543210fedcba98765432100",
  "price_id": "example",
  "payment_link_id": "example-item",
  "free_trial_days": 0,
  "billing_address_collection": "auto",
  "owner_id": "6543210fedcba98765432100",
  "times_showed": 0,
  "views": [
    "6543210fedcba98765432101"
  ],
  "total_views": 0,
  "disabled": false,
  "ribbon": "example",
  "linked_plans": [
    "6543210fedcba98765432101"
  ],
  "is_hidden": false,
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z",
  "recurring_options": {
    "interval": "example",
    "interval_count": 0
  }
}

Create a price plan

Creates a price plan. Also creates its Stripe product, recurring price (recurring_options: interval, interval_count) and payment link. Answers 201 with the payment link. 403 without a professional account where social mode requires one.

User token

Needs the token of a signed-in user.

Parameters
on_behalf_ofstring

The price plan's on behalf of.

namestring

The plan's name.

descriptionstring

What the plan gives.

imageobjectid

Media.id.

pricenumber

Price per period.

recurring_optionsstring

The price plan's recurring options.

daysstring

The price plan's days.

free_trial_daysnumber

Days free before the first payment.

billing_address_collectionstring

Wheter to collect billing information.

Returns

Returns the PricePlan object.

Status codes

201 400 401 403 500

POST/price-plan
curl -X POST 'http://bulgariandebateassociation.max-media.io/price-plan?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "on_behalf_of": "...", "name": "...", "description": "...", "image": "...", "price": "..." }'
Response
{
  "name": "Example",
  "description": "Text shown on the site.",
  "statement_descriptor": "example",
  "plan_features": [
    {
      "feature_type": "example",
      "feature_name": "Example",
      "feature_value": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "price": 49.9,
  "link": "example-item",
  "image": "6543210fedcba98765432100",
  "price_id": "example",
  "payment_link_id": "example-item",
  "free_trial_days": 0,
  "billing_address_collection": "auto",
  "owner_id": "6543210fedcba98765432100",
  "times_showed": 0,
  "views": [
    "6543210fedcba98765432101"
  ],
  "total_views": 0,
  "disabled": false,
  "ribbon": "example",
  "linked_plans": [
    "6543210fedcba98765432101"
  ],
  "is_hidden": false,
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z",
  "recurring_options": {
    "interval": "example",
    "interval_count": 0
  }
}

Retrieve a price plan

A price plan's page, with the user's saved cards. Answers { price_plan, payment_methods } in the app.

Optional userUser token

Works without a token; with a user token the answer is personal.

Path parameters
idstringRequired

The ID of the price plan.

Returns

Returns the PricePlan object.

Status codes

200 401 404 500

GET/price-plan/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/price-plan/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "name": "Example",
  "description": "Text shown on the site.",
  "statement_descriptor": "example",
  "plan_features": [
    {
      "feature_type": "example",
      "feature_name": "Example",
      "feature_value": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "price": 49.9,
  "link": "example-item",
  "image": "6543210fedcba98765432100",
  "price_id": "example",
  "payment_link_id": "example-item",
  "free_trial_days": 0,
  "billing_address_collection": "auto",
  "owner_id": "6543210fedcba98765432100",
  "times_showed": 0,
  "views": [
    "6543210fedcba98765432101"
  ],
  "total_views": 0,
  "disabled": false,
  "ribbon": "example",
  "linked_plans": [
    "6543210fedcba98765432101"
  ],
  "is_hidden": false,
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z",
  "recurring_options": {
    "interval": "example",
    "interval_count": 0
  }
}

Update a price plan

Updates a price plan and its Stripe product. The Stripe product's name, description and picture follow. Answers the plan, or 404.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the price plan.

Parameters
imageobjectid

Media.id.

Returns

Returns the PricePlan object.

Status codes

200 400 401 404 500

PATCH/price-plan/:id
curl -X PATCH 'http://bulgariandebateassociation.max-media.io/price-plan/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "image": "..." }'
Response
{
  "name": "Example",
  "description": "Text shown on the site.",
  "statement_descriptor": "example",
  "plan_features": [
    {
      "feature_type": "example",
      "feature_name": "Example",
      "feature_value": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "price": 49.9,
  "link": "example-item",
  "image": "6543210fedcba98765432100",
  "price_id": "example",
  "payment_link_id": "example-item",
  "free_trial_days": 0,
  "billing_address_collection": "auto",
  "owner_id": "6543210fedcba98765432100",
  "times_showed": 0,
  "views": [
    "6543210fedcba98765432101"
  ],
  "total_views": 0,
  "disabled": false,
  "ribbon": "example",
  "linked_plans": [
    "6543210fedcba98765432101"
  ],
  "is_hidden": false,
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z",
  "recurring_options": {
    "interval": "example",
    "interval_count": 0
  }
}

Delete a price plan

Deletes a price plan. Deactivates its Stripe price, product and payment link; existing subscribers are not cancelled. Answers the deleted plan.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the price plan.

Returns

Returns an empty answer on success.

Status codes

200 400 401 404 500

DELETE/price-plan/:id
curl -X DELETE 'http://bulgariandebateassociation.max-media.io/price-plan/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

List all billings

The signed-in user's Stripe invoices. Answers { billings } from Stripe.

User token

Needs the token of a signed-in user.

Status codes

200 401 500

GET/billings
curl -X GET 'http://bulgariandebateassociation.max-media.io/billings?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Retrieve the billings pdf

The site's invoices between ?startDate and ?endDate as one PDF (?translate for the second language). Invoices are read from Stripe and put into one PDF.

User token

Needs the token of a signed-in user.

Query parameters
startDatestring

Only billings pdfs with this start date.

endDatestring

Only billings pdfs with this end date.

translatestring

Only billings pdfs with this translate.

Status codes

200 401 500

GET/billings-pdf
curl -X GET 'http://bulgariandebateassociation.max-media.io/billings-pdf?ionic=true&startDate=...&endDate=...&translate=...' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "stripeNumber": "example",
  "is_credit_note": false,
  "credit_note_invoice_number": "Text shown on the site.",
  "credit_note_invoice_date": "Text shown on the site.",
  "is_debit_note": false,
  "debit_note_invoice_number": "Text shown on the site.",
  "debit_note_invoice_date": "Text shown on the site.",
  "number": 1,
  "stripeInvoiceId": "example",
  "has_price_quote": false,
  "customer_name": "Example",
  "customer_address": "example",
  "customer_postal_code": "example",
  "customer_city": "example",
  "customer_country": "example",
  "customer_phone": "+359 888 123 456",
  "customer_email": "jane@example.com",
  "customer_tax_id": "example",
  "customer_vat_id": "example",
  "customer_responsible_official": "example",
  "customer_organization_name": "Example",
  "billing_customer_address": "example",
  "billing_customer_postal_code": "example",
  "billing_customer_city": "example",
  "invoice_settings": {
    "number": 0,
    "price_quote_number": "example",
    "bic": "example",
    "swift": "example",
    "tax_id": "example",
    "vat_id": "example",
    "logo": "example",
    "business_name": "Example",
    "business_name_translated": "Example",
    "responsible_official": "example",
    "responsible_official_translated": "example",
    "business_email": "jane@example.com"
  }
}

Retrieve a billing

One invoice as a PDF. A missing invoice renders the missing-invoice page with 404.

Public

Public - no token needed.

Path parameters
idstringRequired

The ID of the billing.

namestringRequired

The billing's name.

Status codes

200 404 500

GET/billings/:id/:name
curl -X GET 'http://bulgariandebateassociation.max-media.io/billings/{id}/{name}?ionic=true'
Response
{
  "stripeNumber": "example",
  "is_credit_note": false,
  "credit_note_invoice_number": "Text shown on the site.",
  "credit_note_invoice_date": "Text shown on the site.",
  "is_debit_note": false,
  "debit_note_invoice_number": "Text shown on the site.",
  "debit_note_invoice_date": "Text shown on the site.",
  "number": 1,
  "stripeInvoiceId": "example",
  "has_price_quote": false,
  "customer_name": "Example",
  "customer_address": "example",
  "customer_postal_code": "example",
  "customer_city": "example",
  "customer_country": "example",
  "customer_phone": "+359 888 123 456",
  "customer_email": "jane@example.com",
  "customer_tax_id": "example",
  "customer_vat_id": "example",
  "customer_responsible_official": "example",
  "customer_organization_name": "Example",
  "billing_customer_address": "example",
  "billing_customer_postal_code": "example",
  "billing_customer_city": "example",
  "invoice_settings": {
    "number": 0,
    "price_quote_number": "example",
    "bic": "example",
    "swift": "example",
    "tax_id": "example",
    "vat_id": "example",
    "logo": "example",
    "business_name": "Example",
    "business_name_translated": "Example",
    "responsible_official": "example",
    "responsible_official_translated": "example",
    "business_email": "jane@example.com"
  }
}

Create a subscription

Cancels every subscription of a user. Cancels each one in Stripe at once and deletes the records.

User token

Needs the token of a signed-in user.

Path parameters
user_idstringRequired

Id of user who subscribet to price plan.

Returns

Returns the Subscription object.

Status codes

200 401 500

POST/cancel_all_subscriptions/:user_id
curl -X POST 'http://bulgariandebateassociation.max-media.io/cancel_all_subscriptions/{user_id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "stripe_subscription_id": "example",
  "user_id": "6543210fedcba98765432100",
  "status": 0,
  "payment_intent_id": "example",
  "price_plan": "6543210fedcba98765432100",
  "rating_mail_sent": false,
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Create a subscription

Cancels one of the signed-in user's subscriptions. Cancels it in Stripe at once. Answers true, or 404 false when it is not found.

User token

Needs the token of a signed-in user.

Path parameters
subscription_idstringRequired

The subscription's subscription id.

Returns

Returns the Subscription object.

Status codes

200 401 404 500

POST/cancel_subscription/:subscription_id
curl -X POST 'http://bulgariandebateassociation.max-media.io/cancel_subscription/{subscription_id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "stripe_subscription_id": "example",
  "user_id": "6543210fedcba98765432100",
  "status": 0,
  "payment_intent_id": "example",
  "price_plan": "6543210fedcba98765432100",
  "rating_mail_sent": false,
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Create a create subscription

Subscribes the signed-in user to a price plan with a saved card, replacing their subscription to another plan of the same owner. Answers 201 true. A current subscription to another plan of the same owner is cancelled in Stripe first, so the user moves between plans rather than paying twice.

User tokenOptional user

Needs the token of a signed-in user.

Parameters
subscription_idstring

The create subscription's subscription id.

payment_intentstring

The create subscription's payment intent.

Returns

Returns the Subscription object.

Status codes

201 401 500

POST/create_subscription
curl -X POST 'http://bulgariandebateassociation.max-media.io/create_subscription?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "subscription_id": "...", "payment_intent": "..." }'
Response
{
  "stripe_subscription_id": "example",
  "user_id": "6543210fedcba98765432100",
  "status": 0,
  "payment_intent_id": "example",
  "price_plan": "6543210fedcba98765432100",
  "rating_mail_sent": false,
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Create a create subscription dpm

Subscribes the signed-in user to a price plan, creating the Stripe customer and payment, and answers what the card form needs. 403 when the plan is disabled or the user already has it. The Stripe subscription waits on the first payment, which the card form completes.

User tokenOptional user

Needs the token of a signed-in user.

Parameters
newsletterstring

The create subscription dpm's newsletter.

agestring

The create subscription dpm's age.

citystring

The create subscription dpm's city.

price_planstring

The create subscription dpm's price plan.

payment_methodstring

The create subscription dpm's payment method.

Status codes

200 201 401 403 500

POST/create_subscription_dpm
curl -X POST 'http://bulgariandebateassociation.max-media.io/create_subscription_dpm?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "newsletter": "...", "age": "...", "city": "...", "price_plan": "...", "payment_method": "..." }'
Response
{
  "name": "Example",
  "age": 1,
  "email": "jane@example.com",
  "city": "example",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

List all invoices

Stripe invoices between ?startDate and ?endDate, for ?customer, as PDFs. Read from Stripe.

User token

Needs the token of a signed-in user.

Query parameters
endDatestring

Only invoices with this end date.

startDatestring

Only invoices with this start date.

customerstring

Only invoices with this customer.

languagestring

Only invoices with this language.

Status codes

200 401 500

GET/invoices
curl -X GET 'http://bulgariandebateassociation.max-media.io/invoices?ionic=true&endDate=...&startDate=...&customer=...' \
  -H 'Authorization: Bearer <TOKEN>'

Create a payment method

Starts saving a new card: answers a Stripe setup intent. Answers 201 { clientSecret }; then call PATCH /payment_method/:setup_intent/:old_payment_method.

Optional userUser token

Works without a token; with a user token the answer is personal.

Status codes

201 401 500

POST/new_payment_method
curl -X POST 'http://bulgariandebateassociation.max-media.io/new_payment_method?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Create a payment method

Saves the signed-in user's card and subscribes them, signing them up to the newsletter when asked. Answers 201 { clientSecret } of the first invoice's payment. 403 when the plan is disabled.

Optional userUser token

Works without a token; with a user token the answer is personal.

Parameters
newsletterstring

The payment method's newsletter.

agestring

The payment method's age.

citystring

The payment method's city.

price_planstring

The payment method's price plan.

Returns

Returns the PaymentMethod object.

Status codes

201 401 403 500

POST/payment_method
curl -X POST 'http://bulgariandebateassociation.max-media.io/payment_method?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "newsletter": "...", "age": "...", "city": "...", "price_plan": "..." }'
Response
{
  "has_cash": false,
  "cash_locale": "Pay by cash",
  "cash_instructions": "example",
  "cash_increase": 0,
  "has_card": false,
  "card_locale": "Pay with credit card",
  "email": "jane@example.com",
  "country": "example",
  "has_invoicing": false,
  "invoice_locale": "Pay via invoice",
  "invoicing_instructions": "example",
  "currency": "EUR",
  "agreedToTerms": false,
  "agreedToTermsAt": "example",
  "merchant_id": "example",
  "has_paypal": false,
  "paypal_increase": 0,
  "paypal_id": "example",
  "lock_currency": false,
  "commission_percentage": 4.4,
  "two_currencies": false,
  "second_currency": "EUR",
  "calculate_rate": false,
  "currency_rate": 1
}

Retrieve a payment method

One saved card. Read from Stripe.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the payment method.

Status codes

200 401 500

GET/payment_method/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/payment_method/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Delete a payment method

Removes a saved card. Answers true.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the payment method.

Returns

Returns an empty answer on success.

Status codes

200 401 500

DELETE/payment_method/:id
curl -X DELETE 'http://bulgariandebateassociation.max-media.io/payment_method/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Update the payment method

Replaces a saved card with the one a setup intent saved, and makes it the default. The old card is detached from the Stripe customer.

User token

Needs the token of a signed-in user.

Path parameters
setup_intentstringRequired

The payment method's setup intent.

old_payment_methodstringRequired

The payment method's old payment method.

Status codes

200 401 500

PATCH/payment_method/:setup_intent/:old_payment_method
curl -X PATCH 'http://bulgariandebateassociation.max-media.io/payment_method/{setup_intent}/{old_payment_method}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Retrieve a subscription reciept

A subscription's receipt page. With the plan and the Stripe customer's details.

Public

Public - no token needed.

Path parameters
idstringRequired

The ID of the subscription reciept.

Status codes

200 500

GET/subscription_reciept/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/subscription_reciept/{id}?ionic=true'
Response
{
  "stripe_subscription_id": "example",
  "user_id": "6543210fedcba98765432100",
  "status": 0,
  "payment_intent_id": "example",
  "price_plan": "6543210fedcba98765432100",
  "rating_mail_sent": false,
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

List all subscriptions

The signed-in user's subscriptions.

User token

Needs the token of a signed-in user.

Returns

Returns a list of Subscription objects.

Status codes

200 401 500

GET/subscriptions
curl -X GET 'http://bulgariandebateassociation.max-media.io/subscriptions?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
[
  {
    "stripe_subscription_id": "example",
    "user_id": "6543210fedcba98765432100",
    "status": 0,
    "payment_intent_id": "example",
    "price_plan": "6543210fedcba98765432100",
    "rating_mail_sent": false,
    "_id": "6543210fedcba98765432100",
    "updatedAt": "2026-11-04T12:00:00.000Z",
    "createdAt": "2026-11-04T12:00:00.000Z"
  }
]

Create a subscription

Creates a subscription. Subscriptions are normally made through checkout; this writes a record directly. Answers 201.

User token

Needs the token of a signed-in user.

Status codes

201 400 401 500

POST/subscriptions
curl -X POST 'http://bulgariandebateassociation.max-media.io/subscriptions?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Retrieve a subscription

One subscription. 404 when there is no such subscription.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the subscription.

Returns

Returns the Subscription object.

Status codes

200 401 404 500

GET/subscriptions/:id
curl -X GET 'http://bulgariandebateassociation.max-media.io/subscriptions/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "stripe_subscription_id": "example",
  "user_id": "6543210fedcba98765432100",
  "status": 0,
  "payment_intent_id": "example",
  "price_plan": "6543210fedcba98765432100",
  "rating_mail_sent": false,
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

List all transactions

The signed-in user's Stripe subscriptions. Answers { subscriptions } from Stripe.

User token

Needs the token of a signed-in user.

Status codes

200 401 500

GET/transactions
curl -X GET 'http://bulgariandebateassociation.max-media.io/transactions?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Retrieve the user billings pdf

The signed-in user's invoices to their customers between ?startDate and ?endDate as one PDF. Invoices are read from Stripe and put into one PDF.

User token

Needs the token of a signed-in user.

Query parameters
startDatestring

Only user billings pdfs with this start date.

endDatestring

Only user billings pdfs with this end date.

translatestring

Only user billings pdfs with this translate.

Status codes

200 401 500

GET/user-billings-pdf
curl -X GET 'http://bulgariandebateassociation.max-media.io/user-billings-pdf?ionic=true&startDate=...&endDate=...&translate=...' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "stripeNumber": "example",
  "is_credit_note": false,
  "credit_note_invoice_number": "Text shown on the site.",
  "credit_note_invoice_date": "Text shown on the site.",
  "is_debit_note": false,
  "debit_note_invoice_number": "Text shown on the site.",
  "debit_note_invoice_date": "Text shown on the site.",
  "number": 1,
  "stripeInvoiceId": "example",
  "has_price_quote": false,
  "customer_name": "Example",
  "customer_address": "example",
  "customer_postal_code": "example",
  "customer_city": "example",
  "customer_country": "example",
  "customer_phone": "+359 888 123 456",
  "customer_email": "jane@example.com",
  "customer_tax_id": "example",
  "customer_vat_id": "example",
  "customer_responsible_official": "example",
  "customer_organization_name": "Example",
  "billing_customer_address": "example",
  "billing_customer_postal_code": "example",
  "billing_customer_city": "example"
}

Retrieve a user billing

One of the signed-in user's invoices as a PDF. A missing invoice renders the missing-invoice page with 404.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the user billing.

namestringRequired

The user billing's name.

Status codes

200 401 404 500

GET/user-billings/:id/:name
curl -X GET 'http://bulgariandebateassociation.max-media.io/user-billings/{id}/{name}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "stripeNumber": "example",
  "is_credit_note": false,
  "credit_note_invoice_number": "Text shown on the site.",
  "credit_note_invoice_date": "Text shown on the site.",
  "is_debit_note": false,
  "debit_note_invoice_number": "Text shown on the site.",
  "debit_note_invoice_date": "Text shown on the site.",
  "number": 1,
  "stripeInvoiceId": "example",
  "has_price_quote": false,
  "customer_name": "Example",
  "customer_address": "example",
  "customer_postal_code": "example",
  "customer_city": "example",
  "customer_country": "example",
  "customer_phone": "+359 888 123 456",
  "customer_email": "jane@example.com",
  "customer_tax_id": "example",
  "customer_vat_id": "example",
  "customer_responsible_official": "example",
  "customer_organization_name": "Example",
  "billing_customer_address": "example",
  "billing_customer_postal_code": "example",
  "billing_customer_city": "example"
}
↑↓ Navigate↵ GoEsc Close