Developer Console
感谢您的访问。此页面目前仅提供英语版本。我们正在开发中文版本。谢谢您的理解。

Payment service connectivity testing

Connectivity testing for Amazon APIs

Connectivity testing can be completed after the onboarding of the authorized AWS accounts for the applicable Amazon services. The user can trigger tests to check whether the AWS account configured has been authorized to invoke our APIs successfully. Further testing is required to ensure the end-to-end use case. The self-service onboarding function currently supports Payment and Checkout

Setup for the test

  • First step is setting up the ordering connector. The ordering connector is a prerequisite for this test as our systems need to be able to send the basket to your ordering connector to invoke Checkout or Payment APIs. Please refer to the sections How to Configure Store Connectors, Connectivity Testing of the document. Once your Ordering connector shows successful status, you can proceed with the test for authorized AWS accounts


  • Next is to ensure the endpoint for the service has been setup correctly. The endpoint must be changed in your integration application to the testing endpoint else the test will result in actual checkouts and transactions against the test call.
    This is done in the integration app where the call to the Amazon service is done.

    • If you are testing Checkout calls, add .test in the endpoint right before checkout https://.test.checkout.amazonphysicalstores.com/v1/checkout/carts

    • If you are testing Payment calls, add .test in the endpoint right before payment https://.test.payments.amazonphysicalstores.com/v1/adjust/charge

Running the test

  • Enter a valid SKU (that was used in ordering connector test) in the input box and click on Run Test.
  • You will need to call the API method under test using the shopping trip aligned with the test goal from the table below

Inferring the test status:

  • Untested: This status is displayed when the AWS accounts are untested, please run the test
  • In Progress: This status is displayed while the Amazon system is awaiting for an API call from the authorized AWS accounts
  • Unknown: This status is displayed when the Amazon systems did not receive a call from the authorized AWS accounts or the call is taking longer than expected. Kindly follow the troubleshooting guide and run the test again.

Note: Please ensure to update the endpoints to the production values once the testing has been completed.

Payment service

You can control the return of the API by replacing the shoppingTripId with the value from the table below depending on the test case you want to test.

AdjustCharge API

The AdjustCharge API is used to adjust the amount charged to a customer's payment method.

Test Case Shopping trip value Response from mock service
SUCCESS CASE testSessionIdWithApprovedAdjustCharge APPROVED
PENDING ADJUSTCHARGE FOR AUTH PENDING ENABLED STORES testSessionIdWithPendingAdjustCharge PENDING
AUTH PENDING ENABLED STORES INVOKING ADJUST CHARGE ON PENDING AUTH testPendingAuthSessionId PENDING
DECLINED STATUS FOR PENDING AUTH FOR AUTH PENDING NOT ENABLED STORES testSessionIdWithDeclinedAdjustChargeWithAuthPendingNotEnabled DECLINED
BAD REQUEST EXCEPTION ERROR testSessionIdWithBadRequestExceptionError BadRequestException
UNKNOWN SHOPPINGTRIP ENCOUNTERED testInvalidSessionIdWithUnknownShoppingTripExceptionError UnknownShoppingTripException
SERVICE UNAVAILABILITY testSessionIdWithServiceUnavailableExceptionError ServiceUnavailableException
SERVICE EXCEPTION testSessionIdWithServiceExceptionError ServiceException error
THROTTLING ERROR testSessionIdWithThrottlingError Throttling error
CaptureCharge API

The CaptureCharge API is used to capture the authorized amount from a customer's payment method

Test Case Shopping trip value Response from mock service
SUCCESS CASE testSessionIdWithValidCaptureCharge {}
TEST BAD REQUEST ERROR testSessionIdWithBadRequestExceptionError bad request exception error
UNKNOWN SHOPPING TRIP ENCOUNTERED testSessionIdWithUnknownShoppingTripExceptionError UnknownShoppingTripExceptionError
SERVICE EXCEPTION testSessionIdWithServiceExceptionError ServiceExceptionError
SERVICE UNAVAILABILITY ERROR testSessionIdWithServiceUnavailableExceptionError ServiceUnavailableException error
TEST THROTTLING ERROR EXCEPTION CAPTURECHARGE FUNCTIONALITY testSessionIdWithThrottlingError Throttling error
Refund API

The Refund API is used to process refunds for customer transactions.

Test Case Shopping trip value Response from mock service
REFUND WITH NO VALID PAYMENT STATUS testShoppingTripIdWithInvalidPaymentStatus Bad Request Exception error
TEST REFUND WITH AMOUNT GREATER THAN CAPTURE testShoppingTripIdWithInvalidAmountValue Bad Request Exception error
SUCCESS CASE testRefundSuccess {reconciliationId: "testValidReconciliationId" }
REFUND WITH NO PAYMENT METHOD testShoppingTripIdWithNoPaymentMethod {Service Exception Error}
SUCCESS CASE WITH MULTIPLE PAYMENT RES testRefundSuccessWithMultiplePaymentRes {reconciliationId: "testValidReconciliationId"}
TEST THROTTLING ERROR testShoppingTripIdWithThrottlingError {throttling error}
GetTransactionalData API
Test Case Shopping trip value Response from mock service
SUCCESS CASE testValidShoppingTripId {brand: "DUMMY TEST BRAND"}
SERVICE EXCEPTION ERROR testShoppingTripIdWithServiceError {service exception error }
SERVICE UNAVAILABILITY ERROR testShoppingTripIdWithServiceUnavailableError {service unavailability exception error.}
TEST ERROR FETCHING STORE DETAILS testShoppingTripIdWithBadRequestError {BadRequestException Error}
INVALID SHOPPING TRIP testInvalidShoppingTripId {Unknown Shopping Trip error }
TEST THROTTLING ERROR testShoppingTripIdWithThrottlingError {throttling error
GetShopperIdentity API
Test Case Shopping trip value Response from mock service
INVALID SHOPPER ID shopperId: {"id":"testInvalidShopperId"} {bad request exception error }
SUCCESS CASE shopperId: {"id":"testValidShopperId"} {shopperEmail: "test-valid-email"}
EMAIL BEING NULL FOR A SHOPPER } shopperId: {"id":"testShopperIdWithNullEmail"} {shopperEmail: NULL}
SHOPPERID WITH INVALID KEY shopperId: {"id":"testShopperIdWithInvalidKey"} {service unavailable exception error.}
TEST THROTTLING ERROR shopperId: {"id":"testShopperIdWithThrottlingError"} {Throttling error.}

CheckoutService

The CheckoutService is used to process the final checkout for a customer's shopping cart.

Test Case Shopping trip value Response from mock service
Success Case testSuccess- {orderId: "testOrderIdSuccess"}
Cart Validation Cases: Item Price Validation testInvalidItemPrice- {CartValidationException}
Currency Validation testInvalidCurrency-" {CartValidationException}
Subtotal Validation testInvalidSubTotal- {CartValidationException}
Sales Tax Validation testInvalidSalesTax- {CartValidationException}
Promotions Validation testInvalidPromotions- {CartValidationException}
Order Total Validation testInvalidOrderTotal- {CartOrderTotalInvalidException}
Deposit And Fee Description Validation testInvalidDepositAndFeeDescription- {CartContentValidationException}
Promotion Description Validation testInvalidPromotionDescription- {CartContentValidationException }
Store Validation Case testInvalidStoreId- {InvalidRequestException}
Failed Checkout testFailedCheckout- {InternalServerException}
Invalid Session ID testInvalidSessionId- {UnknownShoppingTripException}
Invalid SKU testInvalidSKU- {CartContentValidationException}