Add metadata to your payment requests

Payment Metadata allows you to attach additional contextual information to a payment transaction. To use this feature, you can create a payment request with a metadata object within your transaction.

☝️

You can specify up to 5 keys, with key names up to 50 characters long, and values up to 100 characters long.

curl 'https://api.bridgeapi.io/v3/payment/payment-requests' \
	-X POST \
  -H 'Bridge-Version: BRIDGE_VERSION' \
  -H 'Client-Id: MY_CLIENT_ID' \
  -H 'Client-Secret: MY_CLIENT_SECRET'
  -H 'Content-Type: application/json' \
  -d '{
  "callback_url": "https://my-callback-url.com:8080/pay",
  "transactions": [
    {
    "amount": 99.5,
    "currency": "EUR",
    "label": "Payment label",
    "metadata":
    	{
      "internal_id":"123456789",
      "integrity_hash":"AH89DHE23617"
      }
    }
  ],
  "user": {
    "first_name": "Thomas",
    "last_name": "Pichet",
    "external_reference": "AEF142536-890"
  },
  "client_reference": "12345678-AZERTY",
  "provider_id": 6
}'

When you receive updates on your payments through our webhooks, you can access your metadata values in the callback URL. To achieve this, you need to configure your callback URL in your webhooks settings with the required keys.

The expected format for accessing metadata values in the callback URL is ${metadata.key_name}. This allows you to seamlessly integrate and utilize additional payment-related information in your payment processing flow.

2162

Example of a callback URL