curl --location --request POST 'https://identity.payroc.com/authorize' --header 'x-api-key: <api key>'
{"access_token": "eyJhbGc....adQssw5c","expires_in": 3600,"scope": "service_a service_b","token_type": "Bearer"}
curl-H "Content-Type: application/json"-H "Authorization: <Bearer token>"-H "Idempotency-Key: <UUID v4>"
curl --request post \--url https://api.payroc.com/v1/event-subscriptions \--header 'Authorization: Bearer <access token>' \--header 'Content-Type: application/json' \--header 'Idempotency-Key: 8e03978e-40d5-43e8-bc93-6894a57f9324' \--data '{"enabled":true,"eventTypes":["processingAccount.status.changed"],"notifications":[{"type":"webhook","uri":"https://my-server/notification/endpoint","secret":"aBcD1234eFgH5678iJkL9012mNoP3456","supportEmailAddress":"[email protected]"}],"metadata":{"yourCustomField":"abc123"}}'
application/json
{"id": 2565435189324,"enabled": true,"status": "registered","eventTypes": ["processingAccount.status.changed"],"notifications": [{"type": "webhook","uri": "https://my-service/notification/endpoint","secret": "**********NoP3456",}],"metadata": {"yourCustomField": "abc123"}}
{"specversion": "1.0","type": "processingAccount.status.changed","version": "1.0""source": "payroc","id": "123e4567-e89b-12d3-a456-426614174000","time": "2024-05-12T12:34:56.789Z","datacontenttype": "application/json","data": {"processingAccountId": "12345678","status": "entered"}}