This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Testing Payment Initiation flow

WSO2 Open Banking enables PISP to test with JMeter x-jws-signature in v.1.3.0 for the payment initiation flow. The steps are described below.

  1. The handler for the x-jws-signature is set in the payment initiation API by default as below.

    <handler class= "com.wso2.finance.open.banking.gateway.jws.UKJwsSignatureHandler"/>
  2. In order to call the payment initiation API, it is required to pass the x-jws-signature as a header parameter in the request call. Following steps describe how it is done.

    1. Build a jar file from financial-open-banking/integration-tests/integration-jmeter-ext directory and place the jwt-builder-jmeter-ext-1.3.0.jar file in [JMETER_HOME]/lib/ext/ directory.

    2. Add new property Algorithm=PS256 to the jwtbuilder.properties file in <JMETER_HOME>/bin/jwtExtResources/ directory.

    3. Add the Payload Configuration and Generate x-jws Signed Request Object scripts to the relevant test scenario thread group in payment initiation as below. These scripts should be placed before the POST request. See Configuring Payload Configuration script for the steps to configure the Payload Configuration script.

    Configuring Payload Configuration script 

    Configure Payload Configuration script for the required user parameters as below.

    1. Include following parameters that are used to generate x-jws-signature.

      payloadPOST request payload
      clientSubjectDNDN of the client certificate
      clientKeyId(kid) valid and a signing certificate with the specified key id can be retrieved from the OB directory
      AlgorithmPS256
      trustAnchorDns

      openbanking.org.uk

    Generate x-jws Signed Request Object 

    Configura Generate x-jws Signed Request Object script that is used to generate x-jws signature for the JSR223 PreProcessor as below.

    1. In order to sign the request with client keys, pass the header as defined in the script and the payload. Appropriate user parameters are passed via Payload Configuration script. Generated JWTValue will be passed to the header parameter of a POST request. See below for a sample Generate x-jws Signed Request Object script.
  3. Select Payload Configuration script. Provide relevant values for the payload, clientSubjectDN and clientKeyId parameters that were included under Configuring Payload Configuration script. See the below example for sample values.

  4. Select POST Payment Initiation Request. Add a header parameter named x-jws-signature and set the ${JWTValue} with the generated x-jws-signature.

    The example is selected for the POST Payment Initiation of domestic payments. The jemeter script testing can be done for the following POST requests.

    POST /domestic-scheduled-payments
    POST /domestic-scheduled-payments
    POST /international-payments
    POST /international-scheduled-payments
    POST /international-standing-orders
    POST/file-payments


    Load the payload for the POST request body from the parameter value that is defined in the Payload Configuration file. It eliminates an error that occurres due to a payload format mismatch.

  5. Then execute JMeter script.