Webhook 属性
下面列出了 Yuno webhooks 的 JSON 属性。有关用于选择每个事件的触发器字段,请参见 事件与触发器。指定 支付(适用于支付类型)或 支付方式对象(适用于注册及其他对象)。
显示 属性
显示 属性
用于跳过重复投递的标识符。它在同一事件的每次重试中保持不变。其位置取决于事件:普通支付事件(包括退款和拒付)将其放在
data.payment.idempotency_key,payment.split_update 将其放在 data.split_update.idempotency_key,订阅事件将其放在 data.idempotency_key。在 subscription.* 事件中,它标识的是订阅而不是事件,因此请根据 type_event 加上此键对这些事件去重。有关覆盖范围的详细信息,请参见 去重。拆分更新 webhooks
这些简化示例仅显示解读payment.split_update 所需的字段;常规支付字段也会包含在内。此事件需要显式订阅,且尚待在生产环境目录中提供。
在 v2 中,信封标识 type_event: "payment.split_update",操作块为 data.split_update:
{
"type": "payment",
"type_event": "payment.split_update",
"version": 2,
"retry": 0,
"data": {
"split_update": {
"idempotency_key": "4a518553-a6e7-4717-a415-06084ea85c99",
"updated_at": "2026-09-22T04:20:00Z"
},
"payment": {
"transactions": {
"split_marketplace": []
}
}
}
}
split_marketplace 为 []。已应用的替换则会携带该操作的拆分条目。transactions 是单个对象,而不是数组。
旧版 v1 发送的支付正文不包含 v2 信封或 type_event。请通过 payment 旁边的 split_update 块来识别此事件:
{
"split_update": {
"idempotency_key": "4a518553-a6e7-4717-a415-06084ea85c99",
"updated_at": "2026-09-22T04:20:00Z"
},
"payment": {
"transactions": {
"split_marketplace": []
}
}
}
| 字段 | 含义 |
|---|---|
split_update.idempotency_key | 原始拆分更新请求的键。用它来区分操作并对投递去重,范围按账户和事件类型划定。 |
split_update.updated_at | 该操作记录的完成时间,在重复处理和延迟通知时保持不变。 |
payment.transactions.split_marketplace | 所选操作的拆分快照,清除时包括 []。 |
transactions_history,其中受影响交易的条目会携带相同的操作拆分。该事件不会启用历史记录,也不会替换支付级别的 payment.split_marketplace;不要将该支付级别字段用作此操作的快照。其他字段反映准备通知时读取的支付,可能包含之后的更改。请使用 GET /v1/payments/{payment_id} 获取最新的支付状态。
不保证操作快照的序列化结果与之后读取支付的结果完全相同。数值精度可能不同(例如 5 与 5.0),仅包含 chargebacks 的责任对象在实时支付映射中的表示方式也可能不同。请比较值及其含义,而不要求 JSON 逐字节相等。这些表示差异并不表示新的拆分操作。
只有此事件会添加 split_update;购买和退款 payload 不会获得该块。有关订阅、发出、顺序和投递行为,请参见 拆分更新通知。
示例
Yuno 提供多个与注册和支付通知相关的 webhooks。您可以在此处找到与每个事件相关的一些数据结构示例。支付 Webhook V2
支付 Webhook V1
拒付 Webhook V2
拒付 Webhook V1
注册
Payouts
订阅
Onboarding
退款
Marketplace 拆分转账
HMAC:授权
支付
支付 Webhook V2
Payload 示例:与银行转账支付方式对应的事件,其 webhook payload 包含
payment.payment_method.payment_method_detail.bank_transfer.bank_id。该字段与原始支付请求中发送的 bank_id 一致,未选择银行时则省略。当支付带有配送选择时(例如在钱包组件中通过 Fast Checkout 配送 选择),V1 和 V2 版本的 payload 都会包含顶层
payment.shipping 节点(结构与 支付对象 中的相同),并且当付款人没有收货地址时,会根据该节点填充 payment.customer_payer.shipping_address。当支付没有配送选择时,省略 shipping 键。每笔交易都包含
connection_data,用于标识处理该交易的服务提供商连接。当您为同一服务提供商运营多个连接时,请使用 connection_data.id 作为稳定标识符,将交易归属到特定连接。connection_data.name 是在 Yuno Dashboard 中配置的显示名称,在某些事件(例如后续交易)中可能为 null。transactions 字段在不同场景中含义不同。在 webhook payload 中,data.payment.transactions 是一个单个对象,即触发该事件的交易;而 transactions_history 在为该支付启用时(参见下方说明)携带该支付的完整交易列表。在支付检索 endpoint(GET /payments/{payment_id} 和 GET /payments?merchant_order_id=)中,transactions 是一个包含该支付所有交易的数组。transactions_history 需要主动启用:只有在 创建支付 请求中使用 response_additional_data.transactions_history: true 创建支付时,才会填充该字段。否则,webhooks 会将其作为空数组 [] 投递,这是默认行为,可使 payload 保持较小。这对于您的路由在多个服务提供商之间重试的支付很重要:没有该标志时,最终的 webhook 只显示最后一笔交易,之前的尝试只能通过 GET /payments/{payment_id} 查看。由未设置该标志的 Yuno 托管流程创建的支付(例如订阅续订)也会投递 []。拒付事件始终包含完整历史记录。字段命名:客户地理位置在 webhook payload 中序列化为
geo_location,在支付检索 endpoint 中序列化为 geolocation。请针对每个场景相应地解析。payment.amount.authorized 是服务提供商批准的金额,已扣除任何 Yuno 促销,与 支付对象 中的含义相同。以 partial_approval: true 发送的卡支付在部分批准后仍保持完全批准的状态,因此当 payment.amount.authorized 低于 payment.amount.value 减去 payment.discount_amount 的结果时(没有促销时,即低于 payment.amount.value),该支付为部分批准。对于未获批准或在该字段引入之前创建的支付,省略该字段。两个 webhook 版本都携带该字段。{
"type": "payment",
"type_event": "payment.purchase",
"account_id": "2c05976d-1234-1234-1234-6421883de48d",
"retry": 0,
"version": 2,
"data": {
"payment": {
"id": "a546c566-1703-4fba-b334-c46e89bc97f7",
"account_id": "2c05976d-1234-1234-1234-6421883de48d",
"description": "Testing Yuno",
"country": "UY",
"status": "SUCCEEDED",
"sub_status": "APPROVED",
"order_id": "Order1234",
"merchant_order_id": "Test1234",
"created_at": "2024-07-19T16:31:59.528561Z",
"updated_at": "2024-07-19T16:32:02.203776Z",
"idempotency_key": "9e2aba6a-1234-1234-1234-03a0a67ee15f",
"amount": {
"currency": "UYU",
"value": 1458,
"refunded": 0,
"captured": 0,
"authorized": 1458
},
"checkout": {
"session": "2f3423dd-1234-1234-1234-2c7da5ad1caf",
"sdk_action_required": false
},
"customer_payer": {
"id": "96bf8513-1234-1234-1234-0087b2a60535",
"merchant_customer_id": "user1234",
"first_name": "harry ",
"last_name": "potter ",
"gender": "",
"date_of_birth": null,
"email": "testing6@y.uno",
"nationality": null,
"ip_address": "123.123.123.27",
"device_fingerprint": null,
"third_party_session_id": "third_party_session_id",
"merchant_customer_created_at": "2019-01-08T18:38:55.617Z",
"browser_info": {
"user_agent": "Yuno's/20979 CFNetwork/1496.0.7 Darwin/23.5.0",
"accept_header": "*/*",
"color_depth": null,
"screen_height": "844.0",
"screen_width": "390.0",
"javascript_enabled": null,
"language": "es-UY",
"accept_content": null,
"accept_browser": null,
"java_enabled": null,
"browser_time_difference": null
},
"document": {
"document_number": "99999999",
"document_type": "CI"
},
"billing_address": {
"address_line_1": "GEANT - Av. A la Playa y calle de 17",
"address_line_2": "",
"city": "Canelones",
"country": "UY",
"state": "Canelones",
"zip_code": "-",
"neighborhood": null
},
"shipping_address": {
"address_line_1": "GEANT - Av. A la Playa y calle de 17",
"address_line_2": "",
"city": "Canelones",
"country": "UY",
"state": "Canelones",
"zip_code": "-",
"neighborhood": null
},
"phone": {
"country_code": "598",
"number": "12345678"
}
},
"shipping": {
"method": {
"id": "express",
"label": "Express shipping",
"amount": {
"currency": "GBP",
"value": 5.00
}
},
"address": {
"address_line_1": "221B Baker Street",
"address_line_2": "Flat 2",
"city": "London",
"state": "England",
"zip_code": "NW1 6XE",
"country": "GB"
}
},
"additional_data": {
"order": {
"shipping_amount": 0,
"fee_amount": null,
"tip_amount": null,
"items": [
{
"id": "item123",
"name": "Yuno Testing",
"quantity": 1,
"unit_amount": 1458,
"category": "services",
"brand": null,
"sku_code": null,
"manufacture_part_number": null,
"image_url": null
}
],
"taxes": [],
"discounts": []
},
"airline": null,
"seller_details": null
},
"transactions": {
"id": "3a35add9-89d6-4b11-9f17-24a76f4d046e",
"type": "PURCHASE",
"status": "SUCCEEDED",
"category": "CARD",
"amount": 1458,
"provider_id": "YUNO_TEST_PAYMENT_GW",
"response_code": "SUCCEEDED",
"merchant_reference": "Test1234",
"response_message": "Transaction successful",
"reason": null,
"description": "Testing Yuno",
"created_at": "2024-07-19T16:31:59.617130Z",
"updated_at": "2024-07-19T16:32:02.138835Z",
"payment_method": {
"token": "902f17f9-1234-1234-1234-3322f5ebdbb5",
"type": "CARD",
"vaulted_token": "795b4f2e-1234-1234-1234-fcc1930d5d4c",
"vault_on_success": false,
"payment_method_detail": {
"card": {
"verify": null,
"capture": true,
"installments": 1,
"installments_plan_id": null,
"first_installment_deferral": null,
"installments_amount": null,
"installments_type": null,
"soft_descriptor": "",
"authorization_code": "123456",
"retrieval_reference_number": "",
"acquirer_reference_number": "",
"voucher": null,
"card_data": {
"holder_name": "HARRY POTTER",
"iin": "51584511",
"lfd": "1234",
"number_length": 16,
"security_code_length": 3,
"brand": "MASTERCARD",
"issuer_name": "ECONSTAR SA",
"issuer_code": null,
"category": "MRG - Prepaid MasterCard Card",
"type": "CREDIT",
"three_d_secure": {
"version": null,
"electronic_commerce_indicator": null,
"cryptogram": null,
"transaction_id": null,
"directory_server_transaction_id": null,
"pares_status": null,
"acs_id": null
},
"network_token": null,
"fingerprint": null
},
"stored_credentials": {
"reason": null,
"usage": null
}
},
"wallet": null,
"bnpl": null,
"bank_transfer": null,
"ticket": null,
"payment_link": null
}
},
"provider": {
"provider_transaction_id": "YUNO-51056-b673b951-aaa-aaa-aaa-123489aee2e0"
},
"provider_data": {
"raw_response": {
"value": "provider raw response"
},
"id": "DLOCAL",
"transaction_id": "YUNO-51056-b673b951-aaa-aaa-aaa-123489aee2e0",
"account_id": "699ec8d444",
"status": "PAID",
"status_detail": null,
"response_message": "The payment was paid.",
"response_code": "200",
"third_party_transaction_id": "",
"third_party_account_id": ""
},
"connection_data": {
"id": "88292fd3-bf5b-4b23-bb95-7186ba4e7f88",
"name": "dLocal US"
},
"simplified_mode": false,
"third_party_session_id": "third_party_session_id"
},
"transactions_history": [
{
"id": "3a35add9-89d6-4b11-9f17-24a76f4d046e",
"type": "PURCHASE",
"status": "SUCCEEDED",
"category": "CARD",
"amount": 1458,
"provider_id": "YUNO_TEST_PAYMENT_GW",
"response_code": "SUCCEEDED",
"merchant_reference": "Test1234",
"response_message": "Transaction successful",
"reason": null,
"description": "Testing Yuno",
"created_at": "2024-07-19T16:31:59.617130Z",
"updated_at": "2024-07-19T16:32:02.138835Z",
"payment_method": {
"token": "902f17f9-1234-1234-1234-3322f5ebdbb5",
"type": "CARD",
"vaulted_token": "795b4f2e-1234-1234-1234-fcc1930d5d4c",
"vault_on_success": false,
"payment_method_detail": {
"card": {
"verify": null,
"capture": true,
"installments": 1,
"installments_plan_id": null,
"first_installment_deferral": null,
"installments_amount": null,
"installments_type": null,
"soft_descriptor": "",
"authorization_code": "123456",
"retrieval_reference_number": "",
"acquirer_reference_number": "",
"voucher": null,
"card_data": {
"holder_name": "HARRY POTTER",
"iin": "51584511",
"lfd": "1234",
"number_length": 16,
"security_code_length": 3,
"brand": "MASTERCARD",
"issuer_name": "ECONSTAR SA",
"issuer_code": null,
"category": "MRG - Prepaid MasterCard Card",
"type": "CREDIT",
"three_d_secure": {
"version": null,
"electronic_commerce_indicator": null,
"cryptogram": null,
"transaction_id": null,
"directory_server_transaction_id": null,
"pares_status": null,
"acs_id": null
},
"network_token": null,
"fingerprint": null
},
"stored_credentials": {
"reason": null,
"usage": null
}
},
"wallet": null,
"bnpl": null,
"bank_transfer": null,
"ticket": null,
"payment_link": null
}
},
"provider": {
"provider_transaction_id": "YUNO-51056-b673b951-aaa-aaa-aaa-123489aee2e0"
},
"provider_data": {
"raw_response": {
"value": "raw_response"
},
"id": "DLOCAL",
"transaction_id": "YUNO-51056-b673b951-aaa-aaa-aaa-123489aee2e0",
"account_id": "699ec8d444",
"status": "PAID",
"status_detail": null,
"response_message": "The payment was paid.",
"response_code": "200",
"third_party_transaction_id": "",
"third_party_account_id": ""
},
"connection_data": {
"id": "88292fd3-bf5b-4b23-bb95-7186ba4e7f88",
"name": "dLocal US"
},
"simplified_mode": false,
"third_party_session_id": "json object"
}
],
"callback_url": null,
"workflow": "SDK_CHECKOUT",
"split": [],
"payment_link_code": "",
"subscription_id": null,
"fraud_screening": null,
"metadata": [],
"routing_rules": {
"condition": {
"id": 222770,
"name": null,
"description": null
}
}
}
}
}
使用
external_subscription 对象创建的支付(参见 创建支付)会在 webhook payload 的支付对象中携带该对象(在 v2 payload 中为 data.payment),形式为包含 id 和 customer_id 的 external_subscription 键。当支付创建时未包含该对象,该键会被省略(而不是以 null 发送),因此上面的示例中没有显示它。两个 webhook 版本都携带该字段。使用 external_invoice 对象创建的支付(参见 支付 Stripe 发票(充值))会在支付 webhooks(例如 payment.purchase)中携带该对象,形式为包含 id 和 customer_id 的 external_invoice 键。在上面的 v2 payload 中,该键位于 data.payment 内。当支付创建时未包含该对象,该键会被省略。当支付带有 Yuno 促销 时,payload 还会包含
payment.discount_amount(currency 和 value,即总折扣),位于 amount 之后。Yuno 折扣行排在 payment.additional_data.order.discounts 的首位(type: YUNO_PROMOTION、quote_id、id、unit_amount,以及 Yuno 掌握时的 name),您自己的折扣行随后列出,并带有 type: MERCHANT。payment.amount.value 保持为您发送的金额,payment.transactions.amount 是实际扣款金额。没有促销时,省略 discount_amount,折扣行与您发送的完全一致。两个 webhook 版本都携带该字段。下面的摘录仅显示会变化的字段。Payment with a Yuno promotion (excerpt)
{
"type": "payment",
"type_event": "payment.purchase",
"version": 2,
"data": {
"payment": {
"status": "SUCCEEDED",
"sub_status": "APPROVED",
"amount": {
"currency": "USD",
"value": 250.0,
"refunded": 0.0,
"captured": 0.0,
"authorized": 225.0
},
"discount_amount": {
"currency": "USD",
"value": 25.0
},
"additional_data": {
"order": {
"discounts": [
{
"type": "YUNO_PROMOTION",
"id": "b7c1a4f2-6e0d-4a3b-9c55-1f2e7d8a0b31",
"name": "10% off with credit cards - Mother's Day",
"unit_amount": 25.0,
"quote_id": "qte_…",
"discount_indicator": null,
"discount_rate": null
},
{
"type": "MERCHANT",
"id": "LOYALTY-5",
"name": "Loyalty 5%",
"unit_amount": 12.5,
"discount_indicator": null,
"discount_rate": null
}
]
}
},
"transactions": {
"type": "PURCHASE",
"status": "SUCCEEDED",
"amount": 225.0
}
}
}
}
支付 Webhook V1
Payload 示例:JSON
{
"payment":{
"code":"b3da6717-7949-454e-8699-e449bfaccb69",
"id":"b3da6717-7949-454e-8699-e449bfaccb69",
"idempotency_key":"28f14927-421b-4424-b4d2-5de4d83ca138",
"organization_code":"9c99108c-7681-4d48-acca-bce037685e99",
"account_code":"c004cfd7-0c65-4add-b9b3-3d7e3949c9f1",
"account_id":"c004cfd7-0c65-4add-b9b3-3d7e3949c9f1",
"description":"test description",
"country":"CO",
"status":"SUCCEEDED",
"sub_status":"APPROVED",
"order_id":"1679531154456",
"merchant_order_id":"1679531154456",
"created_at":"2023-03-23T00:26:38.093810Z",
"updated_at":"2023-03-23T00:26:51.285333Z",
"amount":{
"currency":"COP",
"value":2000.0,
"refunded":0.0,
"captured":0.0,
"authorized":2000.0
},
"checkout":{
"session":"fb98b19d-39c0-42d2-bed6-438605458964",
"sdk_action_required":false
},
"customer_payer":{
"code":"8122d1f5-c07d-4d88-9dfe-a09ccdaeda0b",
"id":"8122d1f5-c07d-4d88-9dfe-a09ccdaeda0b",
"organization_customer_external_id":"1679531154456",
"merchant_customer_id":"1679531154456",
"first_name":"Aaron",
"last_name":"Hegmann",
"gender":"F",
"date_of_birth":"1990-02-28",
"email":"andrea@y.uno",
"nationality":"CO",
"ip_address":"192.168.123.167",
"device_fingerprint":"278994bb-9ece-5c63-8c44-c03481851625",
"browser_info":null,
"document":{
"document_number":"1032765432",
"document_type":"CC"
},
"billing_address":{
"address_line_1":"Calle 34 # 56 - 78",
"address_line_2":"Apartamento 502, Torre I",
"city":"Bogotá",
"country":"CO",
"state":"Cundinamarca",
"zip_code":"111111"
},
"shipping_address":{
"address_line_1":"Calle 34 # 56 - 78",
"address_line_2":"Apartamento 502, Torre I",
"city":"Bogotá",
"country":"CO",
"state":"Cundinamarca",
"zip_code":"111111"
},
"phone":{
"country_code":"57",
"number":"3991111111"
}
},
"shipping":{
"method":{
"id":"express",
"label":"Express shipping",
"amount":{
"currency":"GBP",
"value":5.00
}
},
"address":{
"address_line_1":"221B Baker Street",
"address_line_2":"Flat 2",
"city":"London",
"state":"England",
"zip_code":"NW1 6XE",
"country":"GB"
}
},
"additional_data":{
"order":{
"shipping_amount":0.0,
"fee_amount":0.0,
"items":[
{
"id":"123AD",
"name":"Skirt",
"quantity":1,
"unit_amount":2000.0,
"category":"Clothes",
"brand":"XYZ",
"sku_code":"8765432109",
"manufacture_part_number":"XYZ123456",
"image_url":null
}
],
"discounts":[]
},
"airline":null
},
"transactions":{
"code":"98c80022-fe05-4b9b-b478-2e102fc72cc3",
"id":"98c80022-fe05-4b9b-b478-2e102fc72cc3",
"type":"PURCHASE",
"status":"SUCCEEDED",
"category":"CARD",
"amount":2000.0,
"provider_id":"KUSHKI",
"response_code":"SUCCEEDED",
"merchant_reference":null,
"response_message":"Transaction successful",
"reason":null,
"description":"test description",
"created_at":"2023-03-23T00:26:38.290239Z",
"updated_at":"2023-03-23T00:26:51.258039Z",
"payment_method":{
"token":"e12440ca-920c-4aab-b656-6ed63f9ed5ac",
"type":"CARD",
"vaulted_token":null,
"vault_on_success":false,
"payment_method_detail":{
"card":{
"verify":null,
"capture":false,
"installments":1,
"first_installment_deferral":null,
"installments_amount":null,
"installments_type":null,
"soft_descriptor":"",
"authorization_code":"",
"retrieval_reference_number":"",
"acquirer_reference_number":"",
"voucher":null,
"card_data":{
"holder_name":"APROBADO",
"iin":"54519515",
"lfd":"5480",
"number_length":16,
"security_code_length":3,
"brand":"MASTERCARD",
"issuer_name":"BANCO DE LA PRODUCCION S.A. (PRODUBANCO)",
"issuer_code":null,
"category":"BLACK",
"type":"CREDIT"
}
},
"wallet":null,
"bnpl":null,
"bank_transfer":null,
"payment_link":null
}
},
"provider":{
"provider_transaction_id":"488990863216107201"
},
"provider_data":{
"raw_response":{
"details":{
"amount":{
"currency":"COP",
"ice":0,
"iva":0,
"subtotalIva":0,
"subtotalIva0":2000
},
"approvalCode":"000000",
"approvedTransactionAmount":2000,
"binInfo":{
"bank":"Banco de la Produccion S.A. (PRODUBANCO)",
"bindCard":"545195",
"cardCountry":"Ecuador",
"lastFourDigits":"5480",
"type":"credit"
},
"cardHolderName":"APROBADO",
"created":1679531210000,
"merchantId":"20000000107058310000",
"merchantName":"kushkiCOSBX Colombia",
"paymentBrand":"Mastercard",
"processorBankName":"0032~BANCO INTERNACIONAL",
"requestAmount":2000,
"responseCode":"000",
"responseText":"Transacción aprobada",
"transactionId":"091607275430589119",
"transactionReference":"eb6eb9e1-68d3-46be-8a0b-41ec8ff3ad73",
"transactionStatus":"APPROVAL",
"transactionType":"SALE"
},
"ticketNumber":"488990863216107201",
"transactionReference":"eb6eb9e1-68d3-46be-8a0b-41ec8ff3ad73"
},
"id":"KUSHKI",
"transaction_id":"488990863216107201",
"account_id":null,
"status":"APPROVAL",
"status_detail":"Transacción aprobada",
"response_message":"Transacción aprobada"
},
"connection_data":{
"id":"88292fd3-bf5b-4b23-bb95-7186ba4e7f88",
"name":"Kushki Colombia"
}
},
"callback_url":null,
"workflow":"CHECKOUT",
"split":[
],
"subscription_id":null,
"payment_link_id":null
}
}
拒付 Webhook V2
Payload 示例:{
"type":"payment",
"type_event":"payment.chargeback",
"account_id":"a4441009-df56-4a59-a515-ca9b949c4ce3",
"retry":0,
"version":2,
"data":{
"payment":{
"id":"ae70d7f9-e0a2-4e37-a12f-765e8af87924",
"account_id":"a4441009-df56-4a59-a515-ca9b949c4ce3",
"description":"test Ecommerce",
"country":"MX",
"status":"IN_DISPUTE",
"sub_status":"RECEIVED",
"order_id":"584-67f854a2eb05a22320e86071",
"merchant_order_id":"584-67f854a2eb05a22320e86071",
"created_at":"2025-04-10T23:30:53.210656Z",
"updated_at":"2025-04-17T04:46:49.640765Z",
"idempotency_key":"485d3965-6deb-4fc5-81de-4a7211c835bc",
"amount":{
"currency":"MXN",
"value":418.0,
"refunded":0.0,
"captured":0.0,
"authorized":418.0,
"currency_conversion": {
"code": "ccv_01HVK3Z9M2...",
"cardholder_currency": "QAR",
"cardholder_amount": 3640.00,
"cardholder_accepted": true,
"rate": 3.6400,
"rate_margin_percentage": 3.75,
"rate_source": "ECB",
"provider": "FEXCO",
"description": "You have chosen to pay in QAR. Amount: 3640.00 QAR. Rate: 3.6400.",
"created_at": "2026-04-24T14:30:00Z",
"expires_at": "2026-04-24T15:30:00Z",
"status": "APPLIED",
"error_reason": null,
"provider_data": {
"acquirer_id": "MPGS_01"
}
}
},
"checkout":{
"session":"4f335b32-79de-41a7-b30b-f478620bc7a8",
"sdk_action_required":false
},
"customer_payer":{
"id":"4476c479-9a32-4910-83d8-b74b7b8eb86f",
"merchant_customer_id":"67f854536e2a02461a1a8f5f",
"first_name":"merit",
"last_name":"amador",
"gender":"",
"date_of_birth":null,
"email":"bolitas.nuca9b@icloud.com",
"nationality":null,
"ip_address":"200.68.159.190",
"device_fingerprint":null,
"third_party_session_id":null,
"device_fingerprints":[
],
"merchant_customer_created_at":"2025-04-10T23:23:46.357Z",
"browser_info":{
"user_agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Mobile/15E148 Safari/604.1",
"accept_header":"*/*",
"color_depth":"24",
"screen_height":"852",
"screen_width":"393",
"javascript_enabled":true,
"language":"es",
"accept_content":"*/*",
"accept_browser":"*/*",
"java_enabled":false,
"browser_time_difference":"360"
},
"document":null,
"billing_address":{
"address_line_1":"Av. test test No. 193 Local C-1-2-3 Plaza Galerias Col. test test C.P11300 test D.F",
"address_line_2":"",
"city":"test",
"country":"MX",
"state":"-",
"zip_code":"-",
"neighborhood":null
},
"shipping_address":{
"address_line_1":"Av. test test No. 193 Local C-1-2-3 test test Col. test test C.P11300 test D.F",
"address_line_2":"",
"city":"CDMX",
"country":"MX",
"state":"-",
"zip_code":"-",
"neighborhood":null
},
"phone":{
"country_code":"52",
"number":"5659708369"
}
},
"additional_data":{
"order":{
"shipping_amount":0.0,
"fee_amount":0.0,
"tip_amount":null,
"items":[
{
"id":"26609",
"name":"McTrío Grande Signature BBQ Crispy Onion",
"quantity":2,
"unit_amount":193.0,
"category":"others",
"brand":null,
"sku_code":"26609",
"manufacture_part_number":null,
"image_url":null
}
],
"taxes":[
],
"shipping":null,
"account_funding":null,
"tickets":[
],
"fulfillment":null,
"discounts":[
]
},
"airline":null,
"seller_details":null
},
"transactions":{
"id":"5f354190-ffe8-4b25-a73d-55fe25821067",
"type":"CHARGEBACK",
"status":"CREATED",
"category":"CARD",
"amount":418.0,
"provider_id":"ADYEN",
"response_code":"ACTION_REQUIRED",
"merchant_reference":"YU00000058467f854a2eb05a22320e86071",
"response_message":"Chargeback or Inquiry received. Decision or documentation must be provided",
"reason":"REQUESTED_BY_CUSTOMER",
"description":"webhook transaction",
"created_at":"2025-04-17T04:46:49.591869Z",
"updated_at":"2025-04-17T04:46:49.616143Z",
"payment_method":{
"token":"592c7a1c-e34c-4dc1-851f-5bd41bc32c68",
"type":"CARD",
"vaulted_token":"2146a9c4-56c9-43a5-a35b-916bf15f7772",
"vault_on_success":false,
"parent_payment_method_type":null,
"payment_method_detail":{
"card":{
"verify":false,
"capture":false,
"installments":1,
"installments_plan_id":null,
"first_installment_deferral":null,
"installments_amount":null,
"installments_type":null,
"soft_descriptor":"",
"authorization_code":"373761",
"retrieval_reference_number":"",
"acquirer_reference_number":"",
"voucher":null,
"card_data":{
"holder_name":"YOANA CALAM",
"iin":"55123824",
"lfd":"2451",
"number_length":16,
"security_code_length":3,
"brand":"MASTERCARD",
"issuer_name":"BANCO AZTECA INSTITUCION BANCA MULTIPLE",
"issuer_code":null,
"country_code":"MX",
"category":"DEBIT MASTERCARD",
"type":"DEBIT",
"three_d_secure":{
"version":null,
"electronic_commerce_indicator":null,
"cryptogram":null,
"transaction_id":null,
"directory_server_transaction_id":null,
"pares_status":null,
"acs_id":null
},
"network_token":null,
"fingerprint":"355e7384-7e75-4a32-94b9-26031a4faab5",
"expiration_month":12,
"expiration_year":26
},
"stored_credentials":{
"reason":null,
"usage":null,
"subscription_agreement_id":null,
"network_transaction_id":null
}
},
"wallet":null,
"bnpl":null,
"bank_transfer":null,
"ticket":null,
"payment_link":null
}
},
"provider":{
"provider_transaction_id":"L2JC9B5K995BJDF6"
},
"provider_data":{
"raw_response":null,
"id":"ADYEN",
"transaction_id":"L2JC9B5K995BJDF6",
"account_id":null,
"status":"NOTIFICATION_OF_CHARGEBACK",
"status_detail":null,
"response_message":null,
"response_code":null,
"third_party_transaction_id":null,
"third_party_account_id":null,
"iso8583_response_code":null,
"iso8583_response_message":null
},
"connection_data":{
"id":null,
"name":null
},
"device_fingerprint":null,
"simplified_mode":false,
"third_party_session_id":null
},
"transactions_history":[
{
"id":"5f354190-ffe8-4b25-a73d-55fe25821067",
"type":"CHARGEBACK",
"status":"CREATED",
"category":"CARD",
"amount":418.0,
"provider_id":"ADYEN",
"response_code":"ACTION_REQUIRED",
"merchant_reference":"YU00000058467f854a2eb05a22320e86071",
"response_message":"Chargeback or Inquiry received. Decision or documentation must be provided",
"reason":"REQUESTED_BY_CUSTOMER",
"description":"webhook transaction",
"created_at":"2025-04-17T04:46:49.591869Z",
"updated_at":"2025-04-17T04:46:49.616143Z",
"payment_method":{
"token":"592c7a1c-e34c-4dc1-851f-5bd41bc32c68",
"type":"CARD",
"vaulted_token":"2146a9c4-56c9-43a5-a35b-916bf15f7772",
"vault_on_success":false,
"parent_payment_method_type":null,
"payment_method_detail":{
"card":{
"verify":false,
"capture":false,
"installments":1,
"installments_plan_id":null,
"first_installment_deferral":null,
"installments_amount":null,
"installments_type":null,
"soft_descriptor":"",
"authorization_code":"373761",
"retrieval_reference_number":"",
"acquirer_reference_number":"",
"voucher":null,
"card_data":{
"holder_name":"YOANA CALAM",
"iin":"55123824",
"lfd":"2451",
"number_length":16,
"security_code_length":3,
"brand":"MASTERCARD",
"issuer_name":"BANCO AZTECA INSTITUCION BANCA MULTIPLE",
"issuer_code":null,
"country_code":"MX",
"category":"DEBIT MASTERCARD",
"type":"DEBIT",
"three_d_secure":{
"version":null,
"electronic_commerce_indicator":null,
"cryptogram":null,
"transaction_id":null,
"directory_server_transaction_id":null,
"pares_status":null,
"acs_id":null
},
"network_token":null,
"fingerprint":"355e7384-7e75-4a32-94b9-26031a4faab5",
"expiration_month":12,
"expiration_year":26
},
"stored_credentials":{
"reason":null,
"usage":null,
"subscription_agreement_id":null,
"network_transaction_id":null
}
},
"wallet":null,
"bnpl":null,
"bank_transfer":null,
"ticket":null,
"payment_link":null
}
},
"provider":{
"provider_transaction_id":"L2JC9B5K995BJDF6"
},
"provider_data":{
"raw_response":null,
"id":"ADYEN",
"transaction_id":"L2JC9B5K995BJDF6",
"account_id":null,
"status":"NOTIFICATION_OF_CHARGEBACK",
"status_detail":null,
"response_message":null,
"response_code":null,
"third_party_transaction_id":null,
"third_party_account_id":null,
"iso8583_response_code":null,
"iso8583_response_message":null
},
"connection_data":{
"id":null,
"name":null
},
"device_fingerprint":null,
"simplified_mode":false,
"third_party_session_id":null
},
{
"id":"4d508842-5ffc-438a-a864-deeceb9935ca",
"type":"PURCHASE",
"status":"SUCCEEDED",
"category":"CARD",
"amount":418.0,
"provider_id":"ADYEN",
"response_code":"SUCCEEDED",
"merchant_reference":"YU00000058467f854a2eb05a22320e86071",
"response_message":"Transaction successful",
"reason":null,
"description":"McDonalds Ecommerce",
"created_at":"2025-04-10T23:30:53.319251Z",
"updated_at":"2025-04-10T23:30:54.496131Z",
"payment_method":{
"token":"592c7a1c-e34c-4dc1-851f-5bd41bc32c68",
"type":"CARD",
"vaulted_token":"2146a9c4-56c9-43a5-a35b-916bf15f7772",
"vault_on_success":false,
"parent_payment_method_type":null,
"payment_method_detail":{
"card":{
"verify":false,
"capture":true,
"installments":1,
"installments_plan_id":null,
"first_installment_deferral":null,
"installments_amount":null,
"installments_type":null,
"soft_descriptor":"",
"authorization_code":"373761",
"retrieval_reference_number":"",
"acquirer_reference_number":"",
"voucher":null,
"card_data":{
"holder_name":"YOANA CALAM",
"iin":"55123824",
"lfd":"2451",
"number_length":16,
"security_code_length":3,
"brand":"MASTERCARD",
"issuer_name":"BANCO AZTECA INSTITUCION BANCA MULTIPLE",
"issuer_code":null,
"country_code":"MX",
"category":"DEBIT MASTERCARD",
"type":"DEBIT",
"three_d_secure":{
"version":null,
"electronic_commerce_indicator":null,
"cryptogram":null,
"transaction_id":null,
"directory_server_transaction_id":null,
"pares_status":null,
"acs_id":null
},
"network_token":null,
"fingerprint":"355e7384-7e75-4a32-94b9-26031a4faab5",
"expiration_month":12,
"expiration_year":26
},
"stored_credentials":{
"reason":null,
"usage":null,
"subscription_agreement_id":null,
"network_transaction_id":null
}
},
"wallet":null,
"bnpl":null,
"bank_transfer":null,
"ticket":null,
"payment_link":null
}
},
"provider":{
"provider_transaction_id":"L2JC9B5K995BJDF6"
},
"provider_data":{
"raw_response":{
"additionalData":{
"acquirerAccountCode":"AdyenProsa_ArcosDouradosPlataforma-MX_Cvv",
"acquirerCode":"AdyenProsa",
"acquirerReference":"373761",
"authCode":"373761",
"authorisationMid":"9024452",
"avsResult":"0 Unknown",
"cardFunction":"Consumer",
"cavv":"N/A",
"cavvAlgorithm":"N/A",
"cvcResult":"1 Matches",
"cvcResultRaw":"1 Matches",
"eci":"N/A",
"liabilityShift":"false",
"paymentMethod":"mc",
"paymentMethodVariant":"mcstandarddebit",
"refusalReasonRaw":"00 : Approved or completed successfully",
"threeDAuthenticated":"false",
"threeDAuthenticatedResponse":"N/A",
"threeDOffered":"false",
"threeDOfferedResponse":"N/A",
"threeds2.cardEnrolled":"true",
"xid":"N/A"
},
"amount":{
"currency":"MXN",
"value":41800
},
"merchantReference":"584-67f854a2eb05a22320e86071",
"paymentMethod":{
"brand":"mc",
"type":"scheme"
},
"pspReference":"L2JC9B5K995BJDF6",
"resultCode":"Authorised"
},
"id":"ADYEN",
"transaction_id":"L2JC9B5K995BJDF6",
"account_id":"test-account",
"status":"Authorised",
"status_detail":"Authorised",
"response_message":null,
"response_code":null,
"third_party_transaction_id":"L2JC9B5K995BJDF6",
"third_party_account_id":"",
"iso8583_response_code":"00 ",
"iso8583_response_message":null
},
"connection_data":{
"id":"72f2adb3-ed95-4bca-be01-20bbe4d5a1cb",
"name":null
},
"device_fingerprint":null,
"simplified_mode":false,
"third_party_session_id":null
}
],
"callback_url":"https://test.com.mx/api/callback/my-orders?path=%2Fmi-cuenta%2Fmis-pedidos%2F67f854a2eb05a22320e86071&checkoutSession=5f446b32-79de-41a7-b30b-f478620bc7a8",
"workflow":"SDK_CHECKOUT",
"split_marketplace":[
],
"payment_link_code":"",
"subscription_id":null,
"fraud_screening":null,
"metadata":[
{
"key":"riskdata.deliveryMethod",
"value":"MOP"
},
{
"key":"riskdata.storeId",
"value":"584"
},
{
"key":"riskdata.basket.item1.amountPerItem",
"value":"41800"
},
{
"key":"riskdata.basket.item1.itemID",
"value":"26609"
},
{
"key":"riskdata.basket.item1.category",
"value":"test value"
},
{
"key":"riskdata.basket.item1.currency",
"value":"MXN"
},
{
"key":"riskdata.basket.item1.quantity",
"value":"2"
},
{
"key":"riskdata.basket.item1.productTitle",
"value":"test value"
}
],
"routing_rules":{
"smart_routing":false,
"monitors":false,
"condition":{
"id":537769,
"name":null,
"description":null
}
}
}
}
}
拒付 Webhook V1
Payload 示例:JSON
{
"payment":{
"code":"b3da6717-7949-454e-8699-e449bfaccb69",
"id":"b3da6717-7949-454e-8699-e449bfaccb69",
"idempotency_key":"28f14927-421b-4424-b4d2-5de4d83ca138",
"organization_code":"9c99108c-7681-4d48-acca-bce037685e99",
"account_code":"c004cfd7-0c65-4add-b9b3-3d7e3949c9f1",
"account_id":"c004cfd7-0c65-4add-b9b3-3d7e3949c9f1",
"description":"test description",
"country":"CO",
"status":"CHARGEBACK",
"sub_status":"LOST",
"order_id":"1679531154456",
"merchant_order_id":"1679531154456",
"created_at":"2023-03-23T00:26:38.093810Z",
"updated_at":"2023-03-23T00:26:51.285333Z",
"amount":{
"currency":"COP",
"value":2000.0,
"refunded":0.0,
"captured":0.0,
"authorized":2000.0
},
"checkout":{
"session":"fb98b19d-39c0-42d2-bed6-438605458964",
"sdk_action_required":false
},
"customer_payer":{
"code":"8122d1f5-c07d-4d88-9dfe-a09ccdaeda0b",
"id":"8122d1f5-c07d-4d88-9dfe-a09ccdaeda0b",
"organization_customer_external_id":"1679531154456",
"merchant_customer_id":"1679531154456",
"first_name":"Aaron",
"last_name":"Hegmann",
"gender":"F",
"date_of_birth":"1990-02-28",
"email":"andrea@y.uno",
"nationality":"CO",
"ip_address":"192.168.123.167",
"device_fingerprint":"278994bb-9ece-5c63-8c44-c03481851625",
"browser_info":null,
"document":{
"document_number":"1032765432",
"document_type":"CC"
},
"billing_address":{
"address_line_1":"Calle 34 # 56 - 78",
"address_line_2":"Apartamento 502, Torre I",
"city":"Bogotá",
"country":"CO",
"state":"Cundinamarca",
"zip_code":"111111"
},
"shipping_address":{
"address_line_1":"Calle 34 # 56 - 78",
"address_line_2":"Apartamento 502, Torre I",
"city":"Bogotá",
"country":"CO",
"state":"Cundinamarca",
"zip_code":"111111"
},
"phone":{
"country_code":"57",
"number":"3991111111"
}
},
"additional_data":{
"order":{
"shipping_amount":0.0,
"fee_amount":0.0,
"items":[
{
"id":"123AD",
"name":"Skirt",
"quantity":1,
"unit_amount":2000.0,
"category":"Clothes",
"brand":"XYZ",
"sku_code":"8765432109",
"manufacture_part_number":"XYZ123456",
"image_url":null
}
]
},
"airline":null
},
"transactions":{
"code":"98c80022-fe05-4b9b-b478-2e102fc72cc3",
"id":"98c80022-fe05-4b9b-b478-2e102fc72cc3",
"type":"CHARGEBACK",
"status":"LOST",
"category":"CARD",
"amount":2000.0,
"provider_id":"KUSHKI",
"response_code":"CHARGEBACK",
"merchant_reference":null,
"response_message":"Transaction successful",
"reason":null,
"description":"test description",
"created_at":"2023-03-23T00:26:38.290239Z",
"updated_at":"2023-03-23T00:26:51.258039Z",
"payment_method":{
"token":"e12440ca-920c-4aab-b656-6ed63f9ed5ac",
"type":"CARD",
"vaulted_token":null,
"vault_on_success":false,
"payment_method_detail":{
"card":{
"verify":null,
"capture":false,
"installments":1,
"first_installment_deferral":null,
"installments_amount":null,
"installments_type":null,
"soft_descriptor":"",
"authorization_code":"",
"retrieval_reference_number":"",
"acquirer_reference_number":"",
"voucher":null,
"card_data":{
"holder_name":"APROBADO",
"iin":"54519515",
"lfd":"5480",
"number_length":16,
"security_code_length":3,
"brand":"MASTERCARD",
"issuer_name":"BANCO DE LA PRODUCCION S.A. (PRODUBANCO)",
"issuer_code":null,
"category":"BLACK",
"type":"CREDIT"
}
},
"wallet":null,
"bnpl":null,
"bank_transfer":null,
"payment_link":null
}
},
"provider":{
"provider_transaction_id":"488990863216107201"
},
"provider_data":{
"raw_response":{
},
"id":"KUSHKI",
"transaction_id":"488990863216107201",
"account_id":null,
"status":"CHARGEBACK",
"status_detail":"",
"response_message":""
}
},
"callback_url":null,
"workflow":"SDK_CHECKOUT",
"split":[
]
}
}
payment.pre_chargeback
在完整拒付之前,当收到某笔支付的预拒付通知或欺诈警报时发送。目前,无论是否选择了PRECHARGEBACK,都会发送给至少具有一个 payment_triggers 值的任何 webhook;专用的触发器控制计划在未来版本中推出。
{
"type": "payment",
"type_event": "payment.pre_chargeback",
"account_id": "2c05976d-1234-1234-1234-6421883de48d",
"retry": 0,
"version": 2,
"data": {
"payment": {
"id": "8f3a1b6c-4d2e-4f8a-9b1c-7e5d3a2f6b04",
"account_id": "2c05976d-1234-1234-1234-6421883de48d",
"description": "Order 12578185913914",
"country": "BR",
"status": "SUCCEEDED",
"sub_status": "APPROVED",
"order_id": "ORDER-12578185913914",
"merchant_order_id": "ORDER-12578185913914",
"created_at": "2026-07-11T05:04:49.855791Z",
"updated_at": "2026-08-17T16:32:03.145543Z",
"idempotency_key": "4a6f2d18-9b73-4c51-a2e9-6d3b8f1c07a4",
"amount": {
"currency": "BRL",
"value": 24.9,
"refunded": 0.0,
"captured": 0.0,
"authorized": 24.9,
"currency_conversion": null
},
"workflow": "DIRECT",
"fraud_screening": null,
"transactions": {
"id": "3d5e8c92-1f47-4a63-b8d0-5c2a9e7f14b6",
"type": "PRE_CHARGEBACK",
"status": "CREATED",
"category": "CARD",
"amount": 24.9,
"provider_id": "ADYEN",
"response_code": "ACTION_REQUIRED",
"merchant_reference": "ORDER-12578185913914",
"response_message": "Chargeback or Inquiry received. Decision or documentation must be provided",
"reason": "FRAUDULENT",
"description": "webhook transaction",
"created_at": "2026-08-17T16:32:03.075632Z",
"updated_at": "2026-08-17T16:32:03.103778Z",
"provider": { "provider_transaction_id": "PROVIDER_CASE_ID" },
"provider_data": {
"id": "ADYEN",
"transaction_id": "PROVIDER_CASE_ID",
"account_id": "merchant_account_name",
"status": "NOTIFICATION_OF_FRAUD",
"raw_response": null,
"status_detail": null,
"response_message": null,
"response_code": null,
"reason_code": null,
"reason_description": null
},
"connection_data": { "id": "6c4b2f79-8e13-4d5a-9f27-0a3e6b8d51c9", "name": "connection_name" }
}
}
}
}
注册
下面的 JSON 对象展示了与注册事件相关的数据结构示例。{
"type": "enrollment",
"type_event": "enrollment.enroll",
"account_id": "493e9374-510a-4201-9e09-de669d75f256",
"retry": 0,
"version": 2,
"data": {
"payment_method": {
"id": "03c3aae1-ed42-4be6-bc24-de5487f58491",
"account_id": "493e9374-510a-4201-9e09-de669d75f256",
"name": "VISA ****1111",
"description": "VISA ****1111",
"type": "CARD",
"category": "CARD",
"country": "CO",
"status": "ENROLLED",
"customer_id": "2f38972e-2427-43b7-95be-ee4cf21cef1b",
"created_at": "2024-09-10T15:04:10.453741Z",
"updated_at": "2024-09-10T15:04:10.453745Z",
"enrollment": {
"session": null,
"sdk_action_required": false
},
"verify": {
"vault_on_success": false,
"currency": null,
"payment": null
},
"metadata": [
{
"key": "on_behalf_of",
"value": "acct_1A2b3C4d5E6f7G8h"
},
{
"key": "order_ref",
"value": "ABC-123"
}
],
"detail": {
"card": {
"holder_name": "Pepito Perez",
"expiration_month": 3,
"expiration_year": 26,
"iin": "41111111",
"lfd": "1111",
"security_code_length": 3,
"number_length": 16,
"brand": "VISA",
"issuer_name": "JPMORGAN CHASE BANK N A",
"issuer_code": null,
"type": "CREDIT",
"category": "CREDIT",
"country_code": "US",
"country_name": "United States of America",
"fingerprint_code": "d244e20d-43a1-43f7-9b48-0a76423be35e",
"created_at": "2024-09-10T15:04:10.453799Z",
"updated_at": "2024-09-10T15:04:10.453800Z"
}
}
}
}
}
Payouts
下面的 JSON 对象展示了与 payout 事件相关的数据结构示例。JSON
{
"type": "payout",
"type_event": "payout.payout",
"account_id": "f7c5fe77-721b-49c2-84d3-957748df3c2c",
"retry": 0,
"version": 2,
"data": {
"id": "0cbc7bd4-04f3-4897-b3c6-4d5f36a6b9a7",
"status": "SUCCEEDED",
"merchant_reference": "MR-12345",
"description": null,
"country": "BR",
"account_code": "f7c5fe77-721b-49c2-84d3-957748df3c2c",
"organization_code": "6c6a6b2c-c9c0-4104-9dd0-4237e6f00047",
"purpose": null,
"amount": {
"currency": "BRL",
"value": 100
},
"beneficiary": {
"merchant_beneficiary_id": "test_merchant_deposit_id",
"national_entity": null,
"first_name": null,
"last_name": null,
"legal_name": null,
"email": null,
"country": "BR",
"date_of_birth": null,
"document": null,
"phone": null,
"address": null
},
"transactions": [
{
"id": "2be03290-70a9-414a-a285-8c573d26de5a",
"status": "SUCCEEDED",
"type": "ASTROPAY_PAYOUT",
"response_code": "SUCCEEDED",
"purpose": null,
"description": null,
"amount": {
"currency": "BRL",
"value": 100
},
"withdrawal_method": {
"type": "ASTROPAY_PAYOUT",
"provider_id": null,
"detail": {
"bank_transfer": null,
"wallet": {
"code": "h15sg84U6rCl",
"email": null,
"country": null,
"document": null,
"phone": null
}
}
},
"provider_data": {
"id": "ASTROPAY",
"transaction_id": "32389",
"account_id": "",
"beneficiary_id": "test_merchant_deposit_id",
"raw_response": "\"{\\n \\\"cashout_id\\\" : 32389,\\n \\\"merchant_cashout_id\\\" : \\\"2be03290-70a9-414a-a285-8c573d26de5a\\\",\\n \\\"status\\\" : \\\"APPROVED\\\",\\n \\\"user_id\\\" : \\\"h15sg84U6rCl\\\"\\n}\"",
"status_detail": "APPROVED",
"provider_status": null
},
"created_at": "2024-05-27T19:10:32.723578Z",
"updated_at": "2024-05-27T19:10:33.757137Z"
}
],
"metadata": [],
"created_at": "2024-05-27T19:10:32.494514Z",
"updated_at": "2024-05-27T19:10:33.757143Z"
}
}
报告
report_triggers 订阅报告生命周期事件。目前只有 report.update 由服务发出;report.create 可以订阅,但尚无发出方。
JSON
{
"type": "report",
"type_event": "report.update",
"account_id": "2c05976d-1234-1234-1234-6421883de48d",
"retry": 0,
"version": 2,
"data": {
"report_id": "7b1c9d3e-5a24-4f68-9c02-3e8d1f6a4b57",
"organization_code": "9f2e1a44-3c7b-4d15-8e60-1b4a7c9d2f88",
"account_code": "2c05976d-1234-1234-1234-6421883de48d",
"type": "TRANSACTIONS",
"s3_link": "reports/ON_DEMAND/TRANSACTIONS/date=2026-08-17/organization_code=9f2e1a44-3c7b-4d15-8e60-1b4a7c9d2f88/report=7b1c9d3e-5a24-4f68-9c02-3e8d1f6a4b57/7b1c9d3e-5a24-4f68-9c02-3e8d1f6a4b57.csv",
"merchant_reference_id": "",
"start_date": "2026-08-01T03:00:00Z",
"end_date": "2026-08-17T07:30:00Z",
"created_at": "2026-08-17T07:33:04.372231Z",
"updated_at": "2026-08-17T07:35:18.49869Z",
"status": "SUCCEEDED",
"user_code": ""
}
}
订阅
下面的 JSON 对象展示了与subscription.create 事件相关的数据结构示例。
JSON
{
"type": "subscription",
"type_event": "subscription.create",
"account_id": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"retry": 0,
"version": 2,
"data": {
"subscription": {
"code": "8fc8a985-bc18-4f9a-9403-d0cf6fc64e94",
"name": "Subscription",
"description": "retries activos",
"country": "CO",
"account_code": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"merchant_reference": "subscription-ref-merchant-002",
"status": "CREATED",
"amount": {
"currency": "COP",
"value": 36000
},
"frequency": null,
"billing_date": {
"type": "DAY",
"day": 30
},
"billing_cycles": {
"total": 5,
"current": 1,
"next_at": "2026-02-28T18:25:49.995376Z"
},
"current_period_start": "2026-01-28T18:25:49.995376Z",
"current_period_end": "2026-02-28T18:25:49.995376Z",
"current_phase_end": null,
"customer_payer": {
"code": "a9f9140a-1216-481c-8356-1a125078f905"
},
"payment_method": {
"type": "CARD",
"vaulted_token": "7eeb8d32-d5c3-45a8-955b-30accc625d1f"
},
"availability": {
"start_at": "2026-02-01T18:25:49.995376Z",
"finish_at": null
},
"retries": {
"retry_on_decline": false,
"amount": 6
},
"metadata": [
{
"key": "Canal 1",
"value": "Soccer"
}
],
"additional_data": null,
"payments": [],
"trial_period": {
"billing_cycles": 1,
"amount": {
"currency": null,
"value": null
}
},
"initial_payment_validation": true,
"subscription_agreement_id": null,
"created_at": "2025-05-21T15:33:16.662026Z",
"updated_at": "2025-05-21T15:33:16.662026Z"
}
}
}
subscription.active
当订阅从任何其他有效状态转换为ACTIVE 时发送。使用此事件可触发激活后的流程,而无需轮询。
JSON
{
"type": "subscription",
"type_event": "subscription.active",
"account_id": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"retry": 0,
"version": 2,
"data": {
"subscription": {
"code": "e98ef674-9baa-4f7a-8da4-4c812c4749a4",
"name": "Subscription",
"description": "retries activos",
"country": "CO",
"account_code": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"merchant_reference": "subscription-ref-merchant-002",
"status": "ACTIVE",
"amount": {
"currency": "COP",
"type": "FIXED",
"value": 36000
},
"frequency": {
"type": "MINUTES",
"value": 3,
"monthly_billing_day": null,
"execution": "YUNO"
},
"billing_date": null,
"billing_cycles": {
"total": 5,
"current": 2,
"next_at": "2025-12-04T00:32:25.485281Z"
},
"current_period_start": "2025-12-04T00:29:25.485281Z",
"current_period_end": "2025-12-04T00:32:25.485281Z",
"current_phase_end": null,
"customer_payer": {
"code": "a9f9140a-1216-481c-8356-1a125078f905"
},
"payment_method": {
"type": "CARD",
"vaulted_token": "7eeb8d32-d5c3-45a8-955b-30accc625d1f",
"card": {
"installments": null,
"network_transaction_id": "651161211088410"
}
},
"availability": {
"start_at": "2025-12-04T00:29:25.485281Z",
"finish_at": null
},
"retries": {
"retry_on_decline": true,
"amount": 6
},
"metadata": [
{
"key": "Canal 1",
"value": "Soccer"
}
],
"additional_data": null,
"payments": [],
"trial_period": {
"billing_cycles": 1,
"amount": {
"currency": null,
"value": null
}
},
"initial_payment_validation": true,
"provider_subscription_id": null,
"subscription_agreement_id": null,
"created_at": "2025-12-04T00:29:25.485281Z",
"updated_at": "2025-12-04T00:29:59.216998Z"
}
}
}
subscription.trialing
当订阅从其他状态进入计划的试用阶段时发送。在创建时进入试用会以subscription.create 报告,从暂停状态进入试用则以 subscription.resume 报告。
JSON
{
"type": "subscription",
"type_event": "subscription.trialing",
"account_id": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"retry": 0,
"version": 2,
"data": {
"subscription": {
"code": "e98ef674-9baa-4f7a-8da4-4c812c4749a4",
"name": "Subscription",
"country": "CO",
"account_code": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"merchant_reference": "subscription-ref-merchant-002",
"status": "TRIALING",
"plan_id": "0b0a2f7a-3d19-4a52-8f0e-3f1a3d5a3f21",
"current_phase": "TRIAL",
"amount": {
"currency": "COP",
"type": "FIXED",
"value": 36000
},
"billing_cycles": {
"total": 5,
"current": 2,
"next_at": "2025-12-04T00:32:25.485281Z"
},
"current_period_start": "2025-12-04T00:29:25.485281Z",
"current_period_end": "2025-12-04T00:32:25.485281Z",
"current_phase_end": "2025-12-04T00:32:25.485281Z",
"customer_payer": {
"code": "a9f9140a-1216-481c-8356-1a125078f905"
},
"payments": [],
"created_at": "2025-12-04T00:29:25.485281Z",
"updated_at": "2025-12-04T00:29:59.216998Z"
}
}
}
subscription.past_due
当定期扣款失败且订阅进入PAST_DUE 时发送。在重试进行期间,订阅会继续计费,并且仍可取消。当之后的扣款成功时,订阅会恢复为 ACTIVE(如果试用阶段仍在进行,则恢复为 TRIALING),并发送相应的 subscription.active 或 subscription.trialing 事件。
此事件仅针对已启用 PAST_DUE 状态的账户发出。未启用时,扣款失败后订阅保持 ACTIVE,只有 payment.purchase webhook 会报告拒绝。请参见 订阅状态。
JSON
{
"type": "subscription",
"type_event": "subscription.past_due",
"account_id": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"retry": 0,
"version": 2,
"data": {
"subscription": {
"code": "e98ef674-9baa-4f7a-8da4-4c812c4749a4",
"name": "Subscription",
"country": "CO",
"account_code": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"merchant_reference": "subscription-ref-merchant-002",
"status": "PAST_DUE",
"amount": {
"currency": "COP",
"type": "FIXED",
"value": 36000
},
"billing_cycles": {
"total": 5,
"current": 3,
"next_at": "2025-12-04T00:35:25.485281Z"
},
"current_period_start": "2025-12-04T00:32:25.485281Z",
"current_period_end": "2025-12-04T00:35:25.485281Z",
"current_phase_end": null,
"customer_payer": {
"code": "a9f9140a-1216-481c-8356-1a125078f905"
},
"retries": {
"retry_on_decline": true,
"amount": 6
},
"payments": [],
"created_at": "2025-12-04T00:29:25.485281Z",
"updated_at": "2025-12-04T00:35:25.485281Z"
}
}
}
subscription.pause
当订阅被暂停时发送。使用此事件可更新您系统中的状态并暂停相关服务。已暂停订阅的周期窗口会冻结在原处,而不会向前推进。
current_period_start/current_period_end(如果订阅处于某个阶段内,还包括 current_phase_end)保持暂停时的当前窗口,在计费暂停期间 Yuno 不会推进它们。订阅暂停的时间越长,current_period_end 就越落在过去;在生产环境中,当前已暂停的订阅绝大多数已显示为已过去的窗口。不要在未同时检查 status 的情况下将 current_period_end 视为“下一次扣款日期”,对于已暂停的订阅,它并不是。JSON
{
"type": "subscription",
"type_event": "subscription.pause",
"account_id": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"retry": 0,
"version": 2,
"data": {
"subscription": {
"code": "e98ef674-9baa-4f7a-8da4-4c812c4749a4",
"name": "Subscription",
"status": "PAUSED",
"amount": {
"currency": "COP",
"type": "FIXED",
"value": 36000
},
"billing_cycles": {
"total": 5,
"current": 3,
"next_at": "2025-12-04T00:35:25.485281Z"
},
"current_period_start": "2025-12-04T00:32:25.485281Z",
"current_period_end": "2025-12-04T00:35:25.485281Z",
"current_phase_end": null,
"customer_payer": {
"code": "a9f9140a-1216-481c-8356-1a125078f905"
}
}
}
}
subscription.resume
当已暂停的订阅恢复并转换回其计费时所处的状态时发送:ACTIVE,或者如果仍处于试用阶段内则为 TRIALING。
Payload 携带 resume_reason,仅在此事件中出现:调用 恢复订阅 时为 MERCHANT,暂停到达其 pause_until 且订阅自行恢复时为 SCHEDULED。该事件还携带由此产生的 billing_cycles.next_at。
只要订阅对象携带 refund_rule 和 pause_until,订阅 payload 也会携带它们,请参见 订阅对象。
JSON
{
"type": "subscription",
"type_event": "subscription.resume",
"account_id": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"retry": 0,
"version": 2,
"data": {
"subscription": {
"code": "e98ef674-9baa-4f7a-8da4-4c812c4749a4",
"name": "Monthly Plan",
"description": "Monthly subscription",
"country": "US",
"account_code": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"merchant_reference": "subscription-ref-merchant-002",
"status": "ACTIVE",
"amount": {
"currency": "USD",
"type": "FIXED",
"value": 42.46
},
"frequency": {
"type": "MONTH",
"value": 1,
"monthly_billing_day": null,
"execution": "YUNO"
},
"billing_date": null,
"billing_cycles": {
"total": null,
"current": 2,
"next_at": "2026-07-14T19:19:31.914Z"
},
"current_period_start": "2026-06-14T19:19:31.914Z",
"current_period_end": "2026-07-14T19:19:31.914Z",
"current_phase_end": null,
"customer_payer": {
"code": "a9f9140a-1216-481c-8356-1a125078f905"
},
"payment_method": {
"type": "CARD",
"vaulted_token": "4ba74a56-14d4-4161-a0ba-8036e9b8abf6",
"card": {
"installments": null,
"network_transaction_id": "000000000000000",
"usage": "USED"
}
},
"availability": {
"start_at": "2026-06-14T19:19:31.914Z",
"finish_at": null
},
"retries": {
"retry_on_decline": true,
"amount": 4,
"strategy": "DEFAULT",
"schedule": null,
"stop_on_hard_decline": null,
"cancel_on_exhausted_retries": null
},
"metadata": [
{
"key": "plan_id",
"value": "monthly_plan"
}
],
"additional_data": null,
"payments": [],
"trial_period": {
"billing_cycles": 1,
"amount": {
"currency": null,
"value": null
}
},
"initial_payment_validation": false,
"provider_subscription_id": null,
"reason": null,
"resume_reason": "MERCHANT",
"subscription_agreement_id": null,
"soft_descriptor": null,
"renewal_notification_days": null,
"cancellation_time": null,
"cancellation_source": null,
"ending_time": null,
"created_at": "2026-05-14T19:19:32.117629Z",
"updated_at": "2026-06-15T07:11:52.504031Z",
"history": null
}
}
}
pause_until)会发送相同的事件,但带有 "resume_reason": "SCHEDULED",payload 中没有其他结构差异(SCHEDULED 变体根据服务的事件定义描述,而非来自捕获的投递)。
subscription.reactivate
当CANCELED 或 COMPLETED 状态的订阅通过 重新激活订阅 恢复为 ACTIVE(当试用阶段覆盖重新激活的周期时则为 TRIALING)时发送。Payload 是订阅对象。
JSON
{
"type": "subscription",
"type_event": "subscription.reactivate",
"account_id": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"retry": 0,
"version": 2,
"data": {
"subscription": {
"code": "e98ef674-9baa-4f7a-8da4-4c812c4749a4",
"name": "SUB-111 win-back subject",
"description": null,
"country": "CO",
"account_code": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"merchant_reference": "sub111a-1789487996637-802344",
"status": "ACTIVE",
"amount": {
"currency": "COP",
"type": "FIXED",
"value": 45000
},
"frequency": {
"type": "MONTH",
"value": 1,
"monthly_billing_day": null,
"execution": "YUNO"
},
"billing_date": null,
"billing_cycles": {
"total": 12,
"current": 2,
"next_at": "2026-10-15T15:59:57.366916Z"
},
"current_period_start": "2026-09-15T15:59:57.366916Z",
"current_period_end": "2026-10-15T15:59:57.366916Z",
"current_phase_end": null,
"customer_payer": {
"code": "a9f9140a-1216-481c-8356-1a125078f905"
},
"payment_method": {
"type": "CARD",
"vaulted_token": "96a73f83-8039-455c-97c6-7757d036450a",
"card": {
"installments": null,
"network_transaction_id": null,
"usage": "USED"
}
},
"availability": {
"start_at": "2026-09-15T15:59:57.366916Z",
"finish_at": null
},
"retries": {
"retry_on_decline": false,
"amount": 6,
"strategy": "DEFAULT",
"schedule": null,
"stop_on_hard_decline": null,
"cancel_on_exhausted_retries": null
},
"metadata": null,
"additional_data": null,
"payments": [],
"trial_period": {
"billing_cycles": 1,
"amount": {
"currency": null,
"value": null
}
},
"initial_payment_validation": false,
"provider_subscription_id": null,
"reason": null,
"subscription_agreement_id": null,
"soft_descriptor": null,
"renewal_notification_days": null,
"cancellation_time": null,
"cancellation_source": null,
"ending_time": null,
"created_at": "2026-09-15T15:59:57.366916Z",
"updated_at": "2026-09-15T15:59:58.65775Z",
"history": null
}
}
}
subscription.auto_resume_failed
当已暂停订阅的自动恢复在重试后仍无法完成时发送;订阅保持PAUSED。Payload 是订阅对象。适用于已为此启用的组织;请联系 Yuno。
目前尚无此事件的实时捕获。下面的示例复用了一个捕获的
PAUSED 订阅正文(与 subscription.pause 显示的结构相同,pause_until 来自基于时长的暂停),并将标识符替换为本页的示例订阅。JSON
{
"type": "subscription",
"type_event": "subscription.auto_resume_failed",
"account_id": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"retry": 0,
"version": 2,
"data": {
"subscription": {
"code": "e98ef674-9baa-4f7a-8da4-4c812c4749a4",
"name": "SUB-112 passthrough subject",
"description": null,
"country": "CO",
"account_code": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"merchant_reference": "pa-sub112pt-1789487657670-794215",
"status": "PAUSED",
"amount": {
"currency": "COP",
"value": 45000
},
"frequency": {
"type": "MONTH",
"value": 1
},
"billing_cycles": {
"total": null,
"current": 2,
"paid": 1,
"next_at": "2026-10-15T15:54:18.312843Z"
},
"current_period_start": "2026-09-15T15:54:18.312843Z",
"current_period_end": "2026-10-15T15:54:18.312843Z",
"customer_payer": {
"code": "a9f9140a-1216-481c-8356-1a125078f905"
},
"payment_method": {
"type": "CARD",
"vaulted_token": "589c51a6-050d-4b9b-a00c-856e064e5f50",
"card": {
"installments": null,
"network_transaction_id": "615803391389209",
"usage": "USED"
}
},
"availability": {
"start_at": "2026-09-15T15:54:18.312843Z",
"finish_at": null
},
"retries": {
"retry_on_decline": false,
"amount": 6,
"strategy": "SMART",
"schedule": null,
"stop_on_hard_decline": null,
"cancel_on_exhausted_retries": null
},
"metadata": null,
"additional_data": null,
"initial_payment_validation": false,
"reason": null,
"subscription_agreement_id": null,
"created_at": "2026-09-15T15:54:18.312843Z",
"updated_at": "2026-09-15T15:54:22.783678Z",
"pause_until": "2026-10-15T15:54:22.780166Z"
}
}
}
auto_resume_failed 本身不是一种状态:订阅现在是、并将保持 PAUSED。收到此事件后,调用 恢复订阅 以手动结束暂停。
subscription.creation_failed
针对 Stripe Billing 支付发送,当携带external_subscription 的 SUCCEEDED 支付无法创建其 Stripe 订阅时触发。款项已捕获,且未创建或激活任何 Stripe 订阅。每次失败发送一次。当支付已退款或部分退款时不发送。请在 subscription_triggers 中使用 CREATION_FAILED 值进行订阅。
与其他订阅事件不同,data 不携带 Yuno 订阅对象,因为该对象并不存在:
| 字段 | 类型 | 描述 |
|---|---|---|
payment_id | string (UUID) | 已捕获的 Yuno 支付。 |
external_subscription | object | 与您在支付中发送时完全一致的 external_subscription 对象。 |
dead_letter_kind | string | 未创建订阅的原因,例如 incomplete_payload、tax_quote_expired、tax_not_calculated 或 stripe_resource_missing。请将其视为开放式字段:可能会新增值。 |
reason | string | dead_letter_kind 的简短可读描述。请勿解析它。 |
occurred_at | string (ISO 8601, UTC) | Yuno 放弃创建订阅的时间。 |
目前尚无此事件的实时捕获。下面的示例根据该事件的约定构建;标识符仅作示意。
JSON
{
"type": "subscription",
"type_event": "subscription.creation_failed",
"account_id": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"retry": 0,
"version": 2,
"data": {
"payment_id": "4f2b8a3e-6d1c-4b7a-9e2f-8c5d3a1b7e60",
"external_subscription": {
"id": "sub_1QwZzz",
"customer_id": "cus_RplXYZ"
},
"dead_letter_kind": "tax_quote_expired",
"reason": "The tax quote expired",
"occurred_at": "2026-11-05T14:32:07.512Z"
}
}
SUCCEEDED:Yuno 不会对其退款。请修复原因并使用新的支付重试注册,同时退还原支付;或者直接对其退款。请参见 如果无法创建订阅。
subscription.cancel
当订阅被取消时发送。已取消的订阅可以通过 重新激活订阅 恢复,这样会保留同一订阅及其支付历史记录。 订阅对象携带一个cancellation_source 字段,描述触发取消的原因:MERCHANT、SYSTEM、PLAN_CHANGE 或 RETRIES_EXHAUSTED。有关每个值的含义,请参见 订阅对象。
请将
cancellation_source 视为开放式字段。随着 Yuno 引入新的取消行为,可能会新增值,因此请妥善处理无法识别的值,而不要对当前列表进行穷举匹配。RETRIES_EXHAUSTED 是最新添加的值:当某个计费周期的重试结束仍未成功付款,且订阅创建时 retries.cancel_on_exhausted_retries 设置为 true 时,会发送该值。JSON
{
"type": "subscription",
"type_event": "subscription.cancel",
"account_id": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"retry": 0,
"version": 2,
"data": {
"subscription": {
"code": "e98ef674-9baa-4f7a-8da4-4c812c4749a4",
"name": "Subscription",
"status": "CANCELED",
"amount": {
"currency": "COP",
"type": "FIXED",
"value": 36000
},
"billing_cycles": {
"total": 5,
"current": 5,
"next_at": "2026-01-04T00:35:25.485281Z"
},
"current_period_start": "2025-12-04T00:35:25.485281Z",
"current_period_end": "2026-01-04T00:35:25.485281Z",
"current_phase_end": null,
"customer_payer": {
"code": "a9f9140a-1216-481c-8356-1a125078f905"
}
}
}
}
CANCELED 时的当前窗口,与 PAUSED 订阅冻结其窗口的方式相同(参见 subscription.pause 说明)。
subscription.complete
当订阅到达其结束日期或总计费周期数,并转换为COMPLETED 状态时发送。
JSON
{
"type": "subscription",
"type_event": "subscription.complete",
"account_id": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"retry": 0,
"version": 2,
"data": {
"subscription": {
"code": "e98ef674-9baa-4f7a-8da4-4c812c4749a4",
"name": "Subscription",
"status": "COMPLETED",
"amount": {
"currency": "COP",
"type": "FIXED",
"value": 36000
},
"billing_cycles": {
"total": 5,
"current": 5,
"next_at": "2026-01-04T00:35:25.485281Z"
},
"current_period_start": "2025-12-04T00:35:25.485281Z",
"current_period_end": "2026-01-04T00:35:25.485281Z",
"current_phase_end": null,
"customer_payer": {
"code": "a9f9140a-1216-481c-8356-1a125078f905"
}
}
}
}
subscription.close_to_renewal
在即将续订之前发送。发送时间由订阅上的renewal_notification_days 控制。
JSON
{
"type": "subscription",
"type_event": "subscription.close_to_renewal",
"account_id": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"retry": 0,
"version": 2,
"data": {
"subscription": {
"code": "e98ef674-9baa-4f7a-8da4-4c812c4749a4",
"name": "Monthly Plan",
"description": "Monthly subscription",
"country": "US",
"account_code": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"merchant_reference": "subscription-ref-merchant-002",
"status": "ACTIVE",
"amount": {
"currency": "USD",
"type": "FIXED",
"value": 42.46
},
"frequency": {
"type": "MONTH",
"value": 1,
"monthly_billing_day": null,
"execution": "YUNO"
},
"billing_date": null,
"billing_cycles": {
"total": null,
"current": 2,
"next_at": "2026-07-14T19:19:31.914Z"
},
"current_period_start": "2026-06-14T19:19:31.914Z",
"current_period_end": "2026-07-14T19:19:31.914Z",
"current_phase_end": null,
"customer_payer": {
"code": "a9f9140a-1216-481c-8356-1a125078f905"
},
"payment_method": {
"type": "CARD",
"vaulted_token": "4ba74a56-14d4-4161-a0ba-8036e9b8abf6",
"card": {
"installments": null,
"network_transaction_id": "000000000000000",
"usage": "USED"
}
},
"availability": {
"start_at": "2026-06-14T19:19:31.914Z",
"finish_at": null
},
"retries": {
"retry_on_decline": true,
"amount": 4,
"strategy": "DEFAULT",
"schedule": null,
"stop_on_hard_decline": null,
"cancel_on_exhausted_retries": null
},
"metadata": [
{
"key": "plan_id",
"value": "monthly_plan"
}
],
"additional_data": null,
"payments": [],
"trial_period": {
"billing_cycles": 1,
"amount": {
"currency": null,
"value": null
}
},
"initial_payment_validation": false,
"provider_subscription_id": null,
"reason": null,
"subscription_agreement_id": null,
"soft_descriptor": null,
"renewal_notification_days": 3,
"cancellation_time": null,
"cancellation_source": null,
"ending_time": null,
"created_at": "2026-05-14T19:19:32.117629Z",
"updated_at": "2026-06-15T07:11:52.504031Z",
"history": null
}
}
}
subscription.cycle_executed
针对基于计划的订阅,当执行$0 周期(试用周期或全额折扣周期)时发送。这些周期不会产生 payment.purchase webhook,因此此事件是它们的唯一凭证。reason 为 TRIAL 或 FULL_DISCOUNT,phase 是该周期所属的阶段,breakdown 携带与付费周期相同的明细,总额为零。
在带有有效 促销 的订阅的折扣周期中,该事件还会在 data 中包含一个 promotion 对象。它携带促销 id、该次扣款减免的 discount_amount,以及 cycles_remaining(本周期之后剩余的折扣周期数)。没有促销的全价扣款不会发送此事件。已扣款的折扣周期不携带 reason。只有当周期的扣款为 0 时,reason 才为 FULL_DISCOUNT。
| 周期 | 是否发送? |
|---|---|
| 带折扣的已批准扣款 | 是。包含 promotion 对象,并在该周期计数后发送。 |
| 自动或强制重试,已批准 | 是,每个周期一次,带有 promotion 对象。 |
| 延迟结果,已批准 | 是,在结果到达时发送一次。 |
| 已拒绝的扣款 | 否。 |
| 试用周期 | 仅针对带阶段的计划上的订阅发送,与现在相同(reason TRIAL)。当试用周期计入促销时,该事件包含 discount_amount 为 0 的促销对象。 |
| 带阶段的计划中的阶段 $0 周期,无促销 | 是,reason 为 TRIAL 或 FULL_DISCOUNT。保持不变。 |
100% 周期(FULL_DISCOUNT) | 是,reason 为 FULL_DISCOUNT。在可以读取时包含 promotion 对象。 |
| 没有促销的全价扣款 | 否。 |
"promotion": {
"id": "8f2d6c1e-3b7a-4c55-9a1e-2f4d8b7c6a10",
"discount_amount": 50,
"cycles_remaining": 2
}
金额为 JSON 数字Webhook payload 中的金额是 JSON 数字,因此末尾的零可能不会保留:金额 50.00 可能以 50.0 的形式到达。请以数字而非文本形式比较金额。
JSON
{
"type": "subscription",
"type_event": "subscription.cycle_executed",
"account_id": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"retry": 0,
"version": 2,
"data": {
"subscription": {
"code": "e98ef674-9baa-4f7a-8da4-4c812c4749a4",
"name": "Monthly Plan",
"status": "TRIALING",
"plan_id": "0b0a2f7a-3d19-4a52-8f0e-3f1a3d5a3f21",
"current_phase": "TRIAL",
"billing_cycles": {
"total": null,
"current": 2,
"next_at": "2026-07-14T19:19:31.914Z"
},
"current_period_start": "2026-06-14T19:19:31.914Z",
"current_period_end": "2026-07-14T19:19:31.914Z",
"current_phase_end": "2026-07-14T19:19:31.914Z",
"payments": []
},
"cycle": 1,
"reason": "TRIAL",
"phase": "TRIAL",
"plan_id": "0b0a2f7a-3d19-4a52-8f0e-3f1a3d5a3f21",
"phase_payment": 1,
"billing_cycle": 1,
"breakdown": {
"currency": "USD",
"subtotal": 0,
"total": 0,
"plan_id": "0b0a2f7a-3d19-4a52-8f0e-3f1a3d5a3f21",
"line_items": [
{
"type": "PLAN",
"label": "Trial",
"service_period": {
"start": "2026-06-14T19:19:31.914Z",
"end": "2026-07-14T19:19:31.914Z"
},
"amount": {
"currency": "USD",
"value": 0
}
}
]
}
}
}
subscription.promotion_applied
当促销应用于订阅时发送:在创建时、当支付链接创建订阅时、通过 更新订阅(包括替换当前促销的重新应用)时,以及在应用新计划促销的计划变更时。它会发送给带有PROMOTION_APPLIED 触发器的 webhooks。data.promotion 是 订阅促销对象,嵌入的订阅也携带相同的对象。促销结束时不会发送任何事件;请读取订阅以查看其状态。
JSON
{
"type": "subscription",
"type_event": "subscription.promotion_applied",
"account_id": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"code": "e98ef674-9baa-4f7a-8da4-4c812c4749a4",
"status": "ACTIVE",
"retry": 0,
"version": 2,
"data": {
"promotion": {
"id": "8f2d6c1e-3b7a-4c55-9a1e-2f4d8b7c6a10",
"name": "Welcome 50% x3",
"status": "ACTIVE",
"discount": {
"type": "PERCENTAGE",
"value": 50
},
"cycles": {
"total": 3,
"used": 0,
"remaining": 3
},
"on_pause": "KEEP",
"applied_at": "2026-06-14T19:19:32.117629Z",
"ended_at": null,
"end_reason": null
},
"subscription": {
"code": "e98ef674-9baa-4f7a-8da4-4c812c4749a4",
"name": "Monthly Plan",
"status": "ACTIVE",
"plan_id": "0b0a2f7a-3d19-4a52-8f0e-3f1a3d5a3f21",
"amount": {
"currency": "USD",
"type": "FIXED",
"value": 100
},
"customer_payer": {
"code": "a9f9140a-1216-481c-8356-1a125078f905"
},
"promotion": {
"id": "8f2d6c1e-3b7a-4c55-9a1e-2f4d8b7c6a10",
"name": "Welcome 50% x3",
"status": "ACTIVE",
"discount": {
"type": "PERCENTAGE",
"value": 50
},
"cycles": {
"total": 3,
"used": 0,
"remaining": 3
},
"on_pause": "KEEP",
"applied_at": "2026-06-14T19:19:32.117629Z",
"ended_at": null,
"end_reason": null
}
}
}
}
subscription.phase_completed
针对基于计划的订阅,当某个计费阶段结束时发送,紧接在替换它的阶段的subscription.phase_started 之前。第一个阶段没有前一阶段,因此不会为其发送。phase 是刚刚结束的阶段。
JSON
{
"type": "subscription",
"type_event": "subscription.phase_completed",
"account_id": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"retry": 0,
"version": 2,
"data": {
"subscription": {
"code": "e98ef674-9baa-4f7a-8da4-4c812c4749a4",
"name": "Monthly Plan",
"status": "ACTIVE",
"plan_id": "0b0a2f7a-3d19-4a52-8f0e-3f1a3d5a3f21",
"current_phase": "REGULAR",
"payments": []
},
"phase": "TRIAL"
}
}
subscription.phase_started
针对基于计划的订阅,当某个计费阶段开始时发送,包括第一个阶段。phase 是正在开始的阶段,previous_phase 是它所替换的阶段,对于第一个阶段则为 null。
JSON
{
"type": "subscription",
"type_event": "subscription.phase_started",
"account_id": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"retry": 0,
"version": 2,
"data": {
"subscription": {
"code": "e98ef674-9baa-4f7a-8da4-4c812c4749a4",
"name": "Monthly Plan",
"status": "ACTIVE",
"plan_id": "0b0a2f7a-3d19-4a52-8f0e-3f1a3d5a3f21",
"current_phase": "REGULAR",
"payments": []
},
"phase": "REGULAR",
"previous_phase": "TRIAL"
}
}
subscription.plan_change_scheduled
当计划变更被安排在下一个计费周期时发送。plan_change 块描述待处理的变更;applies_at 是变更将生效的下一个计费日期。
JSON
{
"type": "subscription",
"type_event": "subscription.plan_change_scheduled",
"account_id": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"retry": 0,
"version": 2,
"data": {
"subscription": {
"code": "e98ef674-9baa-4f7a-8da4-4c812c4749a4",
"name": "Subscription",
"status": "ACTIVE",
"amount": {
"currency": "USD",
"type": "FIXED",
"value": 9.99
},
"customer_payer": {
"code": "a9f9140a-1216-481c-8356-1a125078f905"
}
},
"plan_change": {
"plan_id": "1904911d-5df9-429e-8488-ad41abea1a4d",
"plan_name": "Pro",
"direction": "UPGRADE",
"effective": "NEXT_BILLING_CYCLE",
"phases_behavior": "START_FROM_REGULAR",
"applies_at": "2026-08-15T00:00:00Z",
"requested_at": "2026-07-28T14:02:11Z"
}
}
}
subscription.plan_change_canceled
当待处理的计划变更被撤销或中止时发送。当商户发送"plan_change": null 时,plan_change 中的 reason 为 MERCHANT_UNDO;当目标计划在变更生效前被取消时,则为 TARGET_PLAN_CANCELED。在这两种情况下,订阅都保持在当前计划上。如果订阅本身被取消,待处理的变更会被静默丢弃,只发送 subscription.cancel。
JSON
{
"type": "subscription",
"type_event": "subscription.plan_change_canceled",
"account_id": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"retry": 0,
"version": 2,
"data": {
"subscription": {
"code": "e98ef674-9baa-4f7a-8da4-4c812c4749a4",
"name": "Subscription",
"status": "ACTIVE",
"amount": {
"currency": "USD",
"type": "FIXED",
"value": 9.99
},
"customer_payer": {
"code": "a9f9140a-1216-481c-8356-1a125078f905"
}
},
"plan_change": {
"plan_id": "1904911d-5df9-429e-8488-ad41abea1a4d",
"plan_name": "Pro",
"reason": "MERCHANT_UNDO"
}
}
}
subscription.plan_changed
当计划变更生效时发送。previous_plan_id 标识订阅变更前的计划;嵌入的订阅已反映新计划。
计划内的变更在首次按新计划计费的续订时就地应用,嵌入的订阅保持相同的 code。而 POST /v1/subscriptions/{id}/plan 会替换订阅:payload 携带新的 code 并设置 previous_subscription_id,同时会针对原订阅触发一个单独的 subscription.cancel(cancellation_source: PLAN_CHANGE)。
JSON
{
"type": "subscription",
"type_event": "subscription.plan_changed",
"account_id": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"retry": 0,
"version": 2,
"data": {
"subscription": {
"code": "e98ef674-9baa-4f7a-8da4-4c812c4749a4",
"name": "Subscription",
"status": "ACTIVE",
"plan_id": "1904911d-5df9-429e-8488-ad41abea1a4d",
"amount": {
"currency": "USD",
"type": "FIXED",
"value": 29.99
},
"customer_payer": {
"code": "a9f9140a-1216-481c-8356-1a125078f905"
}
},
"previous_plan_id": "0804911d-5df9-429e-8488-ad41abea1a4c"
}
}
subscription.cancel_scheduled
当通过带有schedule 块的 POST /v1/subscriptions/{id}/cancel 安排取消时发送。cancel_scheduled 描述待处理的安排,请参见 取消订阅。
JSON
{
"type": "subscription",
"type_event": "subscription.cancel_scheduled",
"account_id": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"retry": 0,
"version": 2,
"data": {
"subscription": {
"code": "e98ef674-9baa-4f7a-8da4-4c812c4749a4",
"name": "Subscription",
"status": "ACTIVE",
"amount": {
"currency": "USD",
"type": "FIXED",
"value": 9.99
},
"customer_payer": {
"code": "a9f9140a-1216-481c-8356-1a125078f905"
}
},
"cancel_scheduled": {
"mode": "AFTER_CYCLES",
"after_cycles": 3,
"at": "<example>",
"requested_at": "<example>",
"past_due_behavior": "EXHAUST_RETRIES"
}
}
}
subscription.cancel_schedule_canceled
当通过在POST /v1/subscriptions/{id}/cancel 上发送 "schedule": null 撤销待处理的计划取消时发送。如果计划取消如期执行,则不发送此事件,而是触发 subscription.cancel。
JSON
{
"type": "subscription",
"type_event": "subscription.cancel_schedule_canceled",
"account_id": "c24d6c92-99a7-40bb-bc7b-efc40337f9f4",
"retry": 0,
"version": 2,
"data": {
"subscription": {
"code": "e98ef674-9baa-4f7a-8da4-4c812c4749a4",
"name": "Subscription",
"status": "ACTIVE",
"amount": {
"currency": "USD",
"type": "FIXED",
"value": 9.99
},
"customer_payer": {
"code": "a9f9140a-1216-481c-8356-1a125078f905"
}
}
}
}
续订扣款与失败(无 subscription.error)
不存在
subscription.error webhook。续订扣款失败时,Yuno 不会发出订阅事件。续订扣款的结果,包括成功的重新计费和失败或被拒绝的尝试,都以与订阅关联的 payment.purchase webhooks 投递,结果携带在 status/sub_status 字段中。请订阅 payment.purchase 以跟踪续订结果。$0/试用周期不会发出支付 webhook;在基于计划的订阅中,它们改为以 subscription.cycle_executed 报告。续订扣款本身始终由
payment.purchase webhook 表示,而不会由订阅 webhook 表示。在 webhook payload 中,订阅对象内的 payments 数组目前始终为空。subscription.active 在订阅首次变为有效时(billing_cycles.current = 2 时)发送,而不是在每次续订时发送;只有当订阅从 PAST_DUE 恢复时才会再次发送。在两种情况下,续订失败确实会产生订阅 webhook。如果账户启用了
PAST_DUE 状态,某个周期的首次扣款失败会使订阅进入 PAST_DUE 并发出 subscription.past_due。如果订阅的 retries.cancel_on_exhausted_retries 设置为 true,那么当该周期的重试结束仍未成功付款时,订阅会被取消,并发出一个 cancellation_source 设置为 RETRIES_EXHAUSTED 的 subscription.cancel。这仍然不是 subscription.error:各次失败的尝试仍然是 payment.purchase webhooks。只有最终的取消会在订阅上表示。Onboarding
下面的 JSON 对象展示了与 onboarding 事件相关的数据结构示例,此处为onboarding.error。
Example
{
"type": "onboarding",
"type_event": "onboarding.error",
"account_id": "c2721496-89c3-497a-8e24-0872c2e1386c",
"retry": 0,
"version": 2,
"data": {
"id": "d1fbb1d7-321d-4855-b603-135cd4f4ab82",
"type": "TWO_STEP_ONBOARDING",
"workflow": "DIRECT",
"description": null,
"status": "ERROR",
"response_message": null,
"callback_url": "https://merchant.example.com/webhook/onboarding",
"provider": {
"id": "STRIPE",
"connection_id": "caaeba00-05c8-4295-815f-1736c2b0b622",
"redirect_url": null,
"recipient_id": "",
"onboarding_url": "",
"legal_entity": null
},
"documentation": [],
"legal_representatives": [],
"withdrawal_methods": {
"bank": {
"code": "002",
"branch": "002",
"branch_digit": null,
"account": "9876543210",
"account_digit": null,
"account_type": "CHECKINGS",
"routing": "021000022",
"country": "US",
"currency": "USD",
"payout_schedule": null
}
},
"requirements": [
{
"field": "withdrawal_methods.bank.routing",
"message": "Invalid routing number",
"status": "REJECTED"
}
],
"terms_of_service": null,
"metadata": [],
"recipient": {
"id": "c5e0d5d5-5346-4fea-9b3e-97e825b11b07",
"national_entity": "INDIVIDUAL",
"merchant_recipient_id": "12b2b154-3ac9-4255-848a-46c8e3a70476",
"entity_type": "PRIVATE",
"first_name": "Juan",
"last_name": "Pérez",
"legal_name": null,
"email": "juan.perez@example.com",
"date_of_birth": "1990-01-15",
"country": "CO",
"website": "https://juanperez.com",
"industry": "Technology",
"merchant_category_code": "5734",
"document": {
"document_number": "1234567890",
"document_type": "CC"
},
"phone": {
"country_code": "57",
"number": "3001234567"
},
"address": {
"address_line_1": "Carrera 7 # 32-16",
"address_line_2": "Oficina 201",
"city": "Bogotá",
"country": "CO",
"state": "Cundinamarca",
"zip_code": "110311",
"neighborhood": "Centro"
},
"withdrawal_methods": {
"bank": {
"code": "001",
"branch": "004",
"branch_digit": "123",
"account": "1234567890",
"account_digit": "123",
"account_type": "SAVINGS",
"routing": "021000021",
"country": "CO",
"currency": "COP",
"payout_schedule": null
}
},
"documentation": [],
"legal_representatives": [
{
"merchant_reference": "REP_001",
"first_name": "María",
"last_name": "González",
"email": "maria.gonzalez@example.com",
"date_of_birth": "1985-05-20",
"country": "CO",
"nationality": "CO",
"title": "CEO",
"publicly_exposed_person": false,
"ultimate_beneficial_owner": true,
"document": {
"document_number": "0987654321",
"document_type": "CC"
},
"phone": {
"country_code": "+57",
"number": "3109876543"
},
"address": {
"address_line_1": "Calle 26 # 13-19",
"address_line_2": null,
"city": "Bogotá",
"country": "CO",
"state": "Cundinamarca",
"zip_code": "110311",
"neighborhood": null
}
}
],
"created_at": "2025-10-21T16:29:36.997492Z",
"updated_at": "2025-10-21T16:29:36.997505Z"
},
"created_at": "2025-10-21T16:29:41.88055Z",
"updated_at": "2025-10-21T16:29:42.571531Z",
"expires_at": null
}
}
Marketplace 拆分转账
独立转账通知会在投递的 JSON 正文顶层包含已保存的direction。现有转账使用 PLATFORM_TO_RECIPIENT。收款方到平台方向的可用性以 创建 endpoint 为准。
下面的示例显示了投递正文中的部分字段。标题是订阅事件类型;投递的正文是转账对象本身,没有信封,也没有事件类型字段。请通过其 status(REVERSED 或 REVERSED_PARTIAL)以及类型为 SPLIT_TRANSFER_REVERSE 的交易来识别冲正通知。provider_data 描述处理该转账的服务提供商账户;每笔交易的 raw_response 携带服务提供商的原始响应,以字符串形式进行 JSON 序列化。
据工程团队说明,这两个事件在内部记录所用的
type_event 为 transfer.transfer;如上所述,投递的 webhook 正文本身不携带 type/type_event 信封。split_transfer.succeeded
当 marketplace 拆分转账成功完成时发送。{
"id": "550e8400-e29b-41d4-a716-446655440000",
"recipient_id": "d246d578-266c-47c3-92b6-1748d780711b",
"direction": "PLATFORM_TO_RECIPIENT",
"amount": {
"currency": "USD",
"value": 4
},
"status": "SUCCEEDED",
"description": "Weekly marketplace earnings",
"merchant_reference": null,
"metadata": null,
"provider_data": {
"id": "STRIPE",
"recipient_id": "acct_1H2c3d4E5f6G7h8I",
"transfer_id": "tr_example",
"response_code": null,
"response_message": null
},
"transactions": [
{
"code": "cb5fd244-90fd-49b0-a160-a9d9f764eb9e",
"type": "SPLIT_TRANSFER",
"status": "SUCCEEDED",
"parent_transaction_code": null,
"provider_transfer_id": "tr_example",
"provider_response_code": null,
"provider_response_message": null,
"raw_response": "{\"id\":\"tr_example\",\"status\":\"paid\"}",
"reason": null,
"created_at": "2026-09-15T10:00:00Z",
"updated_at": "2026-09-15T10:00:00Z"
}
],
"created_at": "2026-09-15T10:00:00Z",
"updated_at": "2026-09-15T10:00:00Z",
"completed_at": "2026-09-15T10:00:00Z"
}
split_transfer_reverse.succeeded
该通知标识原始转账,保留其方向,并同时包含原始交易和冲正交易。在此部分冲正示例中,status 为 REVERSED_PARTIAL,amount 为 USD 1 的冲正金额。冲正交易通过 parent_transaction_code 指向原始交易。此通知与冲正的 HTTP 响应不同,后者不包含方向。它在原始转账的 id 下投递;description 和 merchant_reference 携带冲正请求中发送的值。
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"recipient_id": "d246d578-266c-47c3-92b6-1748d780711b",
"direction": "PLATFORM_TO_RECIPIENT",
"amount": {
"currency": "USD",
"value": 1
},
"status": "REVERSED_PARTIAL",
"description": "Reversal due to order cancelled",
"merchant_reference": "reverse-merchant-ref",
"metadata": null,
"provider_data": {
"id": "STRIPE",
"recipient_id": "acct_1H2c3d4E5f6G7h8I",
"transfer_id": "trr_example",
"response_code": null,
"response_message": null
},
"transactions": [
{
"code": "cb5fd244-90fd-49b0-a160-a9d9f764eb9e",
"type": "SPLIT_TRANSFER",
"status": "SUCCEEDED",
"parent_transaction_code": null,
"provider_transfer_id": "tr_example",
"provider_response_code": null,
"provider_response_message": null,
"raw_response": "{\"id\":\"tr_example\",\"status\":\"paid\"}",
"reason": null,
"created_at": "2026-09-15T10:00:00Z",
"updated_at": "2026-09-15T10:00:00Z"
},
{
"code": "0e5b4d60-4811-4a48-90c1-398d28dbce8c",
"type": "SPLIT_TRANSFER_REVERSE",
"status": "SUCCEEDED",
"parent_transaction_code": "cb5fd244-90fd-49b0-a160-a9d9f764eb9e",
"provider_transfer_id": "trr_example",
"provider_response_code": null,
"provider_response_message": null,
"raw_response": "{\"id\":\"trr_example\",\"status\":\"reversed\"}",
"reason": "ORDER_CANCELLED",
"created_at": "2026-09-15T10:05:00Z",
"updated_at": "2026-09-15T10:05:00Z"
}
],
"created_at": "2026-09-15T10:00:00Z",
"updated_at": "2026-09-15T10:05:00Z",
"completed_at": "2026-09-15T10:05:00Z"
}
退款
下面的 JSON 对象展示了与payment.refund 事件相关的数据结构示例。
Example
{
"type": "payment",
"type_event": "payment.refund",
"account_id": "2e7bc710-32db-43b2-a7aa-21c3bd031f8f",
"retry": 0,
"version": 2,
"data": {
"payment": {
"code": "f7bcf40d-7255-4e13-9dba-df6fa09be6b2",
"id": "f7bcf40d-7255-4e13-9dba-df6fa09be6b2",
"idempotency_key": "49eda7f2-bb05-437f-9676-7c8bb6df94a9",
"organization_code": "c60f4657-6ec5-487c-b9d5-a5fdbc887a1f",
"account_code": "2e7bc710-32db-43b2-a7aa-21c3bd031f8f",
"account_id": "2e7bc710-32db-43b2-a7aa-21c3bd031f8f",
"description": "Test goold",
"country": "CO",
"status": "REFUNDED",
"sub_status": "REFUNDED",
"order_id": "0000023",
"merchant_order_id": "0000023",
"created_at": "2025-09-03T21:51:08.633533Z",
"updated_at": "2025-09-03T21:53:40.368707Z",
"amount": {
"currency": "COP",
"value": 30000,
"refunded": 30000,
"captured": 0,
"authorized": 30000,
"currency_conversion": {
"code": "ccv_01HVK3Z9M2...",
"cardholder_currency": "USD",
"cardholder_amount": 7.50,
"cardholder_accepted": true,
"rate": 4000.00,
"rate_margin_percentage": 3.0,
"rate_source": "BLOOMBERG",
"provider": "PLANET",
"description": "DCC quote for retail shopping.",
"created_at": "2026-04-24T14:30:00Z",
"expires_at": "2026-04-24T15:30:00Z",
"status": "APPLIED",
"error_reason": null,
"provider_data": {
"terminal_id": "TERM_99"
}
}
},
"checkout": {
"session": null,
"sdk_action_required": false
},
"customer_payer": {
"code": "1ca7351f-8855-4765-bbe5-bd5110809cf2",
"id": "1ca7351f-8855-4765-bbe5-bd5110809cf2",
"organization_customer_external_id": "1756936266",
"merchant_customer_id": "1756936266",
"first_name": "Willintong",
"last_name": "Ramirez",
"gender": "M",
"date_of_birth": "1990-02-28",
"email": "willintong.ramirez@y.uno",
"nationality": "AR",
"ip_address": null,
"device_fingerprint": null,
"third_party_session_id": null,
"device_fingerprints": [],
"browser_info": null,
"document": {
"document_number": "123554332",
"document_type": "PASS"
},
"billing_address": {
"address_line_1": "Calle 34 # 56 - 78",
"address_line_2": "Apartamento 502, Torre I",
"city": "Bogotá",
"country": "CO",
"state": "Cundinamarca",
"zip_code": "111111",
"neighborhood": null
},
"shipping_address": {
"address_line_1": "Calle 34 # 56 - 78",
"address_line_2": "Apartamento 502, Torre I",
"city": "Bogotá",
"country": "CO",
"state": "Cundinamarca",
"zip_code": "111111",
"neighborhood": null
},
"phone": {
"country_code": "57",
"number": "3132450765"
},
"merchant_customer_created_at": null,
"geo_location": {
"latitude": null,
"longitude": null
},
"merchant_customer_validations": {
"account_is_verified": true,
"email_is_verified": true,
"phone_is_verified": true
}
},
"additional_data": {
"order": {
"shipping_amount": 10.35,
"fee_amount": 40.5,
"tip_amount": null,
"items": [
{
"id": "123AD",
"name": "Skirt",
"quantity": 3,
"unit_amount": 20,
"category": "Clothes",
"brand": "XYZ",
"sku_code": "8765432109",
"manufacture_part_number": "XYZ123456",
"image_url": null
}
],
"taxes": [],
"shipping": null,
"account_funding": null,
"tickets": [],
"fulfillment": null,
"discounts": [],
"sales_channel": null
},
"airline": null,
"transportations": null,
"seller_details": null
},
"transactions": {
"code": "14a2ca8a-07bd-47b2-9070-4868ab176ac8",
"id": "14a2ca8a-07bd-47b2-9070-4868ab176ac8",
"type": "REFUND",
"status": "SUCCEEDED",
"category": "CARD",
"amount": 30000,
"provider_id": "YUNO_TEST_PAYMENT_GW",
"response_code": "SUCCEEDED",
"merchant_reference": "REFUND_001",
"response_message": "Transaction successful",
"reason": "REQUESTED_BY_CUSTOMER",
"description": "Test refund",
"created_at": "2025-09-03T21:53:40.230290Z",
"updated_at": "2025-09-03T21:53:40.346884Z",
"payment_method": {
"token": null,
"type": "CARD",
"vaulted_token": null,
"vault_on_success": false,
"parent_payment_method_type": null,
"payment_method_detail": {
"card": {
"verify": false,
"capture": false,
"installments": 1,
"installments_plan_id": null,
"first_installment_deferral": null,
"installments_amount": null,
"installments_type": null,
"soft_descriptor": "",
"authorization_code": "658571",
"retrieval_reference_number": "",
"acquirer_reference_number": "",
"voucher": null,
"card_data": {
"holder_name": "Pepito Perez",
"iin": "41111111",
"lfd": "1111",
"number_length": 16,
"security_code_length": 3,
"brand": "VISA",
"issuer_name": "CONOTOXIA SP Z O O",
"issuer_code": null,
"country_code": "PL",
"category": "CLASSIC",
"type": "DEBIT",
"three_d_secure": {
"version": null,
"electronic_commerce_indicator": null,
"cryptogram": null,
"transaction_id": null,
"directory_server_transaction_id": null,
"pares_status": null,
"acs_id": null,
"strong_customer_authentication_exemptions": null
},
"network_token": null,
"fingerprint": "3d49ec9d-e941-4eaf-80eb-251469d66108",
"expiration_month": 3,
"expiration_year": 26
},
"stored_credentials": {
"reason": null,
"usage": null,
"subscription_agreement_id": null,
"network_transaction_id": null
}
},
"wallet": null,
"bnpl": null,
"bank_transfer": null,
"ticket": null,
"payment_link": null
}
},
"provider": {
"provider_transaction_id": "a9908f18-71ca-458b-9f94-f63e55bdc94a"
},
"provider_data": {
"raw_response": {
"message": "provider response"
},
"id": "YUNO_TEST_PAYMENT_GW",
"transaction_id": "a9908f18-71ca-458b-9f94-f63e55bdc94a",
"account_id": null,
"status": null,
"status_detail": null,
"response_message": null,
"response_code": "SUCCEEDED",
"third_party_transaction_id": null,
"third_party_account_id": null,
"iso8583_response_code": null,
"iso8583_response_message": null
},
"connection_data": {
"id": null,
"name": null
},
"simplified_mode": false,
"third_party_session_id": null,
"receipt": false,
"receipt_language": null,
"receipt_url": null,
"device_fingerprint": null
},
"transactions_history": [],
"callback_url": null,
"workflow": "DIRECT",
"split_marketplace": [],
"payment_link_code": "",
"subscription_id": null,
"subscription": null,
"fraud_screening": null,
"metadata": [],
"routing_rules": {
"smart_routing": false,
"monitors": false,
"condition": {
"id": 148781,
"name": null,
"description": null
}
}
}
}
}
HMAC:授权
下面的示例显示了一个原始 webhook 请求,其中包含启用 HMAC 认证时 Yuno 附带的x-hmac-signature 标头。
POST /your-webhook-endpoint HTTP/1.1
Host: your-server.com
Content-Type: application/json
x-api-key: your-api-key
x-secret: your-secret
x-hmac-signature: YwPQ1b2RcBkDGo32XvDS7R+/nMDuDIRjvQlsak72EMBY=
{
"live": "false",
"notificationItems": [
{
"NotificationRequestItem": {
"additionalData": {
"expiryDate": "12/2012",
"authCode": "1234",
"cardSummary": "7777",
"totalFraudScore": "10"
},
"amount": {
"currency": "EUR",
"value": 10100
},
"eventCode": "AUTHORISATION",
"eventDate": "2022-11-15T20:04:11+01:00",
"merchantAccountCode": "AcmeCorp",
"merchantReference": "2931874530016873",
"paymentMethod": "visa",
"pspReference": "CU4KVBAYAPFG0ZZKR",
"success": "true"
}
}
]
}