get_account_balance
¶
get_account_balance(
balance_type: BalanceType,
*,
config_overrides: Optional[PaymentsClientConfig] = None,
next_token: Optional[PaginationToken] = None,
max_results: Optional[MaxResults] = None,
) -> GetAccountBalanceResponse
Retrieves one balance of your account, selected by balance type, as one amount for each merchant of record and currency. Each amount is the sum of the outstanding balances of your invoices or credit memos that have the status OUTSTANDING. Amounts are never added together across merchants of record or currencies. This operation is eventually consistent. Results are paginated. Use nextToken to retrieve more results.
To use this operation, you must have Amazon Web Services Identity and Access Management (IAM) permission for both payments:GetAccountBalance and payments:GetPaymentStatus.
Parameters:
-
balance_type(BalanceType) –The balance to retrieve. You can specify only one balance type in a single request. Each balance adds up the
outstandingbalance of the records that have the statusOUTSTANDING. A record that isPROCESSING,SETTLED, orCANCELEDisn't included, even when part of its amount is outstanding. The following values are valid:-
INVOICES_DUE– The outstanding balance of yourOUTSTANDINGinvoices that aren't past their due date, wheredueStatusisDUE. -
INVOICES_PAST_DUE– The outstanding balance of yourOUTSTANDINGinvoices that are past their due date, wheredueStatusisPAST_DUE. -
OUTSTANDING_CREDIT_MEMOS– The outstanding balance of yourOUTSTANDINGcredit memos: the credit that isn't yet applied to an invoice.
-
-
next_token(Optional[PaginationToken], default:None) –The pagination token from the
nextTokenof the previous response. Omit it to get the first page. Tokens expire. If the token is malformed or expired, or doesn't match the original request, the request fails withValidationExceptionand the reasonINVALID_PAGINATION_TOKEN. In that case, start again from the first page. -
max_results(Optional[MaxResults], default:None) –The maximum number of results to return in one page. The default is 100. A page can contain fewer results even when more remain. Use
nextTokento find out whether more results are available.
Raises:
-
AccessDeniedException–The request is denied because you don't have sufficient access to perform this operation. Verify that you have the required permissions and try again. This error is also returned, instead of
ResourceNotFoundException, when you aren't authorized for the resource, so the response doesn't reveal whether the resource exists. -
InternalServerException–The request processing failed because of an unknown error, exception, or failure. Retry your request.
-
ThrottlingException–The request was denied due to request throttling. Reduce the frequency of your requests and try again.
-
ValidationException–The request isn't valid. Check
reasonandfieldListfor the cause, correct the request, and try again. -
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Invoke GetAccountBalance