RejectAgreementPaymentRequest
Allows buyers (acceptors) to reject a payment request that is in PENDING_APPROVAL status. Once rejected, the payment request transitions to REJECTED status and cannot be accepted. Buyers can optionally provide a reason for the rejection.
Note
Only payment requests in PENDING_APPROVAL status can be rejected. A ConflictException is thrown if the payment request is in any other status.
Request Syntax
{
"agreementId": "string",
"paymentRequestId": "string",
"rejectionReason": "string"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
Note
In the following list, the required parameters are described first.
- agreementId
-
The unique identifier of the agreement associated with the payment request.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
[A-Za-z0-9_/-]+Required: Yes
- paymentRequestId
-
The unique identifier of the payment request to reject.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
pr-[a-zA-Z0-9]+Required: Yes
- rejectionReason
-
An optional reason for rejecting the payment request (1-250 characters). This message is visible to the seller.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 250.
Required: No
Response Syntax
{
"agreementId": "string",
"chargeAmount": "string",
"createdAt": number,
"currencyCode": "string",
"description": "string",
"name": "string",
"paymentRequestId": "string",
"status": "string",
"statusMessage": "string",
"updatedAt": number
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- agreementId
-
The unique identifier of the agreement associated with this payment request.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
[A-Za-z0-9_/-]+ - chargeAmount
-
The amount that was requested to be charged.
Type: String
Pattern:
[0-9]*(\.[0-9]{0,8})? - createdAt
-
The date and time when the payment request was originally created.
Type: Timestamp
- currencyCode
-
The currency code for the charge amount.
Type: String
Length Constraints: Fixed length of 3.
Pattern:
[A-Z]+ - description
-
The detailed description of the payment request, if provided.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 2000.
- name
-
The descriptive name of the payment request.
Type: String
Length Constraints: Minimum length of 5. Maximum length of 64.
Pattern:
.+ - paymentRequestId
-
The unique identifier of the rejected payment request.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
pr-[a-zA-Z0-9]+ - status
-
The updated status of the payment request, which is
REJECTED.Type: String
Valid Values:
VALIDATING | VALIDATION_FAILED | PENDING_APPROVAL | APPROVED | REJECTED | CANCELLED - statusMessage
-
The rejection reason provided by the buyer, if any.
Type: String
- updatedAt
-
The date and time when the payment request was rejected.
Type: Timestamp
Errors
For information about the errors that are common to all actions, see Common Error Types.
- AccessDeniedException
-
User does not have sufficient access to perform this action.
- message
-
Description of the error.
- reason
-
The reason for the access denied exception.
- requestId
-
The unique identifier for the error.
HTTP Status Code: 400
- ConflictException
-
Request was denied due to a resource conflict.
- message
-
Description of the error.
- requestId
-
The unique identifier for the error.
- resourceId
-
The unique identifier of the resource involved in the conflict.
- resourceType
-
The type of the resource involved in the conflict.
HTTP Status Code: 400
- InternalServerException
-
Unexpected error during processing of request.
- message
-
Description of the error.
- requestId
-
The unique identifier for the error.
HTTP Status Code: 500
- ResourceNotFoundException
-
Request references a resource which does not exist.
- message
-
Description of the error.
- requestId
-
The unique identifier for the error.
- resourceId
-
The unique identifier for the resource.
- resourceType
-
The type of resource.
HTTP Status Code: 400
- ThrottlingException
-
Request was denied due to request throttling.
- message
-
Description of the error.
- requestId
-
The unique identifier for the error.
HTTP Status Code: 400
- ValidationException
-
The input fails to satisfy the constraints specified by the service.
- fields
-
The fields associated with the error.
- message
-
Description of the error.
- reason
-
The reason associated with the error.
- requestId
-
The unique identifier associated with the error.
HTTP Status Code: 400
Examples
Sample request
This example illustrates one usage of RejectAgreementPaymentRequest.
{ "paymentRequestId": "prEXAMPLE-1bb7-5f53-9826-7b2EXAMPLE06", "agreementId": "fEXAMPLE-0aa6-4e42-8715-6a1EXAMPLE95", "rejectionReason": "Charges do not match agreed upon services" }
Sample response
This example illustrates one usage of RejectAgreementPaymentRequest.
{ "paymentRequestId": "prEXAMPLE-1bb7-5f53-9826-7b2EXAMPLE06", "agreementId": "fEXAMPLE-0aa6-4e42-8715-6a1EXAMPLE95", "status": "REJECTED", "statusMessage": "Charges do not match agreed upon services", "name": "Q1 2024 Usage Charges", "description": "Payment request for Q1 2024 usage charges for premium support services", "chargeAmount": "1250.50", "currencyCode": "USD", "createdAt": 1705314600, "updatedAt": 1705414800 }
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: