Skip to Content
Docs

Test risk events

Use Pay.com's simulate endpoints to trigger disputes, collaborations, and fraud warnings in the sandbox.

In the live environment, disputes, collaborations, and fraud warnings are created by card networks and payment processors, not by you. Pay.com receives each event and notifies you via webhook, updating the dashboard at the same time.

In the sandbox, Pay.com provides simulate endpoints so you can trigger these events against a test charge and verify that your integration handles them correctly.

How simulation works

Simulate endpoints work only in the sandbox. In the live environment, they return 403. When you call one, the API responds with 204 No Content and returns no object. Pay.com creates the risk event, delivers the corresponding webhook to your registered endpoint, and updates the dashboard. Take the new object's ID from the webhook payload.

Always verify the Pay-Signature header before processing any event. See Verify webhook signatures.

Before you start

To run the simulate calls, you need:

  • A charge created in the sandbox. Follow the steps in Create a charge to get a chrg_... ID.
  • A webhook endpoint registered in Pay.com. See Webhooks to configure an endpoint, then subscribe to the events you want to test.

Simulate a dispute

Use the Simulate dispute endpoint to create a test dispute on a sandbox charge or move an existing dispute to another status. Pass the status in the path, not the request body. POST /v1/charges/{charge_id}/simulate/dispute creates an open dispute, and POST /v1/charges/{charge_id}/simulate/dispute/{status} sets the status you name. For all 15 supported statuses, eligible payment methods, and a full lifecycle test, see Simulate a dispute in the sandbox.

POST /v1/charges/chrg_692434850019280896/simulate/dispute

Returns 204 No Content. Pay.com creates a dispute with status: "open" and delivers a dispute.open webhook to your endpoint.

Webhook payload

When the dispute is created, Pay.com delivers a dispute.open event to your endpoint. The evidence_required_by field shows the deadline to submit evidence. Amounts are in the currency's smallest unit, so 5000 is $50.00 USD.

{
  "id": "evt_692434889852583936",
  "resource": "event",
  "type": "dispute.open",
  "created": "2026-03-26T18:09:02.560Z",
  "data": {
    "id": "dspt_692434889303132160",
    "resource": "dispute",
    "amount": 5000,
    "amount_human_readable": "50.00",
    "arn": "80597117747",
    "charge": "chrg_692434850019280896",
    "chargeback_type": "chargeback",
    "created": "2026-03-26T18:09:02.414Z",
    "currency": "usd",
    "evidence_required_by": "2026-04-02T00:00:00.000Z",
    "evidences": {
      "data": [],
      "url": "/v1/disputes/dspt_692434889303132160/evidences"
    },
    "metadata": {},
    "reason": "consumer_disputes",
    "reason_code": "4841",
    "status": "open",
    "test_mode": true
  }
}

Use data.id (the dspt_... ID) to take action on the dispute:

Simulate a collaboration

Use the Simulate collaboration endpoint to create a test collaboration alert on an existing charge. The source field controls which collaboration service is simulated: mc_collaboration (the default), ethoca, or cdrn. The actionable_by field sets the response deadline and defaults to 15 days from now.

POST /v1/charges/chrg_692357623269296128/simulate/collaboration

{
  "source": "mc_collaboration",
  "actionable_by": "2026-04-05T10:30:00Z"
}

Returns 204 No Content.

Webhook payloads

When the alert arrives, Pay.com delivers a collaboration.open event to your endpoint. The actionable_by field shows the deadline to respond.

{
  "id": "evt_692431062717956096",
  "resource": "event",
  "type": "collaboration.open",
  "created": "2026-03-26T17:53:50.101Z",
  "data": {
    "id": "clbr_692431062306915328",
    "resource": "collaboration",
    "actionable_by": "2026-04-05T10:30:00.000Z",
    "amount": 9500,
    "amount_human_readable": "95.00",
    "charge": "chrg_692357623269296128",
    "created": "2026-03-26T17:53:50.001Z",
    "currency": "usd",
    "source": "mc_collaboration",
    "status": "open",
    "test_mode": true
  }
}

Use data.id (the clbr_... ID) to take action on the collaboration:

{
  "id": "evt_692433893155931136",
  "resource": "event",
  "type": "collaboration.resolved",
  "created": "2026-03-26T18:05:04.929Z",
  "data": {
    "id": "clbr_692431062306915328",
    "resource": "collaboration",
    "actionable_by": "2026-04-05T10:30:00.000Z",
    "amount": 9500,
    "amount_human_readable": "95.00",
    "charge": "chrg_692357623269296128",
    "created": "2026-03-26T17:53:50.001Z",
    "currency": "usd",
    "source": "mc_collaboration",
    "status": "resolved",
    "test_mode": true
  }
}

Simulate a fraud warning

Use the Simulate fraud warning endpoint to create a test fraud warning on an existing charge. Set actionable to true to simulate a warning where you can still refund the charge. Set it to false to simulate a warning where the actionable window has already passed.

All body fields are optional. type defaults to made_with_lost_card, and actionable defaults to false. The fraud warning's ID is frdwrn_ followed by the charge ID's digits.

POST /v1/charges/chrg_692434592824557568/simulate/fraud_warning

{
  "type": "made_with_lost_card",
  "input_method": "swiped",
  "actionable": false,
  "raw_code": "7523"
}

The resulting warning has actionable: false, meaning no further action is possible.

For the full list of supported type values, see the Simulate fraud warning API reference.

Webhook payload

When the fraud warning is created, Pay.com delivers a fraud_warning.created event to your endpoint. Check actionable first to decide whether to issue a refund. When it is true, use data.charge to retrieve the transaction and issue a refund before a formal chargeback is filed.

{
  "id": "evt_692434631277939712",
  "resource": "event",
  "type": "fraud_warning.created",
  "created": "2026-03-26T18:08:01.011Z",
  "data": {
    "id": "frdwrn_692434592824557568",
    "resource": "fraud_warning",
    "actionable": true,
    "amount": 6000,
    "amount_human_readable": "60.00",
    "charge": "chrg_692434592824557568",
    "created": "2026-03-26T18:08:00.504Z",
    "currency": "usd",
    "fraud_type": "made_with_stolen_card",
    "payment_method": "pm_card_692434600374304768",
    "payment_method_details": {
      "card": {
        "bin": "555555",
        "brand": "mastercard",
        "last4": "4444",
        "exp_month": "12",
        "exp_year": "2028",
        "network": "mastercard",
        "country": "CY"
      },
      "type": "card"
    },
    "reference": null,
    "test_mode": true
  }
}

Next steps

  • Disputes: Manage the full chargeback lifecycle when a dispute is filed.
  • Collaborations: Handle pre-dispute alerts and refund within the response window.
  • Fraud warnings: Act on fraud signals before they escalate.
  • Webhooks: Configure endpoints and verify payload signatures.
  • Webhook events: Browse the full list of event types.
Was this page helpful?