Skip to main content

getPaymentAccount

StringWrapper getPaymentAccount(backUrl)

GET /api/2.0/portal/payment/account

Get the billing account page

Hands back the address of the portal page on which the billing account is managed - the payment method on file, the invoices and the receipts - so a client can link to it instead of assembling the address itself. The portal must already have a billing customer: one that has never had it gets an empty result, and an installation without a billing service answers 403. Only the payer or the portal owner may read it, and the call changes nothing. The value is relative to the portal root (payment.ashx), and the optional backUrl is appended to it as a query parameter so the page can send the user back where they came from. It is not a checkout page: a plan is bought with PUT api/2.0/portal/payment/url and a payment method is attached with GET api/2.0/portal/payment/checkoutsetupurl.

Parameters​

NameInTypeDescriptionNotes
backUrlqueryURI (uri)The absolute address the billing account page should offer as its way back. It is appended to the returned portal-relative address as a query parameter rather than followed here, and omitting it yields the bare address of the page.[optional] [example: https://example.com] [minLength: 0] [maxLength: 255]

Responses​

Status codeDescriptionTypeResponse headers
200The portal-relative address of the billing account page, or an empty result when the portal has no billing customerStringWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400backUrl does not start with http://, https:// or ftp://, or is longer than 255 characters--
403The caller is neither the payer nor the portal owner, or the portal has no billing service configured--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

StringWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json