

# CreateAppPaymentRegistration

Creates a hosted URL that an app owner uses to register payment and tax details.

## Request Syntax
<a name="API_CreateAppPaymentRegistration_RequestSyntax"></a>

```
POST /apps/{{appId}}/payment?scope={{scope}} HTTP/1.1
Content-type: application/json

{
   "businessType": "{{string}}",
   "clientToken": "{{string}}",
   "developerAddress": { 
      "city": "{{string}}",
      "country": "{{string}}",
      "postalCode": "{{string}}",
      "state": "{{string}}",
      "street1": "{{string}}",
      "street2": "{{string}}"
   },
   "displayName": "{{string}}",
   "email": "{{string}}",
   "invoiceLogo": {{blob}},
   "legalName": "{{string}}",
   "refreshUrl": "{{string}}",
   "returnUrl": "{{string}}",
   "supportEmail": "{{string}}",
   "supportPhone": "{{string}}",
   "taxRegistrationNumber": "{{string}}",
   "taxRegistrations": [ 
      { 
         "collectionType": "{{string}}",
         "countryCode": "{{string}}",
         "locality": "{{string}}",
         "registrationId": "{{string}}",
         "registrationType": "{{string}}",
         "state": "{{string}}"
      }
   ]
}
```

## URI Request Parameters
<a name="API_CreateAppPaymentRegistration_RequestParameters"></a>

The request uses the following URI parameters.

 ** [appId](#API_CreateAppPaymentRegistration_RequestSyntax) **   <a name="appmonetization-CreateAppPaymentRegistration-request-uri-appId"></a>
The ID of the app being registered for payment.  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[A-Za-z0-9_-]+`   
Required: Yes

 ** [scope](#API_CreateAppPaymentRegistration_RequestSyntax) **   <a name="appmonetization-CreateAppPaymentRegistration-request-uri-scope"></a>
Required. The environment: live or sandbox.  
Valid Values: `sandbox | live`   
Required: Yes

## Request Body
<a name="API_CreateAppPaymentRegistration_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [businessType](#API_CreateAppPaymentRegistration_RequestSyntax) **   <a name="appmonetization-CreateAppPaymentRegistration-request-businessType"></a>
Whether the seller is an individual or a registered business.  
Type: String  
Valid Values: `INDIVIDUAL | REGISTERED_BUSINESS`   
Required: No

 ** [clientToken](#API_CreateAppPaymentRegistration_RequestSyntax) **   <a name="appmonetization-CreateAppPaymentRegistration-request-clientToken"></a>
A unique, case-sensitive identifier to ensure that the operation completes no more than one time.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `[!-~]+`   
Required: No

 ** [developerAddress](#API_CreateAppPaymentRegistration_RequestSyntax) **   <a name="appmonetization-CreateAppPaymentRegistration-request-developerAddress"></a>
Your business address.  
Type: [DeveloperAddress](API_DeveloperAddress.md) object  
Required: No

 ** [displayName](#API_CreateAppPaymentRegistration_RequestSyntax) **   <a name="appmonetization-CreateAppPaymentRegistration-request-displayName"></a>
Customer-facing name (doing-business-as) shown to buyers on invoices, distinct from legalName.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 255.  
Required: No

 ** [email](#API_CreateAppPaymentRegistration_RequestSyntax) **   <a name="appmonetization-CreateAppPaymentRegistration-request-email"></a>
Your primary contact email for this registration, distinct from supportEmail (the address shown to customers). If you omit it, AWS App Monetization uses supportEmail.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 254.  
Pattern: `[^@]+@[^@]+`   
Required: No

 ** [invoiceLogo](#API_CreateAppPaymentRegistration_RequestSyntax) **   <a name="appmonetization-CreateAppPaymentRegistration-request-invoiceLogo"></a>
Logo printed on the seller's invoices: raw PNG or JPEG bytes, up to 100 KiB. The image type is detected from the bytes. Write-only: the logo is not returned by GetAppPaymentRegistration.  
Type: Base64-encoded binary data object  
Length Constraints: Minimum length of 1. Maximum length of 102400.  
Required: No

 ** [legalName](#API_CreateAppPaymentRegistration_RequestSyntax) **   <a name="appmonetization-CreateAppPaymentRegistration-request-legalName"></a>
Your registered legal name.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 255.  
Required: No

 ** [refreshUrl](#API_CreateAppPaymentRegistration_RequestSyntax) **   <a name="appmonetization-CreateAppPaymentRegistration-request-refreshUrl"></a>
The URL the seller's browser is redirected to if the hosted registration session expires.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 2048.  
Required: Yes

 ** [returnUrl](#API_CreateAppPaymentRegistration_RequestSyntax) **   <a name="appmonetization-CreateAppPaymentRegistration-request-returnUrl"></a>
The URL the seller's browser is redirected to after completing hosted registration.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 2048.  
Required: Yes

 ** [supportEmail](#API_CreateAppPaymentRegistration_RequestSyntax) **   <a name="appmonetization-CreateAppPaymentRegistration-request-supportEmail"></a>
Your support email address, displayed in the invoice footer.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 254.  
Pattern: `[^@]+@[^@]+`   
Required: No

 ** [supportPhone](#API_CreateAppPaymentRegistration_RequestSyntax) **   <a name="appmonetization-CreateAppPaymentRegistration-request-supportPhone"></a>
Customer-facing support phone number shown to buyers on invoices.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 32.  
Required: No

 ** [taxRegistrationNumber](#API_CreateAppPaymentRegistration_RequestSyntax) **   <a name="appmonetization-CreateAppPaymentRegistration-request-taxRegistrationNumber"></a>
Your tax registration number (for example, VAT, GST, or EIN).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Required: No

 ** [taxRegistrations](#API_CreateAppPaymentRegistration_RequestSyntax) **   <a name="appmonetization-CreateAppPaymentRegistration-request-taxRegistrations"></a>
The jurisdictions where the seller is registered to collect tax.  
Type: Array of [TaxRegistration](API_TaxRegistration.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 100 items.  
Required: No

## Response Syntax
<a name="API_CreateAppPaymentRegistration_ResponseSyntax"></a>

```
HTTP/1.1 201
Content-type: application/json

{
   "expiresAt": number,
   "registrationUrl": "string"
}
```

## Response Elements
<a name="API_CreateAppPaymentRegistration_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 201 response.

The following data is returned in JSON format by the service.

 ** [expiresAt](#API_CreateAppPaymentRegistration_ResponseSyntax) **   <a name="appmonetization-CreateAppPaymentRegistration-response-expiresAt"></a>
The time the registration URL expires.  
Type: Timestamp

 ** [registrationUrl](#API_CreateAppPaymentRegistration_ResponseSyntax) **   <a name="appmonetization-CreateAppPaymentRegistration-response-registrationUrl"></a>
The hosted URL the seller opens to finish entering payment and tax details.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 2048.

## Errors
<a name="API_CreateAppPaymentRegistration_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
The caller does not have sufficient permission to perform this action.    
 ** message **   
Human-readable description of the access-denied condition.
HTTP Status Code: 403

 ** ConflictException **   
The request conflicts with the current state of the resource, such as a duplicate identifier or a version mismatch. Retrieve the current state of the resource and retry the request.    
 ** message **   
Human-readable description of the conflict.  
 ** resourceId **   
Identifier of the resource in a conflicting state.  
 ** resourceType **   
Type of the resource in a conflicting state.
HTTP Status Code: 409

 ** InternalServerException **   
An unexpected error occurred while processing the request.    
 ** message **   
Human-readable description of the server error.  
 ** retryAfterSeconds **   
Advice to clients on when the call can be safely retried.
HTTP Status Code: 500

 ** ResourceNotFoundException **   
The referenced resource does not exist.    
 ** message **   
Human-readable description of the missing resource.  
 ** resourceId **   
Identifier of the resource that was not found.  
 ** resourceType **   
Type of the resource that was not found (for example, "App" or "Plan").
HTTP Status Code: 404

 ** ThrottlingException **   
The request was denied due to request throttling.    
 ** message **   
Human-readable description of the throttling condition.  
 ** quotaCode **   
Service Quotas identifier for the throttled quota.  
 ** retryAfterSeconds **   
Advice to clients on when the call can be safely retried.  
 ** serviceCode **   
Service Quotas identifier for the originating service.
HTTP Status Code: 429

 ** ValidationException **   
The request failed input validation.    
 ** fieldList **   
The specific input fields that failed validation, when applicable.  
 ** message **   
Human-readable description of what failed validation.  
 ** reason **   
Machine-readable reason the request failed validation, so callers act without parsing the message.
HTTP Status Code: 400

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

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/appmonetization-2022-07-26/CreateAppPaymentRegistration) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/appmonetization-2022-07-26/CreateAppPaymentRegistration) 
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/appmonetization-2022-07-26/CreateAppPaymentRegistration) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/appmonetization-2022-07-26/CreateAppPaymentRegistration) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/appmonetization-2022-07-26/CreateAppPaymentRegistration) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/appmonetization-2022-07-26/CreateAppPaymentRegistration) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/appmonetization-2022-07-26/CreateAppPaymentRegistration) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/appmonetization-2022-07-26/CreateAppPaymentRegistration) 
+  [AWS SDK for Python (Boto3)](https://docs.aws.amazon.com/goto/boto3/appmonetization-2022-07-26/CreateAppPaymentRegistration) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/appmonetization-2022-07-26/CreateAppPaymentRegistration) 