Docs · Platforms
PSP metadata
LiveUpdated
Platforms and Sellers. Written for PSPs, acquirers, orchestrators, dispute services and agent platforms that act for many customers and merchants that receive agent orders.
Every PSP has a free-form slot for your own data, and none has a field for an agent, a mandate or a policy. psp-metadata says where Enruta’s labels go in one PSP’s objects and returns the values for one record, so an agent order can be recognized in the PSP’s dashboard, its reports and its dispute tools.
psp is one of stripe, adyen, checkout_com, braintree, paypal, worldpay, gr4vy, spreedly or shopify. The answer names where the fields live, when they can be written, the PSP’s limits and its documentation, and gives the fields filled in for this record.
// the Stripe fields for the $24.98 order of 2026-09-10
{
"enruta_agent_id": "agt_procurement_02",
"enruta_mandate_ref": "mnd_01M2512M8FQ7ZK4T1V9W3N6BXC",
"enruta_policy_version": "4",
"enruta_record_id": "rec_01M25129GZMJXTNQ47TMZRDGHN",
"enruta_protocol": "ucp",
"enruta_agent_platform": "claude"
}The labels
| Label | Meaning |
|---|---|
agent_id | The agent that paid |
mandate_ref | The mandate |
policy_version | The policy version the payment was decided under |
record_id | The buyer’s Evidence Record |
protocol | The checkout protocol, such as ucp |
agent_platform | The host the agent ran in |
Where each PSP keeps them
| PSP | Where | Written | Keys |
|---|---|---|---|
| Stripe | PaymentIntent.metadata | Any time | enruta_agent_id, enruta_mandate_ref, enruta_policy_version, enruta_record_id, enruta_protocol, enruta_agent_platform |
| Adyen | metadata on the /payments request | In the payment request only | Adyen’s agent fields agentProtocol, agentSessionId (the mandate) and agentPlatform, plus enrutaAgentId, enrutaMandateRef, enrutaPolicyVersion, enrutaRecordId; values up to 80 characters |
| Checkout.com | metadata on the payment request | In the payment request only | The six enruta_… keys |
| Braintree | Transaction custom fields, defined in the Control Panel first | After the payment too | The six enruta_… keys |
| PayPal | Orders v2 purchase_units[].custom_id | Before capture | One field of up to 127 characters: enr1|<record_id>|<mandate_ref>|<agent_id>|<policy_version> |
| Worldpay | The metadata of an Access Worldpay agentic session | In the payment request only | The six enruta_… keys |
| Gr4vy | Transaction metadata | After the payment too | The six enruta_… keys |
| Spreedly | transaction_metadata | In the transaction only | The six enruta_… keys |
| Shopify | Order metafields in the namespace enruta | Any time | enruta.agent_id, enruta.mandate_ref, enruta.policy_version, enruta.record_id, enruta.protocol, enruta.agent_platform |
Who writes them
- After the payment exists. Stripe, Braintree, PayPal (before capture) and Gr4vy accept the fields later. With a PSP connection to Stripe, Braintree or PayPal, Enruta writes them once an agent order is recognized with the PSP’s payment reference: report the payment as
psp_paymentonPOST /v0/sellers/orders, and the answer’spsp_write_backsays what was written. - Only when the payment is created. Adyen, Checkout.com and Worldpay take the fields only in the payment request, so the code that creates the payment adds them, and Enruta links the PSP’s payment reference to the agent order instead of writing afterwards. Spreedly’s transaction metadata is also set when the transaction is created.
@enruta/acceptexportspspMetadata(psp, labels), which renders the fields at the edge from the labels the middleware already read.