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 get \--url https://api.payroc.com/v1/funding-balance \--header 'Authorization: Bearer <access token>'
application/json
{"limit": 2,"count": 2,"hasMore": true,"links": [{"rel": "previous","method": "get","href": "https://api.payroc.com/v1/funding-balance?before=4525644354&limit=2"},{"rel": "next","method": "get","href": "https://api.payroc.com/v1/funding-balance?after=987654321&limit=2"}],"data": [{"merchantId": "4525644354","funds": 120000,"pending": 50050,"available": 69950,"currency": "USD"},{"merchantId": "987654321","funds": 50000,"pending": 0,"available": 50000,"currency": "USD"}]}
curl --request post \--url https://api.payroc.com/v1/funding-instructions \--header 'Authorization: Bearer <access token>' \--header 'Content-Type: application/json' \--header 'Idempotency-Key: 8e03978e-40d5-43e8-bc93-6894a57f9324' \--data '{"merchants":[{"merchantId":"4525644354","recipients":[{"fundingAccountId":123,"paymentMethod":"ACH","amount":{"value":120000,"currency":"USD"},"metadata":{"yourCustomField":"abc123"}}]}],"metadata":{"yourCustomField":"abc123"}}'
application/json
{"instructionId": 64643131,"createdDate": "2024-07-02T15:30:00Z","lastModifiedDate": "2024-07-02T15:30:00Z","status": "accepted","merchants": [{"merchantId": "4525644354","recipients": [{"status": "accepted","fundingAccountId": 123,"paymentMethod": "ACH","amount": {"value": 120000,"currency": "USD"},"metadata": {"yourCustomField": "abc123"},"link": {"rel": "fundingAccount","method": "get","href": "https://api.payroc.com/v1/funding-accounts/123"}}],"link": {"rel": "merchant","method": "get","href": "https://api.payroc.com/v1/merchants/4525644354"}}],"metadata": {"instructionRef": "abc123"}}