Home / Companies / WireMock / Blog / Post Details
Content Deep Dive

Mocking the Mastercard Send API

Blog post from WireMock

Post Details
Company
Date Published
Author
Tom Akehurst
Word Count
1,018
Company Posts That Month
5
Language
English
Hacker News Points
-
Summary

This guide details the process of creating a mock version of the Mastercard Send API using WireMock, focusing on the benefits of stateful mocking for realistic simulation. It explains the steps involved, starting from discovering the API's structure using Mastercard's developer portal and OpenAPI descriptions, to importing request data via Postman due to authentication complexities. The process includes developing a basic static mock, enhancing it to simulate stateful behavior by storing transfer data, and validating the mock against the original OpenAPI specifications to ensure compliance. The guide demonstrates how capturing real API traffic can aid in creating accurate and functional mock APIs, illustrating the mock's ability to simulate real-world API interactions, including creating and retrieving payment transfers. The completed mock is available for public use, offering a practical tool for testing and development without the risks associated with connecting to a live production API.

Trends Found in this Post

No tracked trend matches for this post yet.