code: private void setBucketRequestPayment(
              SetRequestPaymentConfigurationRequest setRequestPaymentConfigurationRequest) {
  
          String bucketName = setRequestPaymentConfigurationRequest
                  .getBucketName();
          RequestPaymentConfiguration configuration = setRequestPaymentConfigurationRequest
                  .getConfiguration();
  
          rejectNull(bucketName,
                  "The bucket name parameter must be specified while setting the Requester Pays.");
  
          rejectNull(
                  configuration,
                  "The request payment configuration parameter must be specified when setting the Requester Pays.");
  
          Request<SetRequestPaymentConfigurationRequest> request = createRequest(
                  bucketName, null, setRequestPaymentConfigurationRequest,
                  HttpMethodName.PUT);
          request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutBucketRequestPayment");
          request.addParameter("requestPayment", null);
          request.addHeader("Content-Type", "application/xml");
  
          byte[] bytes = requestPaymentConfigurationXmlFactory
                  .convertToXmlByteArray(configuration);
          request.setContent(new ByteArrayInputStream(bytes));
  
          invoke(request, voidResponseHandler, bucketName, null);
      }
docs: Sets the request payment configuration for a given Amazon S3 bucket.
  This operation can be done only by the owner of the Amazon S3 bucket.
  <p>
  When the request payment configuration for a Amazon S3 bucket is set to
  <code>Requester</code>, the requester instead of the bucket owner pays
  the cost of the request and the data download from the bucket. The bucket
  owner always pays the cost of storing data.