Organization API: Customer Portal: Payment preference
The 2 Organization API operations for payment preference.
Part of Customer Portal.
Operations
Section titled Operations| Method | Path | Summary |
|---|---|---|
| GET | /api/v1/orgs/{org_slug}/portal/payment-preference |
The customer's pay currency and billing country, and how each was set |
| PATCH | /api/v1/orgs/{org_slug}/portal/payment-preference |
Save the customer's pay currency, billing country or auto-pay setting |
The customer's pay currency and billing country, and how each was set
Section titled The customer's pay currency and billing country, and how each was setGET /api/v1/orgs/{org_slug}/portal/payment-preference
The customer's pay currency and billing country, and how each was set.
preferred_payment_currency is the currency the customer is charged in, and
credit_currency is the currency their credit balance is held in, always
USD. currency_source and country_source say how each was set: default,
geo (from the customer's location), user (the customer chose it) or
admin. billing_country is the country we treat the customer as paying
from. An account still on default moves once to the currency of the country
we place it in, when we take payments in that currency. A choice the customer
made is never replaced.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Save the customer's pay currency, billing country or auto-pay setting
Section titled Save the customer's pay currency, billing country or auto-pay settingPATCH /api/v1/orgs/{org_slug}/portal/payment-preference
Save the customer's pay currency, billing country or auto-pay setting.
Send any of currency, country_code and auto_pay_enabled as a JSON body, or
as query parameters of the same names. A currency or country_code counts as
the customer's own choice (currency_source or country_source becomes user),
so a later lookup never replaces it. Answers 400 with Currency <code> is not enabled for a currency customers cannot pay in: one with no rate, or that no
payment account takes (the codes GET .../portal/currencies lists are the ones
that work), and 400 with Unknown country for a country code we do not know.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
org_slug |
path | string | yes |
currency |
query | string or null | no |
country_code |
query | string or null | no |
auto_pay_enabled |
query | boolean or null | no |
Request body
Section titled Request bodyapplication/json
| Field | Type | Required |
|---|---|---|
currency |
string or null | no |
country_code |
string or null | no |
auto_pay_enabled |
boolean or null | no |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |