Broadleaf Microservices
  • v1.0.0-latest-prod

APS Get Installments Plans Service

Prerequisites

Before getting installment plans details from Amazon Payment Services gateway, you’ll first need to set up your environment as described in the Environment Setup Guide.

Executing get installment plans service

Use the following code snippet to perform get installments call:

public class GetInstallmentsPlan {

 @Autowired
 APSInstallmentsService installmentService;

 public void getPlans() {

		  InstallmentPlanRequest request = new InstallmentPlanRequest();
        request.setAmount(MonetaryUtils.toAmount(20000, "AED"));
        InstallmentPlanResponse response = installmentService.getInstallmentPlans(request);

        response.isSuccessful();//To check if get Installment plans call is successful
        response.getResponse();//Response map containing Plan details
        List<Map<String, Object>> issuerDetails = (List<Map<String, Object>>) issuerDetailsMap
				.get(MessageConstants.APS_ISSUER_DETAILS); // Extracting issuer details from response map



	}
}

For more details on the Get installments service request & response parameters, refer to the link: Amazon Payment Services get installments documentation.