Testing your integration for breaking changes
You can test for API changes that could break an integration by generating chaotic responses. Chaotic responses include random data elements and sequencing changes that your integration may not expect, but which are valid non-breaking changes. This allows you to verify that your integration will remain compatible with future API versions.
Chaotic response FAQs
- What are the preconditions to use chaotic responses?
The preconditions to use chaotic responses are as follows:
- Only applicable to REST-JSON API requests.
- Not designed for Name-Value Pair (NVP) API requests.
- Only available for test merchants.
- Merchants must configure this capability in the Merchant Administrator application to enable or disable it.
- When can integrators use the Chaos Generator tool?
The Chaos Generator tool is available now for use. The Integrators can test their current integrations using chaotic responses to verify if their API response parser can handle unexpected responses in a "non-breaking" manner. The response parser will ignore tags that are not required. - How are chaotic responses enabled?
To enable chaotic responses:- Enable the header name X-MC-Chaotic-Response in the list of headers sent in the request.
- This header does not require a value and enables chaotic responses, that is, it allows the injection of chaos nodes in the response body. Only the header name must be present in the headers sent in the request.
- The request header is: X-MC-Chaotic-Response
- The response header is: "X-MC-Chaotic-Response-<12 last characters of an UUID>"
- Are there pre-built Postman examples for the Chaos Generator?
Yes, a Postman collection and environment are available from the Downloads page to help with testing. - Does Mastercard Gateway offer support for changes required after chaos testing?
Contact the Mastercard Gateway support team at gateway_support@mastercard.com if you need support to make changes after chaos testing. This may require opening a project with the Mastercard Gateway Implementation team.