Organization API: Customer Portal: Credit
The 6 Organization API operations for credit.
Part of Customer Portal.
Operations
Section titled Operations| 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 my credit balance
Section titled Get my credit balanceGET /api/v1/orgs/{org_slug}/portal/credit
Parameters
Section titled Parameters| Name | In | Type | Required | Description |
|---|---|---|---|---|
org_slug |
path | string | yes | |
limit |
query | integer | no | Default: 20. |
offset |
query | integer | no | Default: 0. |
Responses
Section titled Responses| 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).
Parameters
Section titled Parameters| 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 |
Responses
Section titled Responses| 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 customerPOST /api/v1/orgs/{org_slug}/portal/credit/topup/checkout
Hosted checkout to buy USD credit for an org customer.
Parameters
Section titled Parameters| 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 |
Responses
Section titled Responses| 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 balancePOST /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.
Parameters
Section titled Parameters| 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 |
Responses
Section titled Responses| 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-upPOST /api/v1/orgs/{org_slug}/portal/credit/topup/pay-intent
Create an in-page Stripe Payment Element intent for a credit top-up.
Parameters
Section titled Parameters| 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. |
Responses
Section titled Responses| 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 balancePOST /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.
Parameters
Section titled Parameters| 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 |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |