Skip to content
Coritan Docs

Organization API: Customer Portal: Invoices

The 15 Organization API operations for invoices.

View as Markdown

Part of Customer Portal.

Method Path Summary
GET /api/v1/orgs/{org_slug}/portal/invoices Newest first, ties by id
GET /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id} Get my invoice
POST /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/apply-credit Apply the customer's credit balance toward an unpaid invoice
POST /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/charge Pay an invoice using a saved payment method (merchant-initiated charge)
POST /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/checkout Canonical hosted checkout for an org-customer invoice (alias of /pay)
GET /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/checkout-session Resume an in-flight checkout after a new tab, login, or API restart
POST /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/confirm-payment Finalize a charge after customer completes SCA (3-D Secure)
GET /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/gateways Gateway accounts that can checkout this invoice's pay currency
POST /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/pay Hosted checkout for an invoice (legacy path; prefer /checkout)
POST /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/pay-intent Create an in-page Stripe Payment Element intent for an org invoice
POST /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/paypal-capture Capture paypal order
POST /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/paypal-stash Persist a PayPal order id so a redirect or reboot can still capture it
GET /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/pdf The invoice as a document to keep
GET /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/refund-eligibility My invoice refund eligibility
POST /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/refund-request Request my invoice refund

GET /api/v1/orgs/{org_slug}/portal/invoices

Newest first, ties by id. with_total wraps the page as {items, total, limit, offset, counts}; counts are per status for the same search, whatever the status filter.

Name In Type Required Description
org_slug path string yes
status_filter query string no
q query string no
limit query integer no Default: 50.
offset query integer no Default: 0.
with_total query boolean no Default: False.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

GET /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}

Name In Type Required
invoice_id path integer yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Apply the customer's credit balance toward an unpaid invoice

Section titled Apply the customer's credit balance toward an unpaid invoice

POST /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/apply-credit

Apply the customer's credit balance toward an unpaid invoice.

Name In Type Required
invoice_id path integer yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Pay an invoice using a saved payment method (merchant-initiated charge)

Section titled Pay an invoice using a saved payment method (merchant-initiated charge)

POST /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/charge

Pay an invoice using a saved payment method (merchant-initiated charge). If no payment_method_id specified, uses the default method.

Name In Type Required
invoice_id path integer yes
org_slug path string yes
payment_method_id query integer no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Canonical hosted checkout for an org-customer invoice (alias of /pay)

Section titled Canonical hosted checkout for an org-customer invoice (alias of /pay)

POST /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/checkout

Canonical hosted checkout for an org-customer invoice (alias of /pay).

Name In Type Required
invoice_id path integer yes
org_slug path string yes
return_url query string no
cancel_url query string no
currency query string no
gateway_name query string no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Resume an in-flight checkout after a new tab, login, or API restart

Section titled Resume an in-flight checkout after a new tab, login, or API restart

GET /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/checkout-session

Resume an in-flight checkout after a new tab, login, or API restart.

Name In Type Required
invoice_id path integer yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Finalize a charge after customer completes SCA (3-D Secure)

Section titled Finalize a charge after customer completes SCA (3-D Secure)

POST /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/confirm-payment

Finalize a charge after customer completes SCA (3-D Secure). Retrieves the PaymentIntent from Stripe and settles the org invoice on success.

Name In Type Required
invoice_id path integer yes
org_slug path string yes
gateway_name query string yes
payment_intent_id query string yes
currency query string no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Gateway accounts that can checkout this invoice's pay currency

Section titled Gateway accounts that can checkout this invoice's pay currency

GET /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/gateways

Gateway accounts that can checkout this invoice's pay currency.

Name In Type Required
invoice_id path integer yes
org_slug path string yes
currency query string no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Hosted checkout for an invoice (legacy path; prefer /checkout)

Section titled Hosted checkout for an invoice (legacy path; prefer /checkout)

POST /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/pay

Hosted checkout for an invoice (legacy path; prefer /checkout). Creates a hosted checkout session and returns an approval URL.

Name In Type Required
invoice_id path integer yes
org_slug path string yes
return_url query string no
cancel_url query string no
currency query string no
gateway_name query string no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Create an in-page Stripe Payment Element intent for an org invoice

Section titled Create an in-page Stripe Payment Element intent for an org invoice

POST /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/pay-intent

Create an in-page Stripe Payment Element intent for an org invoice.

Name In Type Required
invoice_id path integer yes
org_slug path string yes
currency query string no
country query string no
gateway_name query string no
save_method query boolean no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

POST /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/paypal-capture

Finalize an embedded PayPal Buttons one-off payment: capture the buyer-approved order server-side and apply it to the org invoice (USD ledger). Idempotent via the gateway_reference uniqueness in settle_org_invoice_payment.

Name In Type Required
invoice_id path integer yes
org_slug path string yes
order_id query string yes
gateway_name query string yes
currency query string no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Persist a PayPal order id so a redirect or reboot can still capture it

Section titled Persist a PayPal order id so a redirect or reboot can still capture it

POST /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/paypal-stash

Persist a PayPal order id so a redirect or reboot can still capture it.

Name In Type Required
invoice_id path integer yes
org_slug path string yes
order_id query string yes
gateway_name query string yes
currency query string no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

The invoice as a document to keep

Section titled The invoice as a document to keep

GET /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/pdf

The invoice as a document to keep. Statements are staff-facing; this is the copy a customer files with their own accounts.

Name In Type Required
invoice_id path integer yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

GET /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/refund-eligibility

What the Refund Policy says about this invoice, so the page can offer the request, or say plainly why it cannot, before the customer types.

Name In Type Required
invoice_id path integer yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

POST /api/v1/orgs/{org_slug}/portal/invoices/{invoice_id}/refund-request

Name In Type Required
invoice_id path integer yes
org_slug path string yes

application/json (required)

Type: Body.

Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.