- 03 May 2023
- 3 Minutes To Read
- Print
- DarkLight
- PDF
Authorization Holds Configuration
- Updated On 03 May 2023
- 3 Minutes To Read
- Print
- DarkLight
- PDF
Authorization Hold (also Card Authorization or Pre-authorization) is the practice of authorizing electronic transactions processed with a debit or a credit card and holding this balance as unavailable for the card-holder until either the merchant clears the transaction (settlement) or cancels it.
By default, authorization holds will expire after a period of seven days, although this can be changed to reflect your organizations’s policies. You can also set different expiry periods for specific Merchant Categories, in which case this period will be used for holds requested for that specific Merchant Category code.
For more information, see Authorization Holds.
With Configuration as Code (CasC), you may batch configure your authorization holds configuration via the API using YAML. For general information on CasC, see Configuration as Code Overview.
We strongly recommend that you use an end-to-end test to test any configuration changes in your sandbox environment before implementing them in your production environment.
The end-to-end test should check that the hourly AUTHORIZATION_HOLDS_EXPIRATION
cron job expires the correct authorization holds. For more information, see Hourly authorization holds cron job.
If, to perform your end-to-end test you have to set holds in the past, then please contact us through Mambu Support so that we can assist you with manipulating the data directly in the database.
API Operations
CasC for authorization holds supports two operations.
Action | Endpoint | Description |
---|---|---|
GET | /configuration/authorizationholds.yaml | Get current authorization holds configuration. |
PUT | /configuration/authorizationholds.yaml | Write a new authorization holds configuration to Mambu. |
If you PUT
a configuration to Mambu, any current configuration settings not included in the new YAML configuration will be deleted. PATCH
requests are not currently supported.
Requests
For general information on CasC requests such as authentication and required headers, see Configuration as Code Overview.
The following section shows sample requests using curl and basic authentication. For all examples, replace TENANT_NAME
with your actual tenant name.
GET configuration
curl -X GET 'https://TENANT_NAME.mambu.com/api/configuration/authorizationholds.yaml' \
-H 'Accept: application/vnd.mambu.v2+yaml' \
-H 'Authorization: Basic {auth}'
{auth} is the base-64-encoded value of username:password
. For more information, see Authentication in our API reference.
PUT configuration
curl -X PUT 'https://TENANT_NAME.mambu.com/api/configuration/authorizationholds.yaml' \
-H 'Accept: application/vnd.mambu.v2+yaml' \
-H 'Content-Type: application/yaml' \
-H 'Authorization: Basic {auth}' \
--data-binary @authorizationholds.yaml
{auth} is the base-64-encoded value of username:password
. For more information, see Authentication in our API reference.
@authorizationholds.yaml
represents the absolute path of the file on your device.
Use “--data-raw” if you want to specify the YAML body inline.
Configuration body example
---
defaultAuthorizationHold:
daysToExpiration: 1
authorizationHolds:
- mcc: 12171
daysToExpiration: 3
description: "12171 authorization hold"
- mcc: 12176
daysToExpiration: 3
description: "12176 authorization hold"
- mcc: 12179
daysToExpiration: 2
description: ""
Attributes
Name | Type | Description | Required |
---|---|---|---|
defaultAuthorizationHold | Authorization Hold Configuration | The authorization holds | ✔ |
defaultAuthorizationHold. daysToExpiration | Number | The number of days until expiration for the default authorization hold. | ✔ |
authorizationHolds | Authorization Hold Configuration | None | ✔ |
authorizationHolds.mcc | Number | The merchant category code of the authorization hold. | ✔ |
authorizationHolds. daysToExpiration | Number | The number of days until expiration for the authorization hold. | ✔ |
authorizationHolds.description | String | The description of the authorization hold. | ✘ |
Replies
If you do not receive a 200 OK
status code then fix any validation errors and make another PUT
request until you receive a 200 OK
status code.
If you PUT
a valid YAML configuration to the API and you do not receive a 200 OK
status code within 60 seconds, you may receive a 504 Gateway Timeout
status code. We expect all responses to be below 60 seconds.
If you encounter this issue, please contact us through Mambu Support so we can investigate it.
Validations
Name | Validations |
---|---|
defaultAuthorizationHold. daysToExpiration | The value must be between 1 and 36,525 days. |
authorizationHolds.mcc | The value must be unique. |
authorizationHolds. daysToExpiration | The value must be between 1 and 36,525 days. |
authorizationHolds.description | The description must not exceed 256 characters. |