Custom Data for Payment Button Checkout Does Not Work

The documentation: Commerce Payment Button Callbacks | Coinbase Cloud

states that by adding the “data-custom” attribute to the payment button. That it will append metadata to the checkout. However when we receive the webhook notification, it includes an empty metadata field. Does this feature work? Or is the documentation incorrect?

This is the webhook payload we receive, notice that the metadata field has an empty object.

{
“attempt_number”: 1,
“event”: {
“api_version”: “2018-03-22”,
“created_at”: “2023-10-06T02:05:11Z”,
“data”: {
“id”: “401e41ea-4fef-4f59-b150-1817f4bc67c2”,
“code”: “32NJ7JNZ”,
“name”: “Test”,
“utxo”: false,
“pricing”: {
“usdc”: {
“amount”: “9.990000”,
“currency”: “USDC”
},
“local”: {
“amount”: “9.99”,
“currency”: “USD”
},
“pusdc”: {
“amount”: “9.990000”,
“currency”: “PUSDC”
},
“pweth”: {
“amount”: “0.006153656621032693”,
“currency”: “PWETH”
},
“ethereum”: {
“amount”: “0.006156000”,
“currency”: “ETH”
}
},
“checkout”: {
“id”: “6c7f673c-317c-474b-b10c-c6f32470b1a5”
},
“fee_rate”: 0.01,
“logo_url”: “”,
“metadata”: {},
“payments”: ,
“resource”: “charge”,
“timeline”: [
{
“time”: “2023-10-06T02:05:11Z”,
“status”: “NEW”
}
],
“addresses”: {
“usdc”: “0x69a7818275f5791f1081bc09567d0c5d01bf2372”,
“pusdc”: “0x69a7818275f5791f1081bc09567d0c5d01bf2372”,
“pweth”: “0x69a7818275f5791f1081bc09567d0c5d01bf2372”,
“ethereum”: “0x69a7818275f5791f1081bc09567d0c5d01bf2372”
},
“pwcb_only”: false,
“created_at”: “2023-10-06T02:05:11Z”,
“expires_at”: “2023-10-06T03:05:11Z”,
“hosted_url”: “Coinbase Commerce”,
“brand_color”: “#122332”,
“description”: “Test”,
“fees_settled”: true,
“pricing_type”: “fixed_price”,
“support_email”: “”,
“brand_logo_url”: “https://res.cloudinary.com/commerce/image/upload/v1695787705/nl6nbpifdkbsnkmcxyhd.png”,
“exchange_rates”: {
“ETH-USD”: “1622.85”,
“USDC-USD”: “1.0”,
“PUSDC-USD”: “1.0”,
“PWETH-USD”: “1623.425”
},
“offchain_eligible”: false,
“organization_name”: “”,
“payment_threshold”: {
“overpayment_absolute_threshold”: {
“amount”: “0.01”,
“currency”: “USD”
},
“underpayment_absolute_threshold”: {
“amount”: “0.01”,
“currency”: “USD”
}
},
“local_exchange_rates”: {
“ETH-USD”: “1622.85”,
“USDC-USD”: “1.0”,
“PUSDC-USD”: “1.0”,
“PWETH-USD”: “1623.425”
},
“coinbase_managed_merchant”: false
},
“id”: “1c2dc660-17d7-4eda-aac7-ed06a93428e8”,
“resource”: “event”,
“type”: “charge:created”
},
“id”: “087df585-098a-4a21-8544-99573858eb4d”,
“scheduled_for”: “2023-10-06T02:05:11Z”
}
​​