hey community,
I’m building a alternative payment app. for Brazil, the document (CPF) is requested in the shopify checkout.
When the payment request is created, submitting it from the checkout, this value is missing in the transaction_metadata
in the request body sent to my backend api.
the documentation states that the
transaction_metadata.localized_fields
will be included in the create payment request body. yet, this information in my experience is not part of of the payload, the transaction_metadata is always a empty object.
link Build an alternative payments extension
do I have to do something to get these to be added in the request body?
I can see it for BRAZIL, switching to the most recent api, but not for the RFC from mexico.
example request body received
{
"id": "123123213123123123123123123124444",
"gid": "gid://shopify/PaymentSession/123123213123123123123123123124444",
"group": "12312321312312312312312312312",
"amount": "9000.00",
"currency": "MXN",
"test": true,
"proposed_at": "2025-02-07T10:49:14Z",
"kind": "sale",
"payment_method": {
"type": "custom_onsite",
"data": {
"attributes": "[{....}]",
"cancel_url": "https:///..../cn/xxxxxxxxxxx/processing"
}
},
"customer": {
"billing_address": {
"given_name": "xxxx",
"family_name": "xxx",
"line1": "xxxx",
"line2": "xxx",
"city": "xxx",
"postal_code": "xxx",
"province": "Amapá",
"country_code": "MX"
},
"shipping_address": {
"given_name": "xxx",
"family_name": "xxx",
"line1": "xxxx",
"line2": "xxx 1",
"city": "xxx",
"postal_codex: "xxx",
"province": "Amapá",
"country_code": "MX"
},
"email": "xxxxx@xxxx.com",
"locale": "en-BR"
},
"merchant_locale": "en-MX",
//missing info:
"transaction_metadata": {
....
}
}