Skip to content
Coritan Docs

Organization API: Customer Portal: Credit

The 6 Organization API operations for credit.

View as Markdown

Part of Customer Portal.

Method Path Summary
GET /api/v1/orgs/{org_slug}/portal/credit Get my credit balance
POST /api/v1/orgs/{org_slug}/portal/credit/topup/charge Charge a saved payment method and credit the org customer balance (USD)
POST /api/v1/orgs/{org_slug}/portal/credit/topup/checkout Hosted checkout to buy USD credit for an org customer
POST /api/v1/orgs/{org_slug}/portal/credit/topup/confirm-payment Finalize a credit top-up PaymentIntent after SCA and credit the balance
POST /api/v1/orgs/{org_slug}/portal/credit/topup/pay-intent Create an in-page Stripe Payment Element intent for a credit top-up
POST /api/v1/orgs/{org_slug}/portal/credit/topup/paypal-capture Capture PayPal order and credit org customer balance

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

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

Charge a saved payment method and credit the org customer balance (USD)

Section titled Charge a saved payment method and credit the org customer balance (USD)

POST /api/v1/orgs/{org_slug}/portal/credit/topup/charge

Charge a saved payment method and credit the org customer balance (USD).

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

Hosted checkout to buy USD credit for an org customer

Section titled Hosted checkout to buy USD credit for an org customer

POST /api/v1/orgs/{org_slug}/portal/credit/topup/checkout

Hosted checkout to buy USD credit for an org customer.

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

Finalize a credit top-up PaymentIntent after SCA and credit the balance

Section titled Finalize a credit top-up PaymentIntent after SCA and credit the balance

POST /api/v1/orgs/{org_slug}/portal/credit/topup/confirm-payment

Finalize a credit top-up PaymentIntent after SCA and credit the balance.

USD credit comes from PaymentIntent metadata base_amount.

Name In Type Required
org_slug path string yes
gateway_name query string yes
payment_intent_id query string yes
amount query number or string no
currency 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 a credit top-up

Section titled Create an in-page Stripe Payment Element intent for a credit top-up

POST /api/v1/orgs/{org_slug}/portal/credit/topup/pay-intent

Create an in-page Stripe Payment Element intent for a credit top-up.

Name In Type Required Description
org_slug path string yes
amount query number or string yes
currency query string no
gateway_name query string no
save_method query boolean no Default: False.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Capture PayPal order and credit org customer balance

Section titled Capture PayPal order and credit org customer balance

POST /api/v1/orgs/{org_slug}/portal/credit/topup/paypal-capture

Capture PayPal order and credit org customer balance.

USD credit is derived from order custom_id=topup:<usd>; optional amount may assert within $0.02.

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