Billing for the end customer
billing.ledger.v1.MeLedgerService/ListMyBalances (36-credits-ledger.md, API Surface). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
page?integerPage number, from 1
limit?integerItems per page, 1 to 100, default 25
unit?stringunit
A list of Balance objects with pagination
application/json- response
data?array<>object?stringpagination?Pagination is the page answered (api-route-review D9).
curl -X GET 'https://example.auth.us.pontive.app/v1/me/billing/balances'{ "data": [ { "id": "string", "object": "string" } ], "object": "string", "pagination": { "limit": 0, "page": 0, "total": 0, "total_pages": 0 }}billing.contract.v1.MeContractService/CreateMyCheckoutSession (35-contracts.md, End-customer portal and API Surface). The body is { subject?, packages, success_url, cancel_url }. billing-svc checks both URLs against the browser's Origin, which the gateway passes in the request context, and refuses a request without one (35-contracts.md, Checkout; billing-svc docs/questions.md, P71). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
X-Idempotency-Key?stringIdempotency key
A MyCheckoutSession object, object checkout_session
application/json- response
id?stringID is its prefixed id.
object?stringObject names the kind: customer, invoice, contract, …
curl -X POST 'https://example.auth.us.pontive.app/v1/me/billing/checkout-sessions'{ "id": "string", "object": "string"}billing.contract.v1.MeContractService/GetMyCheckoutSession (35-contracts.md, End-customer portal and API Surface). Under pontive:billing:pay, the scope the checkout element holds (41-embedded-organization-management.md, section 5.1). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
checkout_session_id*stringid
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
A MyCheckoutSession object, object checkout_session
application/json- response
id?stringID is its prefixed id.
object?stringObject names the kind: customer, invoice, contract, …
curl -X GET 'https://example.auth.us.pontive.app/v1/me/billing/checkout-sessions/string'{ "id": "string", "object": "string"}billing.contract.v1.MeContractService/ConfirmMyCheckoutSession (35-contracts.md, End-customer portal and API Surface). The body is { package, billing_frequency, billing_address?, tax_id?, promotion_code? }, package a pkg_ id or the package's key (api-route-review D55). The answer carries a client secret: no log or span holds the response body (billing-svc docs/m17-design.md, R8). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
checkout_session_id*stringid
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
X-Idempotency-Key?stringIdempotency key
The ConfirmMyCheckoutSessionResponse fields: outcome, contract_id, invoice_id, payment_id, client_secret, intent_type, decline_message and keys
application/json- response
curl -X POST 'https://example.auth.us.pontive.app/v1/me/billing/checkout-sessions/string/confirm'{}billing.contract.v1.MeContractService/PreviewMyCheckoutSession (35-contracts.md, End-customer portal and API Surface). The body is confirm's (P65). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48). The RPC writes nothing and takes no idempotency key, so X-Idempotency-Key is not read.
BearerAuthAuthorization<token>Access token as "Bearer "
checkout_session_id*stringid
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
The first Invoice as it would be; nothing is saved
application/json- response
curl -X POST 'https://example.auth.us.pontive.app/v1/me/billing/checkout-sessions/string/preview'{}billing.contract.v1.MeContractService/ListMyContracts (35-contracts.md, End-customer portal and API Surface). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
page?integerPage number, from 1
limit?integerItems per page, 1 to 100, default 25
A list of MyContract objects, object contract, with pagination
application/json- response
data?array<>object?stringpagination?Pagination is the page answered (api-route-review D9).
curl -X GET 'https://example.auth.us.pontive.app/v1/me/billing/contracts'{ "data": [ { "id": "string", "object": "string" } ], "object": "string", "pagination": { "limit": 0, "page": 0, "total": 0, "total_pages": 0 }}billing.contract.v1.MeContractService/CancelMyContract (35-contracts.md, End-customer portal and API Surface). The body is { reason? }. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
contract_id*stringid
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
X-Idempotency-Key?stringIdempotency key
A MyContract object, object contract
application/json- response
id?stringID is its prefixed id.
object?stringObject names the kind: customer, invoice, contract, …
curl -X POST 'https://example.auth.us.pontive.app/v1/me/billing/contracts/string/cancel'{ "id": "string", "object": "string"}billing.contract.v1.MeContractService/ChangeMyContract (35-contracts.md, End-customer portal and API Surface). The body is the preview's, with its preview_hash; preview_stale when the preview changed. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
contract_id*stringid
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
X-Idempotency-Key?stringIdempotency key
A MyContract object, object contract
application/json- response
id?stringID is its prefixed id.
object?stringObject names the kind: customer, invoice, contract, …
curl -X POST 'https://example.auth.us.pontive.app/v1/me/billing/contracts/string/change-package'{ "id": "string", "object": "string"}billing.contract.v1.MeContractService/PreviewMyContractChange (35-contracts.md, End-customer portal and API Surface). The body is { package, billing_frequency? } or { quantity, subscription_id? }. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48). The RPC writes nothing and takes no idempotency key, so X-Idempotency-Key is not read.
BearerAuthAuthorization<token>Access token as "Bearer "
contract_id*stringid
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
The PreviewMyContractChangeResponse fields: contract, invoices, upcoming_invoice and preview_hash
application/json- response
curl -X POST 'https://example.auth.us.pontive.app/v1/me/billing/contracts/string/change-package/preview'{}billing.contract.v1.MeContractService/DeleteMyContractEdit (35-contracts.md, Package changes and End-customer portal; billing-svc P124). Cancels the contract's pending change, a scheduled downgrade, by deleting its edit: edit_id is the contract's pending_change.edit_id, and any other edit is not_found. Only a change the end customer asked for, pending_change.initiated_by customer, may be cancelled here; one the client made is change_not_allowed. billing.contract.edit_cancelled is written as for DELETE /v1/billing/contracts/{contract_id}/edits/{edit_id}. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
contract_id*stringid
edit_id*stringedit_id: the contract's pending_change.edit_id
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
X-Idempotency-Key?stringIdempotency key
No Content
curl -X DELETE 'https://example.auth.us.pontive.app/v1/me/billing/contracts/string/edits/string'billing.contract.v1.MeContractService/RevokeMyContractCancellation (35-contracts.md, End-customer portal and API Surface). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
contract_id*stringid
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
X-Idempotency-Key?stringIdempotency key
A MyContract object, object contract
application/json- response
id?stringID is its prefixed id.
object?stringObject names the kind: customer, invoice, contract, …
curl -X POST 'https://example.auth.us.pontive.app/v1/me/billing/contracts/string/revoke-cancellation'{ "id": "string", "object": "string"}billing.invoice.v1.MeInvoiceService/ListMyCreditNotes (37-invoicing.md, API Surface). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
page?integerPage number, from 1
limit?integerItems per page, 1 to 100, default 25
A list of CreditNote objects with pagination
application/json- response
data?array<>object?stringpagination?Pagination is the page answered (api-route-review D9).
curl -X GET 'https://example.auth.us.pontive.app/v1/me/billing/credit-notes'{ "data": [ { "id": "string", "object": "string" } ], "object": "string", "pagination": { "limit": 0, "page": 0, "total": 0, "total_pages": 0 }}billing.invoice.v1.MeInvoiceService/GetMyCreditNotePdf (37-invoicing.md, API Surface). The credit note's PDF as a download, not an envelope: Content-Type application/pdf and Content-Disposition attachment with the file name billing-svc gives. A voided credit note's is the VOID rendition. Another Customer's credit note is credit_note_not_found. Needs a token for the instance's me audience with pontive:billing:read.
BearerAuthAuthorization<token>Access token as "Bearer "
credit_note_id*stringid
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
The PDF
response?filecurl -X GET 'https://example.auth.us.pontive.app/v1/me/billing/credit-notes/string/pdf'nullbilling.payment.v1.MePaymentService/SetMyDefaultPaymentMethod (38-payments-and-tax.md, API Surface; api-route-review D38). The caller's Customer, or the subject's it names: default_payment_method_id, one of its payment methods, becomes its default. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
X-Idempotency-Key?stringIdempotency key
The default PaymentMethod object
application/json- response
curl -X PATCH 'https://example.auth.us.pontive.app/v1/me/billing/customer'{}billing.customer.v1.MeCustomerService/ListMyCustomers (32-billing-overview.md, End-customer surface). The caller's own user Customer, the token's organization's where they hold a billing key, and the suspended or closed organizations they own and may recover (P79, P122), each with what the caller may do there: recovery marks those, and closed marks one its client closed, where only paying and the payment method are open. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
page?integerPage number
limit?integerItems per page, 1 to 100
A list of MyCustomer objects, object customer, without pagination
application/json- response
data?array<>object?stringpagination?Pagination is the page answered (api-route-review D9).
curl -X GET 'https://example.auth.us.pontive.app/v1/me/billing/customers'{ "data": [ { "id": "string", "object": "string" } ], "object": "string", "pagination": { "limit": 0, "page": 0, "total": 0, "total_pages": 0 }}billing.entitlement.v1.MeEntitlementService/ListMyEntitlements (39-entitlements-and-controls.md, API Surface). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
An EntitlementSet object
application/json- response
id?stringID is its prefixed id.
object?stringObject names the kind: customer, invoice, contract, …
curl -X GET 'https://example.auth.us.pontive.app/v1/me/billing/entitlements'{ "id": "string", "object": "string"}billing.invoice.v1.MeInvoiceService/ListMyInvoices (37-invoicing.md, API Surface). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
page?integerPage number, from 1
limit?integerItems per page, 1 to 100, default 25
status?stringstatus
A list of Invoice objects with pagination
application/json- response
data?array<>object?stringpagination?Pagination is the page answered (api-route-review D9).
curl -X GET 'https://example.auth.us.pontive.app/v1/me/billing/invoices'{ "data": [ { "id": "string", "object": "string" } ], "object": "string", "pagination": { "limit": 0, "page": 0, "total": 0, "total_pages": 0 }}billing.invoice.v1.MeInvoiceService/GetMyUpcomingInvoice (37-invoicing.md, API Surface). The upcoming invoice of the contract in force; invoice_not_found when there is none. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
An Invoice object
application/json- response
id?stringID is its prefixed id.
object?stringObject names the kind: customer, invoice, contract, …
curl -X GET 'https://example.auth.us.pontive.app/v1/me/billing/invoices/upcoming'{ "id": "string", "object": "string"}billing.invoice.v1.MeInvoiceService/GetMyInvoice (37-invoicing.md, API Surface). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
invoice_id*stringid
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
An Invoice object
application/json- response
id?stringID is its prefixed id.
object?stringObject names the kind: customer, invoice, contract, …
curl -X GET 'https://example.auth.us.pontive.app/v1/me/billing/invoices/string'{ "id": "string", "object": "string"}billing.payment.v1.MePaymentService/PayMyInvoice (38-payments-and-tax.md, API Surface). The body is { method }, saved or new. The answer carries a client secret: no log or span holds the response body (billing-svc docs/m17-design.md, R8). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
invoice_id*stringid
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
X-Idempotency-Key?stringIdempotency key
The PayMyInvoiceResponse fields: outcome, payment_id, client_secret, intent_type, decline_message and keys
application/json- response
curl -X POST 'https://example.auth.us.pontive.app/v1/me/billing/invoices/string/pay'{}billing.invoice.v1.MeInvoiceService/GetMyInvoicePdf (37-invoicing.md, API Surface). The invoice's PDF as a download, not an envelope: Content-Type application/pdf and Content-Disposition attachment with the file name billing-svc gives. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
invoice_id*stringid
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
The PDF
response?filecurl -X GET 'https://example.auth.us.pontive.app/v1/me/billing/invoices/string/pdf'nullbilling.ledger.v1.MeLedgerService/ListMyLedgerEntries (36-credits-ledger.md, API Surface). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
limit?integerItems per page, 1 to 100, default 25
after?stringCursor: a next_cursor, to continue forward
before?stringCursor: a next_cursor, to read the page just before it
type?stringtype
from?stringRFC 3339 time
to?stringRFC 3339 time
A list of LedgerEntry objects, walked by cursor (api-route-review D41)
application/json- response
data?array<>next_cursor?stringobject?stringcurl -X GET 'https://example.auth.us.pontive.app/v1/me/billing/ledger-entries'{ "data": [ { "id": "string", "object": "string" } ], "next_cursor": "string", "object": "string"}billing.payment.v1.MePaymentService/CreateMyPaymentMethodSession (38-payments-and-tax.md, API Surface). The body is { mode?, return_url? }. The answer carries a client secret: no log or span holds the response body (billing-svc docs/m17-design.md, R8). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
X-Idempotency-Key?stringIdempotency key
A PaymentMethodSession object
application/json- response
id?stringID is its prefixed id.
object?stringObject names the kind: customer, invoice, contract, …
curl -X POST 'https://example.auth.us.pontive.app/v1/me/billing/payment-method-session'{ "id": "string", "object": "string"}billing.payment.v1.MePaymentService/ListMyPaymentMethods (38-payments-and-tax.md, API Surface). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
page?integerPage number, from 1
limit?integerItems per page, 1 to 100, default 25
A list of PaymentMethod objects with pagination
application/json- response
data?array<>object?stringpagination?Pagination is the page answered (api-route-review D9).
curl -X GET 'https://example.auth.us.pontive.app/v1/me/billing/payment-methods'{ "data": [ { "id": "string", "object": "string" } ], "object": "string", "pagination": { "limit": 0, "page": 0, "total": 0, "total_pages": 0 }}billing.payment.v1.MePaymentService/RemoveMyPaymentMethod (38-payments-and-tax.md, API Surface). {id} is the spec's {pm}. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
payment_method_id*stringid
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
X-Idempotency-Key?stringIdempotency key
The removed PaymentMethod object, with warnings
application/json- response
curl -X DELETE 'https://example.auth.us.pontive.app/v1/me/billing/payment-methods/string'{}billing.payment.v1.MePaymentService/ListMyPayments (38-payments-and-tax.md, API Surface). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
page?integerPage number, from 1
limit?integerItems per page, 1 to 100, default 25
A list of Payment objects with pagination
application/json- response
data?array<>object?stringpagination?Pagination is the page answered (api-route-review D9).
curl -X GET 'https://example.auth.us.pontive.app/v1/me/billing/payments'{ "data": [ { "id": "string", "object": "string" } ], "object": "string", "pagination": { "limit": 0, "page": 0, "total": 0, "total_pages": 0 }}billing.metering.v1.MeUsageService/GetMyUsage (33-metering.md, API Surface). The same parameters as GET /v1/usage, for the caller's Customer. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48).
BearerAuthAuthorization<token>Access token as "Bearer "
subject_type?stringuser or organization: the subject whose Customer to act for; with subject_id
subject_id?stringthe subject's id, usr_ or org_; with subject_type
meter?stringA mtr_ id or a meter key; named without _id because it takes either (route review D1)
from?stringRFC 3339 time
to?stringRFC 3339 time
granularity?stringgranularity
group_by?stringgroup_by, repeated or comma separated
A UsageSeries object
application/json- response
id?stringID is its prefixed id.
object?stringObject names the kind: customer, invoice, contract, …
curl -X GET 'https://example.auth.us.pontive.app/v1/me/billing/usage'{ "id": "string", "object": "string"}