什么是batch.created和batch.updated Webhook事件?

时间:2019-11-06 10:38:27

标签: stripe-payments

在测试模式下,有时会收到以下事件:batch.createdbatch.updated

batch.created

{
    "id": "evt_1Fbj*****",
    "object": "event",
    "api_version": "2017-08-15",
    "created": 1573029053,
    "data": {
        "object": {
            "id": "batch_1Fbj*****`,
            "object": "batch",
            "completed": null,
            "content_sha256": null,
            "created": 1573029053,
            "error": null,
            "livemode": false,
            "metadata": [],
            "results": null,
            "started": null,
            "status": "new",
            "upload_url": null
        }
    },
    "livemode": false,
    "pending_webhooks": 2,
    "request": {
        "id": null,
        "idempotency_key": null
    },
    "type": "batch.created"
}

batch.updated

{
    "id": "evt_1Fbj*****",
    "object": "event",
    "api_version": "2017-08-15",
    "created": 1573029059,
    "data": {
        "object": {
            "id": "batch_1FbjujF******",
            "object": "batch",
            "completed": null,
            "content_sha256": null,
            "created": 1573029053,
            "error": null,
            "livemode": false,
            "metadata": [],
            "results": null,
            "started": 1573029059,
            "status": "processing",
            "upload_url": null
        },
        "previous_attributes": {
            "started": null,
            "status": "new"
        }
    },
    "livemode": false,
    "pending_webhooks": 3,
    "request": {
        "id": null,
        "idempotency_key": null
    },
    "type": "batch.updated"
}

我无法在Stripe文档中找到有关它们的信息。他们的目的是什么?

1 个答案:

答案 0 :(得分:2)

当您在仪表板中执行批处理操作时,这些是Stripe生成的内部事件。例如,如果您一次退款但要退还多笔费用或删除多个客户。

这些事件未记录在案,也不应该发送给Stripe以后将修复的端点。您可以放心地忽略这些事件。