View a markdown version of this page

CreateAppPaymentRegistration - AWS App Monetization

CreateAppPaymentRegistration

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

Request Syntax

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

The request uses the following URI parameters.

appId

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

Required. The environment: live or sandbox.

Valid Values: sandbox | live

Required: Yes

Request Body

The request accepts the following data in JSON format.

businessType

Whether the seller is an individual or a registered business.

Type: String

Valid Values: INDIVIDUAL | REGISTERED_BUSINESS

Required: No

clientToken

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

Your business address.

Type: DeveloperAddress object

Required: No

displayName

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

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

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

Your registered legal name.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Required: No

refreshUrl

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

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

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

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

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

The jurisdictions where the seller is registered to collect tax.

Type: Array of TaxRegistration objects

Array Members: Minimum number of 0 items. Maximum number of 100 items.

Required: No

Response Syntax

HTTP/1.1 201 Content-type: application/json { "expiresAt": number, "registrationUrl": "string" }

Response Elements

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

The time the registration URL expires.

Type: Timestamp

registrationUrl

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

For information about the errors that are common to all actions, see Common Error Types.

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

For more information about using this API in one of the language-specific AWS SDKs, see the following: