PingOne

Making decision requests

About this task

You’ll use Postman requests to simulate an application requesting decisions about payment amounts. To get started, let’s walk through downloading a Postman collection and assigning values to variables used in the requests.

The PingOne platform requires an access token from your application before you can make calls to the API. You’ll use a Postman request to get the access token, then you’ll make decision requests.

Steps

  1. Import a copy of the Postman collection:

    1. Click the Run in Postman button below.

    2. Click the import a copy link.

    3. If you use workspaces in Postman, select a workspace and click Import.

  2. Go to Collections and click PingOne Authorize: Make a Decision Request to open the collection, then click the Variables tab.

    Screen capture of the PingOne Authorize: Make a Decision Request collection in Postman showing the Variables tab.
  3. If you are outside of North America, update the authUrl and apiUrl current values to use the data center closest to your geographic region.

    Variable Canada Europe Australia Asia Pacific

    authUrl

    https://auth.pingone.ca

    https://auth.pingone.eu

    https://auth.pingone.com.au

    https://auth.pingone.asia

    apiUrl

    https://api.pingone.ca

    https://api.pingone.eu

    https://api.pingone.com.au

    https://api.pingone.asia

  4. In PingOne, go to Applications > Applications.

  5. Click your worker application, then click the Configuration tab.

  6. Expand the General section, then copy the following values into the corresponding current value on the Variables tab in Postman:

    • Client ID: The Postman variable is clientID.

    • Client Secret: The Postman variable is clientSecret.

    • Environment ID: The Postman variable is envId.

      Screen capture of the worker app Configuration tab showing the Client ID, Client Secret, Environment ID, and associated copy icons.
  7. Go to Authorization > Decision Endpoints and expand the Test endpoint.

  8. Copy the Endpoint ID and paste it into the current value for endpointId in Postman.

    Screen capture of the Test endpoint showing the Endpoint ID and the copy icon.
  9. In Postman, click Save to save the current values you assigned.

    Result:

    Now you’re ready to send a request to get an access token.

  10. In Postman, select the Get Token request and click Send.

    Screen capture of Get Token request in Postman.

    Result:

    The access token is in the response.

    Screen capture of the access token response body in Postman.

    Now you’re ready to make a decision request.

  11. Select Make Decision Request and click the Body tab. Set the Amount parameter to 10990.

    Screen capture of the make decision request body in Postman showing the Amount parameter.
  12. Click Send.

    Result:

    The response body shows that the payment is denied according to our policy of denying payments greater than $10,000 USD.

    Screen capture of the make decision request response body in Postman showing the Deny decision.

    Let’s try a payment that’s less than $10,000 USD.

  13. Change the Amount value in the request body to 990 and click Send.

    Result:

    As you expect, the payment is permitted.

    Screen capture of the make decision request response body in Postman showing the Permit decision.

Result

You’ve simulated a couple of payment decision requests so that you have something to examine further.