

# CustomCharge

One developer-computed charge.

## Contents
<a name="API_CustomCharge_Contents"></a>

 ** amount **   <a name="appmonetization-Type-CustomCharge-amount"></a>
The charge, as a decimal string in major currency units (for example, "12.50").  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 20.  
Pattern: `(0|[1-9][0-9]*)(\.[0-9]+)?`   
Required: Yes

 ** chargeId **   <a name="appmonetization-Type-CustomCharge-chargeId"></a>
Caller-chosen stable id for THIS charge. It is the idempotency and replace key: re-submitting the same chargeId within its assigned period upserts the charge in place. A chargeId is bound to the first period it is accepted into; re-submitting it after that period rolls over is refused (ConflictException) rather than billing it again, so it must be unique per charge for this user across all periods — use a UUID or your own invoice-line id (the caller does not know the billing period, so it cannot be encoded in the id).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `[A-Za-z0-9._:-]+`   
Required: Yes

 ** currency **   <a name="appmonetization-Type-CustomCharge-currency"></a>
The ISO 4217 currency of the amount. Only USD is supported; a non-USD value is rejected.  
Type: String  
Pattern: `[A-Z]{3}`   
Required: Yes

 ** description **   <a name="appmonetization-Type-CustomCharge-description"></a>
Human-readable description, surfaced on the invoice line.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 512.  
Required: Yes

 ** metricId **   <a name="appmonetization-Type-CustomCharge-metricId"></a>
Optional metric this charge derives from. Omitted for a charge not tied to a metric (a flat or custom fee).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[A-Za-z0-9_-]+`   
Required: No

 ** taxCode **   <a name="appmonetization-Type-CustomCharge-taxCode"></a>
Optional product tax code; defaults to the service default when omitted.  
Type: String  
Length Constraints: Fixed length of 13.  
Pattern: `taas_[0-9]{8}`   
Required: No

## See Also
<a name="API_CustomCharge_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/appmonetization-2022-07-26/CustomCharge) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/appmonetization-2022-07-26/CustomCharge) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/appmonetization-2022-07-26/CustomCharge) 