{"openapi": "3.1.0", "info": {"title": "PaymentRetryAlert API", "version": "2026-10-05", "description": "Send the API key in `Authorization: Bearer <key>` and the version in `PaymentRetryAlert-Version`. These docs show the newest version."}, "paths": {"/v1/me": {"get": {"operationId": "src_public_api_me_get_me", "summary": "The key and its organisation", "parameters": [{"in": "header", "name": "PaymentRetryAlert-Version", "required": true, "schema": {"type": "string", "enum": ["2026-10-05"]}, "example": "2026-10-05"}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiKeyContext"}}}}}, "description": "The API key of the request and its organisation. Any valid key can\ncall it, so a tool can check a key before it uses it.", "tags": ["Key"], "security": [{"ApiKeyAuth": []}]}}, "/v1/enrolments": {"get": {"operationId": "src_public_api_enrolments_list_enrolments", "summary": "List enrolments", "parameters": [{"in": "header", "name": "PaymentRetryAlert-Version", "required": true, "schema": {"type": "string", "enum": ["2026-10-05"]}, "example": "2026-10-05"}, {"in": "query", "name": "limit", "schema": {"default": 100, "maximum": 100, "minimum": 1, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "offset", "schema": {"default": 0, "minimum": 0, "title": "Offset", "type": "integer"}, "required": false}, {"in": "query", "name": "sort", "schema": {"default": "-created_at", "enum": ["-created_at", "created_at"], "title": "Sort", "type": "string"}, "required": false}, {"in": "query", "name": "include_count", "schema": {"default": false, "title": "Include Count", "type": "boolean"}, "required": false}, {"in": "query", "name": "status", "schema": {"default": [], "items": {"description": "In lifecycle order. The code does not enforce the changes between them.", "enum": ["PENDING", "IN_PROGRESS", "ACTION_REQUIRED", "ENABLED", "PAUSED", "UNENROLLED", "FAILED", "CANCELLED"], "title": "EnrolmentStatus", "type": "string"}, "title": "Status", "type": "array"}, "required": false}, {"in": "query", "name": "mastercard_pop_mid", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mastercard Pop Mid"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnrolmentList"}}}}}, "description": "Newest first by default.", "tags": ["Enrolments"], "security": [{"ApiKeyAuth": []}]}, "post": {"operationId": "src_public_api_enrolments_create_enrolment", "summary": "Enrol a MID", "parameters": [{"in": "header", "name": "PaymentRetryAlert-Version", "required": true, "schema": {"type": "string", "enum": ["2026-10-05"]}, "example": "2026-10-05"}, {"in": "header", "name": "Idempotency-Key", "required": false, "schema": {"type": "string", "maxLength": 255}, "description": "Any string of printable ASCII, for example a UUID. A retry with the same key gets the same response for 24 hours."}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Enrolment"}}}}}, "description": "Pending until we send it to Mastercard. A test enrolment never goes to\nMastercard. The answer is the same when another organisation has the\nMID.", "tags": ["Enrolments"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnrolmentIn"}}}, "required": true}, "security": [{"ApiKeyAuth": []}]}}, "/v1/enrolments/{id}": {"get": {"operationId": "src_public_api_enrolments_get_enrolment", "summary": "Get an enrolment", "parameters": [{"in": "header", "name": "PaymentRetryAlert-Version", "required": true, "schema": {"type": "string", "enum": ["2026-10-05"]}, "example": "2026-10-05"}, {"in": "path", "name": "id", "schema": {"title": "Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Enrolment"}}}}}, "tags": ["Enrolments"], "security": [{"ApiKeyAuth": []}]}, "delete": {"operationId": "src_public_api_enrolments_delete_enrolment", "summary": "Unenrol a MID", "parameters": [{"in": "header", "name": "PaymentRetryAlert-Version", "required": true, "schema": {"type": "string", "enum": ["2026-10-05"]}, "example": "2026-10-05"}, {"in": "path", "name": "id", "schema": {"title": "Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Enrolment"}}}}}, "description": "A pending enrolment is cancelled at once. For the others, our team\nunenrols the MID with Mastercard: `unenrolment_requested_at` is set, and\nthe status changes when they are done. In a test organisation, set the\nstatus with `POST /v1/simulations/enrolments/{id}/status`. A second\nrequest while one waits changes nothing. An enrolment that is unenrolled,\nfailed or cancelled gives 409.", "tags": ["Enrolments"], "security": [{"ApiKeyAuth": []}]}}, "/v1/alerts": {"get": {"operationId": "src_public_api_alerts_list_alerts", "summary": "List alerts", "parameters": [{"in": "header", "name": "PaymentRetryAlert-Version", "required": true, "schema": {"type": "string", "enum": ["2026-10-05"]}, "example": "2026-10-05"}, {"in": "query", "name": "limit", "schema": {"default": 100, "maximum": 100, "minimum": 1, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "offset", "schema": {"default": 0, "minimum": 0, "title": "Offset", "type": "integer"}, "required": false}, {"in": "query", "name": "sort", "schema": {"default": "-created_at", "enum": ["-created_at", "created_at", "-transaction_time", "transaction_time"], "title": "Sort", "type": "string"}, "required": false}, {"in": "query", "name": "include_count", "schema": {"default": false, "title": "Include Count", "type": "boolean"}, "required": false}, {"in": "query", "name": "enrolment_id", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Enrolment Id"}, "required": false}, {"in": "query", "name": "enrolment_mid", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Enrolment Mid"}, "required": false}, {"in": "query", "name": "network_transaction_id", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Network Transaction Id"}, "required": false}, {"in": "query", "name": "card_bin", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Card Bin"}, "required": false}, {"in": "query", "name": "card_last_four", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Card Last Four"}, "required": false}, {"in": "query", "name": "transaction_time_gte", "schema": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Transaction Time Gte"}, "required": false}, {"in": "query", "name": "transaction_time_lte", "schema": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Transaction Time Lte"}, "required": false}, {"in": "query", "name": "created_at_gte", "schema": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Created At Gte"}, "required": false}, {"in": "query", "name": "created_at_lte", "schema": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Created At Lte"}, "required": false}, {"in": "query", "name": "retry_outcome", "schema": {"anyOf": [{"items": {"enum": ["SUCCEEDED", "FAILED", "NOT_ATTEMPTED", "NONE"], "type": "string"}, "type": "array"}, {"type": "null"}], "title": "Retry Outcome"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AlertList"}}}}}, "description": "Newest first by default. The filters are all ANDed.", "tags": ["Alerts"], "security": [{"ApiKeyAuth": []}]}}, "/v1/alerts/{id}": {"get": {"operationId": "src_public_api_alerts_get_alert", "summary": "Get an alert", "parameters": [{"in": "header", "name": "PaymentRetryAlert-Version", "required": true, "schema": {"type": "string", "enum": ["2026-10-05"]}, "example": "2026-10-05"}, {"in": "path", "name": "id", "schema": {"title": "Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Alert"}}}}}, "tags": ["Alerts"], "security": [{"ApiKeyAuth": []}]}, "patch": {"operationId": "src_public_api_alerts_update_alert", "summary": "Update an alert", "parameters": [{"in": "header", "name": "PaymentRetryAlert-Version", "required": true, "schema": {"type": "string", "enum": ["2026-10-05"]}, "example": "2026-10-05"}, {"in": "path", "name": "id", "schema": {"title": "Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Alert"}}}}}, "description": "Report the retry outcome: what happened when you retried the declined\npayment. The outcome can change later, also after it timed out. The same\noutcome again changes nothing, so a retry of the request is safe without\nIdempotency-Key. Each change records alert.updated.", "tags": ["Alerts"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AlertUpdate"}}}, "required": true}, "security": [{"ApiKeyAuth": []}]}}, "/v1/events": {"get": {"operationId": "src_public_api_events_list_events", "summary": "List events", "parameters": [{"in": "header", "name": "PaymentRetryAlert-Version", "required": true, "schema": {"type": "string", "enum": ["2026-10-05"]}, "example": "2026-10-05"}, {"in": "query", "name": "limit", "schema": {"default": 100, "maximum": 100, "minimum": 1, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "offset", "schema": {"default": 0, "minimum": 0, "title": "Offset", "type": "integer"}, "required": false}, {"in": "query", "name": "sort", "schema": {"default": "-created_at", "enum": ["-created_at", "created_at"], "title": "Sort", "type": "string"}, "required": false}, {"in": "query", "name": "include_count", "schema": {"default": false, "title": "Include Count", "type": "boolean"}, "required": false}, {"in": "query", "name": "starting_after", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "The ID of an object. The page has the objects after it, oldest first (not newest first). Not with offset or sort.", "title": "Starting After"}, "required": false, "description": "The ID of an object. The page has the objects after it, oldest first (not newest first). Not with offset or sort."}, {"in": "query", "name": "type", "schema": {"anyOf": [{"items": {"$ref": "#/components/schemas/EventType"}, "type": "array"}, {"type": "null"}], "title": "Type"}, "required": false}, {"in": "query", "name": "created_at_gte", "schema": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Created At Gte"}, "required": false}, {"in": "query", "name": "created_at_lte", "schema": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Created At Lte"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EventList"}}}}}, "description": "Newest first by default. All events of the organisation, of each\ntype: `events:read` is the only scope that they need.\n\nTo poll, send `starting_after` with the ID of the last event that you\ngot. The page has the events AFTER that event, oldest first (not newest\nfirst as without `starting_after`), and only events that are at least 30\nseconds old, so that no event of a slow transaction is skipped. Then\nsend the ID of the last event of each page. To start, take the newest\nevent that is at least 30 seconds old:\n`GET /v1/events?limit=1&created_at_lte=<now - 30 s>`. If the list is\nempty, wait and try again. A cursor that is younger than 30 seconds can\nskip an event that commits late.", "tags": ["Events"], "security": [{"ApiKeyAuth": []}]}}, "/v1/events/{id}": {"get": {"operationId": "src_public_api_events_get_event", "summary": "Get an event", "parameters": [{"in": "header", "name": "PaymentRetryAlert-Version", "required": true, "schema": {"type": "string", "enum": ["2026-10-05"]}, "example": "2026-10-05"}, {"in": "path", "name": "id", "schema": {"title": "Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EventOut"}}}}}, "description": "An event of another organisation is not found.", "tags": ["Events"], "security": [{"ApiKeyAuth": []}]}}, "/v1/webhook-endpoints": {"get": {"operationId": "src_public_api_webhooks_list_webhook_endpoints", "summary": "List webhook endpoints", "parameters": [{"in": "header", "name": "PaymentRetryAlert-Version", "required": true, "schema": {"type": "string", "enum": ["2026-10-05"]}, "example": "2026-10-05"}, {"in": "query", "name": "limit", "schema": {"default": 100, "maximum": 100, "minimum": 1, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "offset", "schema": {"default": 0, "minimum": 0, "title": "Offset", "type": "integer"}, "required": false}, {"in": "query", "name": "sort", "schema": {"default": "-created_at", "enum": ["-created_at", "created_at"], "title": "Sort", "type": "string"}, "required": false}, {"in": "query", "name": "include_count", "schema": {"default": false, "title": "Include Count", "type": "boolean"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookEndpointList"}}}}}, "description": "Newest first by default. Without the secrets.", "tags": ["Webhooks"], "security": [{"ApiKeyAuth": []}]}, "post": {"operationId": "src_public_api_webhooks_create_webhook_endpoint", "summary": "Create a webhook endpoint", "parameters": [{"in": "header", "name": "PaymentRetryAlert-Version", "required": true, "schema": {"type": "string", "enum": ["2026-10-05"]}, "example": "2026-10-05"}, {"in": "header", "name": "Idempotency-Key", "required": true, "schema": {"type": "string", "maxLength": 255}, "description": "Any string of printable ASCII, for example a UUID. A retry with the same key gets the same response for 24 hours."}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookEndpointWithSecret"}}}}}, "description": "The response has the signing secret, and no other response has it:\nstore it. A retry with the same Idempotency-Key gets the same secret and\nmakes no second endpoint. The endpoint gets its payloads in the version\nof this request. An organisation can have 20 endpoints.", "tags": ["Webhooks"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookEndpointIn"}}}, "required": true}, "security": [{"ApiKeyAuth": []}]}}, "/v1/webhook-endpoints/{id}": {"get": {"operationId": "src_public_api_webhooks_get_webhook_endpoint", "summary": "Get a webhook endpoint", "parameters": [{"in": "header", "name": "PaymentRetryAlert-Version", "required": true, "schema": {"type": "string", "enum": ["2026-10-05"]}, "example": "2026-10-05"}, {"in": "path", "name": "id", "schema": {"title": "Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookEndpoint"}}}}}, "description": "Without the secret.", "tags": ["Webhooks"], "security": [{"ApiKeyAuth": []}]}, "patch": {"operationId": "src_public_api_webhooks_update_webhook_endpoint", "summary": "Update a webhook endpoint", "parameters": [{"in": "header", "name": "PaymentRetryAlert-Version", "required": true, "schema": {"type": "string", "enum": ["2026-10-05"]}, "example": "2026-10-05"}, {"in": "path", "name": "id", "schema": {"title": "Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookEndpoint"}}}}}, "description": "The URL cannot change: make a new endpoint for a new URL. Disabling\ncancels the planned attempts. Enabling starts a new grace period for the\nhealth check, also for an endpoint that it disabled (`FAILING`). A new\n`api_version` changes only new deliveries: change the receiver first.", "tags": ["Webhooks"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookEndpointUpdate"}}}, "required": true}, "security": [{"ApiKeyAuth": []}]}, "delete": {"operationId": "src_public_api_webhooks_delete_webhook_endpoint", "summary": "Delete a webhook endpoint", "parameters": [{"in": "header", "name": "PaymentRetryAlert-Version", "required": true, "schema": {"type": "string", "enum": ["2026-10-05"]}, "example": "2026-10-05"}, {"in": "path", "name": "id", "schema": {"title": "Id", "type": "string"}, "required": true}], "responses": {"204": {"description": "No Content"}}, "description": "Cancels the planned attempts. The endpoint and its deliveries are not\nfound after this.", "tags": ["Webhooks"], "security": [{"ApiKeyAuth": []}]}}, "/v1/webhook-endpoints/{id}/deliveries": {"get": {"operationId": "src_public_api_webhooks_list_webhook_deliveries", "summary": "List the deliveries of a webhook endpoint", "parameters": [{"in": "header", "name": "PaymentRetryAlert-Version", "required": true, "schema": {"type": "string", "enum": ["2026-10-05"]}, "example": "2026-10-05"}, {"in": "path", "name": "id", "schema": {"title": "Id", "type": "string"}, "required": true}, {"in": "query", "name": "limit", "schema": {"default": 100, "maximum": 100, "minimum": 1, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "offset", "schema": {"default": 0, "minimum": 0, "title": "Offset", "type": "integer"}, "required": false}, {"in": "query", "name": "sort", "schema": {"default": "-created_at", "enum": ["-created_at", "created_at"], "title": "Sort", "type": "string"}, "required": false}, {"in": "query", "name": "include_count", "schema": {"default": false, "title": "Include Count", "type": "boolean"}, "required": false}, {"in": "query", "name": "status", "schema": {"default": [], "items": {"enum": ["PENDING", "RETRYING", "SUCCEEDED", "FAILED", "CANCELLED"], "title": "DeliveryStatus", "type": "string"}, "title": "Status", "type": "array"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookDeliveryList"}}}}}, "description": "Newest first by default. Without the attempts.", "tags": ["Webhooks"], "security": [{"ApiKeyAuth": []}]}}, "/v1/webhook-deliveries/{id}": {"get": {"operationId": "src_public_api_webhooks_get_webhook_delivery", "summary": "Get a webhook delivery", "parameters": [{"in": "header", "name": "PaymentRetryAlert-Version", "required": true, "schema": {"type": "string", "enum": ["2026-10-05"]}, "example": "2026-10-05"}, {"in": "path", "name": "id", "schema": {"title": "Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookDeliveryWithAttempts"}}}}}, "tags": ["Webhooks"], "security": [{"ApiKeyAuth": []}]}}, "/v1/webhook-deliveries/{id}/retry": {"post": {"operationId": "src_public_api_webhooks_retry_webhook_delivery", "summary": "Retry a webhook delivery", "parameters": [{"in": "header", "name": "PaymentRetryAlert-Version", "required": true, "schema": {"type": "string", "enum": ["2026-10-05"]}, "example": "2026-10-05"}, {"in": "header", "name": "Idempotency-Key", "required": false, "schema": {"type": "string", "maxLength": 255}, "description": "Any string of printable ASCII, for example a UUID. A retry with the same key gets the same response for 24 hours."}, {"in": "path", "name": "id", "schema": {"title": "Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookDeliveryWithAttempts"}}}}}, "description": "Sends the delivery now, with the same `webhook-id`. A planned\nautomatic attempt moves to now, and the automatic retries go on if it\nfails. Otherwise one manual attempt is made, which starts no new\nretries. 409 when the endpoint is disabled, or when the delivery is\nbeing sent now. 100 retries an hour for each organisation.", "tags": ["Webhooks"], "requestBody": {"content": {"application/json": {"schema": {"anyOf": [{"$ref": "#/components/schemas/DeliveryRetryIn"}, {"type": "null"}]}}}, "required": false}, "security": [{"ApiKeyAuth": []}]}}, "/v1/simulations/enrolments/{id}/status": {"post": {"operationId": "src_public_api_simulations_simulate_enrolment_status", "summary": "Simulate an enrolment status", "parameters": [{"in": "header", "name": "PaymentRetryAlert-Version", "required": true, "schema": {"type": "string", "enum": ["2026-10-05"]}, "example": "2026-10-05"}, {"in": "header", "name": "Idempotency-Key", "required": true, "schema": {"type": "string", "maxLength": 255}, "description": "Any string of printable ASCII, for example a UUID. A retry with the same key gets the same response for 24 hours."}, {"in": "path", "name": "id", "schema": {"title": "Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Enrolment"}}}}}, "description": "Sets the status as our team would: it records enrolment.updated and\nsends webhooks. The same status and notes again change nothing.", "tags": ["Simulations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SimulateStatusIn"}}}, "required": true}, "security": [{"ApiKeyAuth": []}]}}, "/v1/simulations/enrolments/{id}/alerts": {"post": {"operationId": "src_public_api_simulations_simulate_alert", "summary": "Simulate an alert", "parameters": [{"in": "header", "name": "PaymentRetryAlert-Version", "required": true, "schema": {"type": "string", "enum": ["2026-10-05"]}, "example": "2026-10-05"}, {"in": "header", "name": "Idempotency-Key", "required": true, "schema": {"type": "string", "maxLength": 255}, "description": "Any string of printable ASCII, for example a UUID. A retry with the same key gets the same response for 24 hours."}, {"in": "path", "name": "id", "schema": {"title": "Id", "type": "string"}, "required": true}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Alert"}}}}}, "description": "Makes a Mastercard RETRY_NOW alert for an enrolment that is in progress\nor enabled, as a real notification would: it records alert.created and\nsends webhooks. Give the card and transaction values of a test payment\nin your system to test how you match alerts to payments.", "tags": ["Simulations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SimulateAlertIn"}}}, "required": true}, "security": [{"ApiKeyAuth": []}]}}}, "components": {"schemas": {"ApiKeyContext": {"properties": {"object": {"const": "api_key_context", "title": "Object", "type": "string"}, "organisation": {"$ref": "#/components/schemas/MeOrganisation"}, "api_key": {"$ref": "#/components/schemas/MeApiKey"}}, "required": ["object", "organisation", "api_key"], "title": "ApiKeyContext", "type": "object"}, "ApiKeySource": {"enum": ["DASHBOARD", "CLI"], "title": "ApiKeySource", "type": "string"}, "MeApiKey": {"properties": {"id": {"title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "scopes": {"items": {"type": "string"}, "title": "Scopes", "type": "array"}, "source": {"$ref": "#/components/schemas/ApiKeySource"}, "expires_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Expires At"}}, "required": ["id", "name", "scopes", "source", "expires_at"], "title": "MeApiKey", "type": "object"}, "MeOrganisation": {"properties": {"id": {"title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "mode": {"$ref": "#/components/schemas/OrganisationMode"}}, "required": ["id", "name", "mode"], "title": "MeOrganisation", "type": "object"}, "OrganisationMode": {"enum": ["LIVE", "TEST"], "title": "OrganisationMode", "type": "string"}, "EnrolmentQuery": {"properties": {"limit": {"default": 100, "maximum": 100, "minimum": 1, "title": "Limit", "type": "integer"}, "offset": {"default": 0, "minimum": 0, "title": "Offset", "type": "integer"}, "sort": {"default": "-created_at", "enum": ["-created_at", "created_at"], "title": "Sort", "type": "string"}, "include_count": {"default": false, "title": "Include Count", "type": "boolean"}, "status": {"default": [], "items": {"description": "In lifecycle order. The code does not enforce the changes between them.", "enum": ["PENDING", "IN_PROGRESS", "ACTION_REQUIRED", "ENABLED", "PAUSED", "UNENROLLED", "FAILED", "CANCELLED"], "title": "EnrolmentStatus", "type": "string"}, "title": "Status", "type": "array"}, "mastercard_pop_mid": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mastercard Pop Mid"}}, "title": "EnrolmentQuery", "type": "object"}, "EnrolmentStatus": {"description": "In lifecycle order. The code does not enforce the changes between them.", "enum": ["PENDING", "IN_PROGRESS", "ACTION_REQUIRED", "ENABLED", "PAUSED", "UNENROLLED", "FAILED", "CANCELLED"], "title": "EnrolmentStatus", "type": "string"}, "Enrolment": {"properties": {"id": {"title": "Id", "type": "string"}, "object": {"const": "enrolment", "title": "Object", "type": "string"}, "organisation_id": {"title": "Organisation Id", "type": "string"}, "type": {"$ref": "#/components/schemas/EnrolmentType"}, "status": {"$ref": "#/components/schemas/EnrolmentStatus"}, "mastercard_pop_mid": {"title": "Mastercard Pop Mid", "type": "string"}, "notes": {"title": "Notes", "type": "string"}, "status_changed_at": {"format": "date-time", "title": "Status Changed At", "type": "string"}, "enabled_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Enabled At"}, "unenrolment_requested_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Unenrolment Requested At"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "object", "organisation_id", "type", "status", "mastercard_pop_mid", "notes", "status_changed_at", "enabled_at", "unenrolment_requested_at", "created_at"], "title": "Enrolment", "type": "object"}, "EnrolmentList": {"properties": {"items": {"items": {"$ref": "#/components/schemas/Enrolment"}, "title": "Items", "type": "array"}, "count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Count"}}, "required": ["items"], "title": "EnrolmentList", "type": "object"}, "EnrolmentType": {"enum": ["MASTERCARD_POP"], "title": "EnrolmentType", "type": "string"}, "EnrolmentIn": {"additionalProperties": false, "description": "Mastercard POP is the only type, so the MID is all we need.", "properties": {"mastercard_pop_mid": {"title": "Mastercard Pop Mid", "type": "string"}}, "required": ["mastercard_pop_mid"], "title": "EnrolmentIn", "type": "object"}, "AlertQuery": {"properties": {"limit": {"default": 100, "maximum": 100, "minimum": 1, "title": "Limit", "type": "integer"}, "offset": {"default": 0, "minimum": 0, "title": "Offset", "type": "integer"}, "sort": {"default": "-created_at", "enum": ["-created_at", "created_at", "-transaction_time", "transaction_time"], "title": "Sort", "type": "string"}, "include_count": {"default": false, "title": "Include Count", "type": "boolean"}, "enrolment_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Enrolment Id"}, "enrolment_mid": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Enrolment Mid"}, "network_transaction_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Network Transaction Id"}, "card_bin": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Card Bin"}, "card_last_four": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Card Last Four"}, "transaction_time_gte": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Transaction Time Gte"}, "transaction_time_lte": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Transaction Time Lte"}, "created_at_gte": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Created At Gte"}, "created_at_lte": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Created At Lte"}, "retry_outcome": {"anyOf": [{"items": {"enum": ["SUCCEEDED", "FAILED", "NOT_ATTEMPTED", "NONE"], "type": "string"}, "type": "array"}, {"type": "null"}], "title": "Retry Outcome"}}, "title": "AlertQuery", "type": "object"}, "Alert": {"description": "Only the fields that Mastercard and Visa both send, so that the object\nis the same for each card scheme. The fields of one network stay on the\nalert detail page. Not the raw payload: it is in the network's format,\nwhich can change.", "properties": {"id": {"title": "Id", "type": "string"}, "object": {"const": "alert", "title": "Object", "type": "string"}, "organisation_id": {"title": "Organisation Id", "type": "string"}, "enrolment_id": {"title": "Enrolment Id", "type": "string"}, "enrolment_mid": {"title": "Enrolment Mid", "type": "string"}, "card_scheme": {"$ref": "#/components/schemas/CardScheme"}, "notification_type": {"title": "Notification Type", "type": "string"}, "transaction_time": {"format": "date-time", "title": "Transaction Time", "type": "string"}, "transaction_amount_in_cents": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Transaction Amount In Cents"}, "transaction_currency": {"title": "Transaction Currency", "type": "string"}, "network_transaction_id": {"title": "Network Transaction Id", "type": "string"}, "card_bin": {"title": "Card Bin", "type": "string"}, "card_last_four": {"title": "Card Last Four", "type": "string"}, "retry_outcome": {"anyOf": [{"$ref": "#/components/schemas/RetryOutcome"}, {"type": "null"}]}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "object", "organisation_id", "enrolment_id", "enrolment_mid", "card_scheme", "notification_type", "transaction_time", "transaction_amount_in_cents", "transaction_currency", "network_transaction_id", "card_bin", "card_last_four", "retry_outcome", "created_at"], "title": "Alert", "type": "object"}, "AlertList": {"properties": {"items": {"items": {"$ref": "#/components/schemas/Alert"}, "title": "Items", "type": "array"}, "count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Count"}}, "required": ["items"], "title": "AlertList", "type": "object"}, "CardScheme": {"enum": ["MASTERCARD", "VISA"], "title": "CardScheme", "type": "string"}, "RetryOutcome": {"description": "What happened when the customer retried the declined payment.", "enum": ["SUCCEEDED", "FAILED", "NOT_ATTEMPTED"], "title": "RetryOutcome", "type": "string"}, "AlertUpdate": {"additionalProperties": false, "description": "The fields that a client can change, with the names of the object.\nToday only `retry_outcome`, so it is required. It cannot become null\nagain.", "properties": {"retry_outcome": {"$ref": "#/components/schemas/RetryOutcome"}}, "required": ["retry_outcome"], "title": "AlertUpdate", "type": "object"}, "EventListQuery": {"properties": {"limit": {"default": 100, "maximum": 100, "minimum": 1, "title": "Limit", "type": "integer"}, "offset": {"default": 0, "minimum": 0, "title": "Offset", "type": "integer"}, "sort": {"default": "-created_at", "enum": ["-created_at", "created_at"], "title": "Sort", "type": "string"}, "include_count": {"default": false, "title": "Include Count", "type": "boolean"}, "starting_after": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "The ID of an object. The page has the objects after it, oldest first (not newest first). Not with offset or sort.", "title": "Starting After"}, "type": {"anyOf": [{"items": {"$ref": "#/components/schemas/EventType"}, "type": "array"}, {"type": "null"}], "title": "Type"}, "created_at_gte": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Created At Gte"}, "created_at_lte": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Created At Lte"}}, "title": "EventListQuery", "type": "object"}, "EventType": {"enum": ["enrolment.created", "enrolment.updated", "alert.created", "alert.updated"], "title": "EventType", "type": "string"}, "EventData": {"properties": {"object": {"additionalProperties": true, "title": "Object", "type": "object"}, "previous_attributes": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Previous Attributes"}}, "required": ["object"], "title": "EventData", "type": "object"}, "EventList": {"properties": {"items": {"items": {"$ref": "#/components/schemas/EventOut"}, "title": "Items", "type": "array"}, "count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Count"}}, "required": ["items"], "title": "EventList", "type": "object"}, "EventOut": {"description": "The same body as the webhook of the event.", "properties": {"id": {"title": "Id", "type": "string"}, "object": {"const": "event", "title": "Object", "type": "string"}, "type": {"$ref": "#/components/schemas/EventType"}, "api_version": {"title": "Api Version", "type": "string"}, "organisation_mode": {"$ref": "#/components/schemas/OrganisationMode"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "data": {"$ref": "#/components/schemas/EventData"}}, "required": ["id", "object", "type", "api_version", "organisation_mode", "created_at", "data"], "title": "EventOut", "type": "object"}, "ListQuery": {"properties": {"limit": {"default": 100, "maximum": 100, "minimum": 1, "title": "Limit", "type": "integer"}, "offset": {"default": 0, "minimum": 0, "title": "Offset", "type": "integer"}, "sort": {"default": "-created_at", "enum": ["-created_at", "created_at"], "title": "Sort", "type": "string"}, "include_count": {"default": false, "title": "Include Count", "type": "boolean"}}, "title": "ListQuery", "type": "object"}, "DisabledReason": {"enum": ["MANUAL", "FAILING"], "title": "DisabledReason", "type": "string"}, "WebhookEndpoint": {"properties": {"id": {"title": "Id", "type": "string"}, "object": {"const": "webhook_endpoint", "title": "Object", "type": "string"}, "url": {"title": "Url", "type": "string"}, "description": {"title": "Description", "type": "string"}, "event_types": {"items": {"$ref": "#/components/schemas/EventType"}, "title": "Event Types", "type": "array"}, "is_active": {"title": "Is Active", "type": "boolean"}, "api_version": {"title": "Api Version", "type": "string"}, "disabled_reason": {"anyOf": [{"$ref": "#/components/schemas/DisabledReason"}, {"type": "null"}]}, "disabled_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Disabled At"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "object", "url", "description", "event_types", "is_active", "api_version", "disabled_reason", "disabled_at", "created_at"], "title": "WebhookEndpoint", "type": "object"}, "WebhookEndpointList": {"properties": {"items": {"items": {"$ref": "#/components/schemas/WebhookEndpoint"}, "title": "Items", "type": "array"}, "count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Count"}}, "required": ["items"], "title": "WebhookEndpointList", "type": "object"}, "WebhookEndpointWithSecret": {"properties": {"id": {"title": "Id", "type": "string"}, "object": {"const": "webhook_endpoint", "title": "Object", "type": "string"}, "url": {"title": "Url", "type": "string"}, "description": {"title": "Description", "type": "string"}, "event_types": {"items": {"$ref": "#/components/schemas/EventType"}, "title": "Event Types", "type": "array"}, "is_active": {"title": "Is Active", "type": "boolean"}, "api_version": {"title": "Api Version", "type": "string"}, "disabled_reason": {"anyOf": [{"$ref": "#/components/schemas/DisabledReason"}, {"type": "null"}]}, "disabled_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Disabled At"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "secret": {"title": "Secret", "type": "string"}}, "required": ["id", "object", "url", "description", "event_types", "is_active", "api_version", "disabled_reason", "disabled_at", "created_at", "secret"], "title": "WebhookEndpointWithSecret", "type": "object"}, "WebhookEndpointIn": {"additionalProperties": false, "properties": {"url": {"maxLength": 2048, "title": "Url", "type": "string"}, "event_types": {"items": {"$ref": "#/components/schemas/EventType"}, "minItems": 1, "title": "Event Types", "type": "array"}, "description": {"default": "", "maxLength": 255, "title": "Description", "type": "string"}}, "required": ["url", "event_types"], "title": "WebhookEndpointIn", "type": "object"}, "WebhookEndpointUpdate": {"additionalProperties": false, "description": "The URL cannot change: make a new endpoint for a new URL.", "properties": {"description": {"anyOf": [{"maxLength": 255, "type": "string"}, {"type": "null"}], "title": "Description"}, "event_types": {"anyOf": [{"items": {"$ref": "#/components/schemas/EventType"}, "minItems": 1, "type": "array"}, {"type": "null"}], "title": "Event Types"}, "is_active": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Active"}, "api_version": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Api Version"}}, "title": "WebhookEndpointUpdate", "type": "object"}, "DeliveryQuery": {"properties": {"limit": {"default": 100, "maximum": 100, "minimum": 1, "title": "Limit", "type": "integer"}, "offset": {"default": 0, "minimum": 0, "title": "Offset", "type": "integer"}, "sort": {"default": "-created_at", "enum": ["-created_at", "created_at"], "title": "Sort", "type": "string"}, "include_count": {"default": false, "title": "Include Count", "type": "boolean"}, "status": {"default": [], "items": {"enum": ["PENDING", "RETRYING", "SUCCEEDED", "FAILED", "CANCELLED"], "title": "DeliveryStatus", "type": "string"}, "title": "Status", "type": "array"}}, "title": "DeliveryQuery", "type": "object"}, "DeliveryStatus": {"enum": ["PENDING", "RETRYING", "SUCCEEDED", "FAILED", "CANCELLED"], "title": "DeliveryStatus", "type": "string"}, "WebhookDelivery": {"properties": {"id": {"title": "Id", "type": "string"}, "object": {"const": "webhook_delivery", "title": "Object", "type": "string"}, "endpoint_id": {"title": "Endpoint Id", "type": "string"}, "event_id": {"title": "Event Id", "type": "string"}, "event_type": {"$ref": "#/components/schemas/EventType"}, "status": {"$ref": "#/components/schemas/DeliveryStatus"}, "next_attempt_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Next Attempt At"}, "api_version": {"title": "Api Version", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "object", "endpoint_id", "event_id", "event_type", "status", "next_attempt_at", "api_version", "created_at"], "title": "WebhookDelivery", "type": "object"}, "WebhookDeliveryList": {"properties": {"items": {"items": {"$ref": "#/components/schemas/WebhookDelivery"}, "title": "Items", "type": "array"}, "count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Count"}}, "required": ["items"], "title": "WebhookDeliveryList", "type": "object"}, "AttemptStatus": {"enum": ["PENDING", "SENDING", "SUCCEEDED", "FAILED", "CANCELLED"], "title": "AttemptStatus", "type": "string"}, "AttemptTrigger": {"enum": ["AUTOMATIC", "MANUAL"], "title": "AttemptTrigger", "type": "string"}, "WebhookDeliveryAttempt": {"properties": {"id": {"title": "Id", "type": "string"}, "object": {"const": "webhook_delivery_attempt", "title": "Object", "type": "string"}, "number": {"title": "Number", "type": "integer"}, "trigger": {"$ref": "#/components/schemas/AttemptTrigger"}, "status": {"$ref": "#/components/schemas/AttemptStatus"}, "scheduled_for": {"format": "date-time", "title": "Scheduled For", "type": "string"}, "started_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Started At"}, "finished_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Finished At"}, "response_status": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Response Status"}, "response_body": {"title": "Response Body", "type": "string"}, "error": {"title": "Error", "type": "string"}, "duration_ms": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Duration Ms"}}, "required": ["id", "object", "number", "trigger", "status", "scheduled_for", "started_at", "finished_at", "response_status", "response_body", "error", "duration_ms"], "title": "WebhookDeliveryAttempt", "type": "object"}, "WebhookDeliveryWithAttempts": {"properties": {"id": {"title": "Id", "type": "string"}, "object": {"const": "webhook_delivery", "title": "Object", "type": "string"}, "endpoint_id": {"title": "Endpoint Id", "type": "string"}, "event_id": {"title": "Event Id", "type": "string"}, "event_type": {"$ref": "#/components/schemas/EventType"}, "status": {"$ref": "#/components/schemas/DeliveryStatus"}, "next_attempt_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Next Attempt At"}, "api_version": {"title": "Api Version", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "attempts": {"items": {"$ref": "#/components/schemas/WebhookDeliveryAttempt"}, "title": "Attempts", "type": "array"}}, "required": ["id", "object", "endpoint_id", "event_id", "event_type", "status", "next_attempt_at", "api_version", "created_at", "attempts"], "title": "WebhookDeliveryWithAttempts", "type": "object"}, "DeliveryRetryIn": {"additionalProperties": false, "description": "The retry takes no fields. The body is optional.", "properties": {}, "title": "DeliveryRetryIn", "type": "object"}, "SimulateStatusIn": {"additionalProperties": false, "properties": {"status": {"$ref": "#/components/schemas/EnrolmentStatus"}, "notes": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Notes"}}, "required": ["status"], "title": "SimulateStatusIn", "type": "object"}, "SimulateAlertIn": {"additionalProperties": false, "description": "Leave a value out for its default: a random time 1 to 72 hours ago, a\nrandom amount of 500 to 50,000 minor units, USD, BIN 512345, random last\nfour digits and a random UUID as the network transaction ID.", "properties": {"transaction_time": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Transaction Time"}, "transaction_amount_in_cents": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Transaction Amount In Cents"}, "transaction_currency": {"anyOf": [{"$ref": "#/components/schemas/SimulatedCurrency"}, {"type": "null"}]}, "card_bin": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Card Bin"}, "card_last_four": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Card Last Four"}, "network_transaction_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Network Transaction Id"}}, "title": "SimulateAlertIn", "type": "object"}, "SimulatedCurrency": {"enum": ["USD", "EUR", "PLN", "JPY"], "title": "SimulatedCurrency", "type": "string"}}, "securitySchemes": {"ApiKeyAuth": {"type": "http", "scheme": "bearer"}}}, "servers": []}