Run the configuration requests
You can create your configurations in the sandbox environment with the endpoints defined in the Authorization configurations API reference. The following code samples show how to run the basic configuration create (POST), read (GET), update (PUT), and delete requests.
Run the configuration create (POST) request
To create an org configuration, send the request without the programId
and accountId
:
curl --request POST \
--url 'https://sandbox.pismolabs.io/network-transactions-config/v1/config' \
--header 'Content-Type: application/json' \
--header 'x-tenant: <Org ID>' \
--data '{
// Put your configurations here
}
'
If you have both Full balance and Zero balance programs within your org, it is recommended to create your configurations at the program level rather than the org level. This is because for Zero balance programs, the
zero_balance_url
field is mandatory and configuring it for Full balance programs causes inconsistency in behavior.
To create a program configuration, send the request with the programId
:
curl --request POST \
--url 'https://sandbox.pismolabs.io/network-transactions-config/v1/config/program/{programId}' \
--header 'Content-Type: application/json' \
--header 'x-tenant: <Org ID>' \
--data '{
// Put your configurations here
}
'
To create an account configuration, send the request with the accountId
:
curl --request POST \
--url 'https://sandbox.pismolabs.io/network-transactions-config/v1/config/account/{accountId}' \
--header 'Content-Type: application/json' \
--header 'x-tenant: <Org ID>' \
--data '{
// Put your configurations here
}
'
Run the configuration read (GET) request
To get the org-level configuration:
curl --request GET \
--url 'https://sandbox.pismolabs.io/network-transactions-config/v1/config' \
--header 'accept: application/json'
--header 'x-tenant: <Org ID>'
To get the program-level configuration:
curl --request GET \
--url 'https://sandbox.pismolabs.io/network-transactions-config/v1/config/program/{programId}' \
--header 'accept: application/json'
--header 'x-tenant: <Org ID>'
To get the account-level configuration:
curl --request GET \
--url 'https://sandbox.pismolabs.io/network-transactions-config/v1/config/account/{accountId}' \
--header 'accept: application/json'
--header 'x-tenant: <Org ID>'
Run the configuration update (PUT) request
To update a configuration, follow these steps:
- Run the GET request for the desired level configuration.
- Copy the configuration parameters.
- Paste the existing parameters into the request body.
- Add or update the configuration.
- Run the request to update the desired level configuration.
You must follow these five steps to ensure the configuration is replicated in the updated record, since a new record is created during the update for history purposes.
To update the org-level configuration, send the request without the programId
and accountId
:
curl --request PUT \
--url 'https://sandbox.pismolabs.io/network-transactions-config/v1/config' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-tenant: <Org ID>' \
--data '
{
"use_anti_fraud_api": true, //existing parameter
"use_rates_fee_models": true //new parameter
}
'
To update the program-level configuration, send the request with the programId
:
curl --request PUT \
--url 'https://sandbox.pismolabs.io/network-transactions-config/v1/config/program/{programId}' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-tenant: <Org ID>' \
--data '
{
"use_anti_fraud_api": true, //existing parameter
"use_rates_fee_models": true //new parameter
}
'
To update the account-level configuration, send the request with the accountId
:
curl --request PUT \
--url 'https://sandbox.pismolabs.io/network-transactions-config/v1/config/account/{accountId}' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-tenant: <Org ID>' \
--data '
{
"use_anti_fraud_api": true, //existing parameter
"use_rates_fee_models": true //new parameter
}
'
Run the configuration DELETE request
To delete the org-level configuration:
curl --request DELETE \
--url 'https://sandbox.pismolabs.io/network-transactions-config/v1/config' \
--header 'accept: application/json'
--header 'x-tenant: <Org ID>'
To delete the program-level configuration:
curl --request DELETE \
--url 'https://sandbox.pismolabs.io/network-transactions-config/v1/config/program/{programId}' \
--header 'accept: application/json'
--header 'x-tenant: <Org ID>'
To delete the account-level configuration:
curl --request DELETE \
--url 'https://sandbox.pismolabs.io/network-transactions-config/v1/config/account/{accountId}' \
--header 'accept: application/json'
--header 'x-tenant: <Org ID>'
Examples
Example to override BIN validations
The result of this example configuration is twofold within the organization. BIN 123456 has all authorizations denied. Authorizations within BIN 87654321 have card status validation ignored for a recurring transaction with card status CANCELED.
curl --request POST \
--url 'https://sandbox.pismolabs.io/network-transactions-config/v1/config' \
--header 'Content-Type: application/json' \
--header 'x-tenant: <Org ID>' \
--data '{
"override_bins": {
"123456":
{
"deny_all_authorizations":true
},
"87654321":
{
"bypass_card_status_canceled":true
}
}
}
'
Example to update an existing configuration
At the end of this example configuration, the specified program starts using the Anti-fraud API and the Fee Models configured together with the Anti-fraud team.
- First, get the configurations for the org/program/account you want to update. In this example, the configuration of a program is updated.
curl --request GET \
--url 'https://sandbox.pismolabs.io/network-transactions-config/v1/config/program/{programId}' \
--header 'accept: application/json'
--header 'x-tenant: <Org ID>'
- Copy the GET result.
{"use_anti_fraud_api":true}
- Paste the GET result into the update request and add or update the desired parameters.
curl --request PUT \
--url 'https://sandbox.pismolabs.io/network-transactions-config/v1/config/program/{programId}' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-tenant: <Org ID>' \
--data '
{
"use_anti_fraud_api": true, //put the existing parameter
"use_rates_fee_models": true //add the new parameter
}
'
- [Optional] If you want to check the result of your configuration, perform a new GET. For this example, the result is this:
{"use_anti_fraud_api":true, "use_rates_fee_models": true}
Updated 6 days ago