Appearance
Webhooks
Maytes sends checkout.authorized when the customer's payment is authorized and your order is ready for its final fulfillment decision.
Handling checkout.authorized
checkout.authorized means the customer's funds are held and the checkout is ready to capture. It does not mean the order is paid yet.
Capture or cancel, then fulfill
First decide whether you can fulfill the order.
- Can fulfill: capture immediately. A successful capture means the money has moved. Mark the order paid and fulfill it.
- Cannot fulfill: cancel immediately. This releases the customer's hold. Do not fulfill the order.
Never fulfill from the webhook alone. Authorization makes capture possible, but capture can still fail; fulfill only after capture succeeds.
Fulfillment is your order-side action: confirm the booking, issue the ticket, release the goods, or otherwise commit to delivering what the customer bought.
Handle the event in this order:
- Verify the signature. If it fails, respond
400and stop. - Load your order from
merchant_order_idand run fast final checks, such as stock or fraud checks. - Capture or cancel. Capture when the order can be fulfilled; otherwise cancel.
- After capture succeeds, fulfill the order. Save the paid state or enqueue fulfillment durably before considering the event complete.
- Respond 2xx within 15 seconds. The authorization expires after 2 minutes, so this is not a deferred job.
See Capture & checkout status for complete handlers in every SDK language.
Retry safety: event deduplication and API idempotency
These solve different problems:
- Deduplicate on
event.idto stop your own side effects from running twice. A retried delivery keeps the same event id. - Capture and cancel are idempotent to stop Maytes' money operation from running twice. Repeating capture on an already-captured checkout is a successful no-op.
Idempotent capture does not stop you from issuing two tickets or sending two orders. Store the event id and mark it complete only after capture or cancel and your order update have succeeded. If that completed id arrives again, respond 2xx without repeating your work.
If capture succeeded but your order update failed, let the delivery retry. The repeated capture is safe, and your order update should also be idempotent using your merchant_order_id.
Event types
| Event | When it fires | What to do |
|---|---|---|
checkout.authorized | The customer completed payment in the Maytes window; funds are held. | If fulfillable, capture then fulfill. Otherwise cancel. The customer waits while you decide. |
checkout.voided | The authorization was released. data.reason is merchant_cancel (you canceled) or auth_expired (the hold lapsed before capture). | Release stock and mark the order unpaid. |
checkout.created | A checkout was created in your Maytes portal, or an expired one was reopened. Optional. | Record the order as awaiting payment. expires_at says until when. |
checkout.captured | Maytes took the payment itself, for a checkout created in your Maytes portal. Never sent for checkouts you capture. Optional; turn it on in your subscription. | Mark the order paid in your own system. |
checkout.expired | A checkout created in your Maytes portal ended unpaid at its expiry. Optional. | Mark the order unpaid. It may be reopened; you'd then get checkout.created again. |
marketing.opted_in | A customer ticked your marketing opt-in box on a Maytes screen (once marketing opt-in is enabled for your store). Sent for every tick, including a repeat on the same order. | Add or update the contact in your marketing tool. See Handling marketing.opted_in. |
checkout.refund.initiated | A refund was started on one of your checkouts: from your API, your portal, or by Maytes. Optional; turn it on in your subscription. | Note the refund against the order. See Handling refund events. |
checkout.refunded | Money went back to buyers on one of your checkouts. type says whether the order is now fully (full) or partly (partial) refunded. Optional. | Update the order balance from checkout.remaining_amount. |
checkout.refund.failed | Part of a refund could not be returned to a buyer (for example the card has since been cancelled). failed_amount and failure_reason say what and why. Optional. | Flag the order for follow-up; Maytes will resolve it and send checkout.refunded when the money goes back. |
webhook.test | Sent only when you trigger a test event from the portal; real checkouts never fire it. | Verify your endpoint end-to-end before going live. |
checkout.created, checkout.captured and checkout.expired are optional, and only sent for a checkout your staff created in the Maytes portal. Turn them on under Webhooks → Settings on any endpoint ("Portal checkouts"), or add them to event_types. Those checkouts never send checkout.authorized, because Maytes captures them and there's nothing for you to decide. For checkouts you create through the API there's no checkout.created or checkout.expired, and no checkout.captured: your capture call's 200 response is the confirmation.
All three carry the same data: checkout_uuid, merchant_order_id, status, amount, currency, origin, expires_at and captured_at (null until paid). A reopened checkout keeps its checkout_uuid, so you may see checkout.created, checkout.expired and checkout.created again for one checkout.
When subscribing, list the event types you want, or use "*" to receive everything.
The envelope
Every delivery has the same shape:
json
{
"id": "evt_0192aa10-...",
"type": "checkout.authorized",
"api_version": "2026-06",
"created_at": "2026-09-14T03:30:12.000Z",
"data": {
"checkout_uuid": "019fbb9e-ecd1-7059-99f3-f8bf47b63931",
"merchant_order_id": "order_1001",
"status": "authorized",
"amount": 4500,
"currency": "AUD",
"user_uuid": "0192a7c1-..."
}
}| Field | Meaning |
|---|---|
id | Stable event id, unchanged across every retry. Use it to deduplicate. |
type | The event type (see table above). |
api_version | Envelope schema version. Additive changes (new optional fields) do not bump it; breaking changes do. Ignore fields you don't recognize. |
created_at | When the event occurred. |
data | Per-event payload. |
Payloads are intentionally minimal. checkout.authorized includes what you need to capture directly: checkout_uuid, merchant_order_id, amount, and currency. For the full state, call GET /checkouts/{uuid}. checkout.voided includes checkout_uuid, merchant_order_id, status, and reason. checkout.captured includes checkout_uuid, merchant_order_id, status, amount, currency, origin (merchant_portal) and captured_at. marketing.opted_in and the refund events have their own payloads, described below.
Verify the signature
Every delivery is signed. Verify it with the backend SDK before trusting the request. One call verifies the signature and returns the parsed event:
ts
import express from 'express';
import { verifyWebhookSignature, WebhookSignatureError } from '@maytes/api-client-js';
// express.raw gives you the exact bytes we signed. Do NOT use express.json() here.
app.post('/webhooks/maytes', express.raw({ type: 'application/json' }), async (req, res) => {
try {
const event = verifyWebhookSignature(
req.body, // raw bytes
req.header('x-maytes-signature'),
process.env.MAYTES_WEBHOOK_SECRET,
);
// Verified. Safe to handle.
await handleMaytesEvent(event);
res.status(200).end();
} catch (err) {
if (err instanceof WebhookSignatureError) {
console.warn('rejected maytes webhook', err.reason);
return res.status(400).end();
}
throw err;
}
});python
import os
from flask import Flask, request
from maytes_api_client import verify_webhook_signature, WebhookSignatureError
@app.post("/webhooks/maytes")
def maytes_webhook():
try:
event = verify_webhook_signature(
request.get_data(), # raw bytes
request.headers.get("X-Maytes-Signature"),
os.environ["MAYTES_WEBHOOK_SECRET"],
)
except WebhookSignatureError as err:
app.logger.warning("rejected maytes webhook: %s", err.reason)
return "", 400
# Verified. Safe to handle.
handle_maytes_event(event)
return "", 200php
<?php
use MaytesApiClient\WebhookVerifier;
use MaytesApiClient\WebhookSignatureError;
try {
$event = WebhookVerifier::verify(
file_get_contents('php://input'), // raw body
$_SERVER['HTTP_X_MAYTES_SIGNATURE'] ?? null,
getenv('MAYTES_WEBHOOK_SECRET'),
);
} catch (WebhookSignatureError $e) {
error_log('rejected maytes webhook: ' . $e->getReason());
http_response_code(400);
return;
}
// Verified. Safe to handle.
handleMaytesEvent($event);
http_response_code(200);go
import maytes "github.com/maytes/api-client-go"
func maytesWebhook(w http.ResponseWriter, r *http.Request) {
rawBody, err := io.ReadAll(r.Body)
if err != nil {
w.WriteHeader(http.StatusBadRequest)
return
}
event, err := maytes.VerifyWebhookSignature(
rawBody,
r.Header.Get("X-Maytes-Signature"),
os.Getenv("MAYTES_WEBHOOK_SECRET"),
)
if err != nil {
log.Printf("rejected maytes webhook: %v", err)
w.WriteHeader(http.StatusBadRequest)
return
}
// Verified. Safe to handle.
handleMaytesEvent(event)
w.WriteHeader(http.StatusOK)
}java
import co.maytes.api.webhook.WebhookVerifier;
byte[] rawBody = request.getInputStream().readAllBytes();
try {
var event = WebhookVerifier.verify(
rawBody,
request.getHeader("X-Maytes-Signature"),
System.getenv("MAYTES_WEBHOOK_SECRET"));
// Verified. Safe to handle.
handleMaytesEvent(event);
response.setStatus(200);
} catch (WebhookVerifier.WebhookSignatureException e) {
logger.warn("rejected maytes webhook: {}", e.getReason());
response.setStatus(400);
}ruby
require 'maytes_api_client'
post '/webhooks/maytes' do
begin
event = MaytesApiClient.verify_webhook_signature(
request.body.read, # raw body
request.env['HTTP_X_MAYTES_SIGNATURE'],
ENV.fetch('MAYTES_WEBHOOK_SECRET'),
)
rescue MaytesApiClient::WebhookSignatureError => e
logger.warn("rejected maytes webhook: #{e.reason}")
halt 400
end
# Verified. Safe to handle.
handle_maytes_event(event)
status 200
endcsharp
using MaytesApiClient.Webhooks;
app.MapPost("/webhooks/maytes", async (HttpRequest request) =>
{
using var buffer = new MemoryStream();
await request.Body.CopyToAsync(buffer);
try
{
var evt = WebhookVerifier.Verify(
buffer.ToArray(), // raw bytes
request.Headers["X-Maytes-Signature"],
Environment.GetEnvironmentVariable("MAYTES_WEBHOOK_SECRET"));
// Verified. Safe to handle.
await HandleMaytesEventAsync(evt);
return Results.Ok();
}
catch (WebhookSignatureException e)
{
logger.LogWarning("rejected maytes webhook: {Reason}", e.Reason);
return Results.BadRequest();
}
});The SDK handles four security-sensitive checks:
| The SDK handles | What goes wrong without it |
|---|---|
| Hashes the raw bytes | Re-serializing JSON (JSON.stringify(req.body)) can change key order and number formatting, causing verification to fail. |
Accepts any matching v1= | During a secret rotation, the header carries two signatures. Reading only the first can reject valid traffic. |
| Constant-time comparison | A normal == on digests leaks how much of a forged signature was right, one byte at a time. |
| Rejects stale deliveries | Without a freshness check on t, a captured delivery stays replayable forever. |
Follow three rules:
- Give it the raw body. Use your framework's raw-body option (
express.raw,request.get_data(),php://input) and keep JSON middleware off this route. The call returns the parsed event, so you never parse it yourself. - Respond
400and stop when it throws. Don't log, queue, or retry the body. Treat the request as unverified. - Keep the signing secret server-side, in your secret manager alongside your OAuth credentials. It's shown once, when the subscription is created or rotated.
Log the error's reason to distinguish malformed_header, timestamp_out_of_tolerance (clock skew or replay), no_matching_signature (wrong secret or modified body), and invalid_json.
What the header looks like
Deliveries include the signature in X-Maytes-Signature and repeat the timestamp in X-Maytes-Timestamp:
X-Maytes-Signature: t=1757820612,v1=5257a869e7...,v1=7a3f0e11bc...
X-Maytes-Timestamp: 1757820612In the delivery log or a request dump, two v1 entries indicate a secret rotation within its grace window.
Let the SDK verify the header. We don't publish the signing algorithm because we can't update a deployed custom verifier when security issues arise, and verification failures can be silent. If we don't support your language, tell us; we'll prioritize support instead of asking you to write a verifier.
Handling marketing.opted_in
Once marketing opt-in is enabled for your store, Maytes shows your opt-in wording to the customer who placed the order (the lead) and to friends paying their share. Each time someone ticks your box, you receive marketing.opted_in. This is the only webhook that carries personal data, so store and handle it under your privacy policy.
json
{
"id": "evt_0192ab77-...",
"type": "marketing.opted_in",
"api_version": "2026-06",
"created_at": "2026-09-24T03:00:02.000Z",
"data": {
"customer_id": "6f1c2a3b-5c1e-5b9a-9d2f-3e4a5b6c7d8e",
"subject": "lead",
"order": {
"merchant_order_id": "order_1001",
"checkout_uuid": "019fbb9e-ecd1-7059-99f3-f8bf47b63931",
"payment_request_uuid": null
},
"customer": {
"name": "Ada Lovelace",
"email": "ada@example.com",
"phone": "+61400000001"
},
"opt_in": {
"email_marketing": true,
"sms_marketing": true,
"opted_in_at": "2026-09-24T03:00:00.000Z",
"placement": "success_page",
"text_version": 3
}
}
}| Field | Meaning |
|---|---|
customer_id | A stable id for this person at your store. Use it to match repeat opt-ins. The same person has a different customer_id at another merchant. |
subject | lead (the customer who placed the order) or friend (someone paying a share of it). |
order | The order the opt-in was given on. payment_request_uuid is set for a friend. It tells you where the opt-in happened, not whether the order was paid. Use checkout.authorized / checkout.voided for that. |
customer.email | The address the customer entered with this opt-in. A later opt-in from the same customer_id may carry a different address. The newest one is current. |
customer.name, customer.phone | From the customer's Maytes account at send time. phone is E.164 and is only included when the customer has verified it. Either may be null. |
opt_in.email_marketing, opt_in.sms_marketing | true for each channel we have a contact for, otherwise null. One tick covers both. |
opt_in.opted_in_at | When the customer ticked the box. |
opt_in.placement | Where the box was shown: success_page, pay_link, app, email_link or other. |
opt_in.text_version | The version of your opt-in wording the customer saw. Keep it with the contact as evidence of what they agreed to. |
To handle it:
- Verify the signature and deduplicate on
event.id, as for every event. - Upsert the contact keyed on
customer_id, usingcustomer.email(andcustomer.phonefor SMS if you use it). - Respond 2xx. There is no deadline beyond the 15-second timeout. If you fail, we keep retrying for about 3 days (see Delivery semantics).
After this, the relationship is yours. Unsubscribes happen in your own emails and tools, and Maytes doesn't need to be told. Every tick is sent, even from a customer who later unsubscribed from you. Treat a new marketing.opted_in as a fresh opt-in.
Handling refund events
Refund events are facts about money on a checkout, not steps of a request. checkout.refund.initiated says a refund was requested; checkout.refunded says money went back; checkout.refund.failed says some of it could not be returned. You get them for every refund on your checkouts, whoever started it, including refunds Maytes makes on your behalf and refunds to a friend's share of an order. All three are off until you add them to your subscription.
Reconcile on checkout.checkout_uuid, not on refund_id. Every event carries the checkout's running totals as they stood when the event was written, and checkout.refunded_amount only ever grows — so you can apply events in any order and a late retry can never move your balance backwards. refund_id is there to tie the event back to the request you made.
They carry the same data (failed adds failed_amount and failure_reason):
json
{
"id": "evt_0199...",
"type": "checkout.refunded",
"api_version": "2026-06",
"created_at": "2026-10-20T02:00:05.000Z",
"data": {
"refund_id": "0199a1b2-...",
"type": "partial",
"method": "card_refund",
"amount": 2500,
"currency": "AUD",
"reason": null,
"merchant_refund_ref": null,
"initiated_by": { "source": "maytes_admin", "user_uuid": null },
"initiated_at": "2026-10-20T01:00:00.000Z",
"refunded_at": "2026-10-20T02:00:00.000Z",
"review_in_portal": true,
"portal_url": "https://portal.maytes.co/checkouts/019fbb9e-ecd1-7059-99f3-f8bf47b63931",
"checkout": {
"checkout_uuid": "019fbb9e-ecd1-7059-99f3-f8bf47b63931",
"merchant_order_id": "order_1001",
"status": "captured",
"amount": 10000,
"refunded_amount": 2500,
"remaining_amount": 7500,
"captured_at": "2026-10-18T09:00:00.000Z"
}
}
}| Field | Meaning |
|---|---|
refund_id | The refund. The same value appears on every event about it. |
type | On initiated: what was requested, full (the whole order) or partial. On refunded: the outcome — full when nothing remains on the order after this, else partial. A full refund where one payment could not be returned shows as partial. |
method | How the money comes back. card_refund: to the cards that paid. hold_reduction: nothing goes back to a card; the organiser's hold is captured for that much less at 48 hours, so there is no matching Stripe refund and no refund fee. |
amount | What this refund returns, in minor units. |
reason, merchant_refund_ref | What you sent when you refunded through the API. null for portal refunds. |
initiated_by.source | merchant_api (your backend), merchant_portal (your team in the portal) or maytes_admin (Maytes on your behalf). |
initiated_by.user_uuid | The member of your team who started it in the portal. null for merchant_api and maytes_admin. |
initiated_at, refunded_at | When it was requested, and when the money went back (null on initiated). |
review_in_portal, portal_url | true with a link for a partial refund. We don't share who in a group was refunded, so check the details in the portal. false and null for a full refund. |
checkout.refunded_amount | Everything refunded on this order so far, including this refund on refunded but not yet on initiated. Never decreases. |
checkout.remaining_amount | checkout.amount minus checkout.refunded_amount. |
failed_amount, failure_reason | Only on failed: how much could not be returned, and the payment provider's reason (for example expired_or_canceled_card). |
The amounts describe the moment the event happened, so a retried delivery still shows the same figures. For the current state, call GET /checkouts/{uuid}.
To handle them:
- Verify the signature and deduplicate on
event.id. - Update the order balance from
checkout.remaining_amount; keeprefund_idagainst it for your records. - Respond 2xx. Failed deliveries are retried for about 3 days.
If a payment can't be returned (for example the buyer's card has since been cancelled), you get checkout.refund.failed for that part. If the rest of the refund did go back, a checkout.refunded with type: "partial" arrives alongside it, so the balance is still right. Maytes then resolves the failed part by hand and sends a further checkout.refunded when the money goes back. In the meantime GET /checkouts/{uuid} shows refunded_amount and remaining_amount as they stand.
Timing expectations
The authorization is short-lived, and the customer waits on a payment-processing screen:
| Stage | Expectation |
|---|---|
Delivery of checkout.authorized | Sent within seconds of the customer authorizing. |
| Your endpoint's response | Respond 2xx within 15 seconds — the enforced per-attempt timeout. A verification + inline capture fits comfortably. |
| Your capture (or cancel) | Immediately, in the handler. If it isn't captured, the authorization is automatically voided after 2 minutes. This window absorbs delivery retries and transient errors; it is not for deferred work. |
| If the window closes | You receive checkout.voided with reason: "auth_expired". The customer's payment doesn't complete, the order remains unpaid, and later capture attempts return 409 not_capturable. |
Capture inline in the handler. Keep pre-capture stock and fraud checks fast, and defer emails and warehouse calls until after you respond. Run longer checks before creating the checkout.
Delivery semantics
- At-least-once. The same event can be delivered more than once;
idis stable across retries. Deduplicate on it. - No ordering guarantee. Handle each event independently; don't assume
authorizedarrives before customer support sees the order. - 2xx means delivered. Anything else is a failure, recorded in your delivery log:
checkout.authorized(time-boxed by the 2-minute authorization window):- 408 / 429 / 5xx / network errors / timeouts → retried up to 3 times within the window, then parked for investigation.
- Other 4xx → not retried. Your endpoint rejected a well-formed delivery, possibly because of a wrong path, broken verifier, or unexpected content-type assertion. Fix the endpoint and check the delivery log.
checkout.createdis retried up to 3 times, likecheckout.authorized: it is out of date within minutes.checkout.voided,checkout.captured,checkout.expired,marketing.opted_inand the refund events aren't time-sensitive, so any non-2xx (including 4xx) is retried with increasing gaps for about 3 days (9 attempts), with the sameideach time.
- 15-second timeout per attempt. Respond promptly; do slow work after responding.
- Missed events: your safety net is reconciliation — for any order stuck in an unexpected state,
GET /checkouts/{uuid}gives you the current truth.
When your endpoint keeps failing
If a checkout or refund event can't be delivered, Maytes emails everyone on your team who can manage webhooks (Managers and Developers). The email says what your endpoint answered and links to the Webhooks page.
- The first failure emails straight away. If deliveries keep failing, reminders follow after 1 hour, then 6 hours, then once a day.
- The emails stop as soon as any delivery succeeds, including a test event. So after fixing your endpoint, send a test.
Managing your subscription
Manage the same subscription in the merchant portal, over the API, or with both.
In the portal (access comes with onboarding), you can:
- Set your endpoint URL and what it receives. Events are ticked in groups: Checkout authorisation, Portal checkouts, Refunds and Marketing. You only see the groups that apply to how you take payments.
- Add a second or third endpoint, to send a group somewhere else. See More than one endpoint.
- Add basic auth, if your endpoint sits behind a username and password. See Endpoints behind a password.
- Collect the signing secret at creation, and rotate it later.
- Send a
webhook.testevent to check your endpoint before real traffic depends on it. - Read the delivery log for every attempt and returned HTTP status.
Test events and the delivery log are available in both the portal and the API.
Manage over the API
Use your merchant OAuth credentials:
| Operation | Endpoint |
|---|---|
| Register or update your subscription (URL + event types) | POST /api/merchant/v1/webhooks/subscription |
| Read your subscription (URL + event types, never the secret) | GET /api/merchant/v1/webhooks/subscription |
Send a webhook.test event now and see how your endpoint answered | POST /api/merchant/v1/webhooks/test |
| Rotate the signing secret | POST /api/merchant/v1/webhooks/secret/rotate |
| List recent delivery attempts | GET /api/merchant/v1/webhooks/deliveries |
bash
curl -s https://api.maytes.co/api/merchant/v1/webhooks/subscription \
-H "authorization: Bearer $ACCESS_TOKEN" \
-H 'content-type: application/json' \
-d '{
"url": "https://shop.example.com/webhooks/maytes",
"event_types": ["checkout.authorized", "checkout.voided", "checkout.refund.initiated", "checkout.refunded", "checkout.refund.failed"]
}'You receive exactly the types you list (or everything, with ["*"]). Include the refund and marketing events here, or tick them in the portal, to receive them. Store the response's signing_secret immediately. It appears only when the subscription is first created and is not shown again. Updating the URL or event types doesn't change it.
More than one endpoint
You can have up to four endpoints, one per group of events, set up in the portal under Webhooks → Settings → Add endpoint. Use this to send one kind of event to a different system, for example marketing opt-ins straight to your CRM.
| Group | Events |
|---|---|
| Checkout authorisation | checkout.authorized, checkout.voided |
| Portal checkouts | checkout.created, checkout.captured, checkout.expired |
| Refunds | checkout.refund.initiated, checkout.refunded, checkout.refund.failed |
| Marketing | marketing.opted_in |
- A group goes to one endpoint at a time. To move a group, untick it on the endpoint that has it, then tick it on the other.
- You see the groups that apply to you. Checkout authorisation is for checkouts your own system creates through the API. Portal checkouts is for checkouts your staff create in the portal.
- Checkout authorisation stays on your main endpoint, the first one you set up, and is always on while you create checkouts through the API. To send it somewhere else, change that endpoint's URL. The main endpoint can't be deleted.
- Each endpoint has its own signing secret. Verify each endpoint's deliveries with that endpoint's secret. Authentication is optional and set per endpoint.
- The API calls on this page act on your main endpoint. Other endpoints are managed in the portal. Updating your subscription over the API with an event type another endpoint receives is refused with
409 event_types_on_another_endpoint.
Endpoints behind a password
If your endpoint is protected by HTTP basic auth, for example a staging site or a firewall rule, give Maytes the username and password. In the portal, open Webhooks → Settings, press Edit on the endpoint, press Set up next to Authentication under the endpoint URL, choose Basic auth, enter the username and password, press Done, then save the endpoint.
- Every delivery then carries
Authorization: Basic …as well as the signature headers. Keep verifying the signature: basic auth only gets the request to your endpoint. - The password is stored encrypted and never shown again. Leave it blank on a later edit to keep it, or type a new one to replace it.
- To stop sending it, press Change and choose None.
- If your endpoint answers
401, the test result and the alert email tell you whether to check the saved username and password or to add them. - This is set in the portal only. Updating your subscription over the API leaves it as it is.
Rotating your signing secret
To rotate without downtime:
- Rotate in the portal or through the API endpoint above. The response carries the new secret.
- For the next 2 hours, every delivery is signed with both secrets — two
v1entries in the header. Your verifier keeps matching on the old secret. - Deploy the new secret within the grace window. The old secret then stops being used automatically.
For a suspected leak, pass revoke_previous=true to skip the grace window and revoke the old secret immediately. Deliveries may fail until you deploy the new secret.
The delivery log
GET /api/merchant/v1/webhooks/deliveries (also available in the portal) returns every attempt with event_id, event_type, attempt_number, http_status, error_message, and duration_ms. Paginate with limit (default 50, max 200) and cursor.
Testing your endpoint
- In the sandbox environment, subscribe your endpoint. For local development, expose it through a tunnel such as ngrok or cloudflared; public HTTPS deliveries can't reach
localhostdirectly. - Send a
webhook.testevent from the portal, or withPOST /api/merchant/v1/webhooks/test. It bypasses your event-type filter and always arrives. Confirm signature verification passes and you respond 2xx. - Run a real test-card checkout end-to-end and confirm your handler captures. The sandbox environment page has the card numbers and a full pre-go-live checklist.
Endpoint requirements
- HTTPS, publicly reachable. An endpoint behind HTTP basic auth works once you add the username and password.
- Respond 2xx within 15 seconds once you've verified and recorded the event.
- Verify the signature on every request. The endpoint URL is guessable; the signature proves the delivery came from Maytes.
What's next
- Capture & checkout status — capture or cancel the authorized checkout, then complete the order.

