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>"
curl-H "Content-Type: application/json"-H "Authorization: <Bearer token>"-H "Idempotency-Key: <UUID v4>"
curl --request get \--url 'https://api.payroc.com/v1/bank-transfer-payments?processingTerminalId=1234001' \--header 'Authorization: Bearer <access token>'
application/json
{"limit": 2,"count": 2,"hasMore": true,"data": [{"paymentId": "M2MJOG6O2Y","processingTerminalId": "1234001","order": {"orderId": "OrderRef6543","dateTime": "2024-07-02T15:30:00Z","description": "Large Pepperoni Pizza","amount": 4999,"currency": "USD","breakdown": {"subtotal": 4347,"tip": {"type": "percentage","amount": 435,"percentage": 10},"taxes": [{"name": "Sales Tax","rate": 5,"amount": 217}]}},"customer": {"contactMethods": [{"type": "email",}],"notificationLanguage": "en"},"bankAccount": {"type": "pad","nameOnAccount": "Sarah Hazel Hopper","accountNumber": "*******3159","transitNumber": "76543","institutionNumber": "543"},"transactionResult": {"type": "payment","status": "ready","authorizedAmount": 4999,"currency": "USD","responseCode": "A"}},{"paymentId": "E29U8OU8Q4","processingTerminalId": "1234001","order": {"orderId": "OrderRef7654","dateTime": "2024-07-02T15:30:00Z","description": "test","amount": 3999,"currency": "USD","breakdown": {"subtotal": 3477,"tip": {"type": "percentage","amount": 348,"percentage": 10},"taxes": [{"name": "Sales Tax","rate": 5,"amount": 174}]}},"customer": {"contactMethods": [{"type": "email",}],"notificationLanguage": "en"},"bankAccount": {"type": "pad","nameOnAccount": "Sarah Hazel Hopper","accountNumber": "*******7890","transitNumber": "76543","institutionNumber": "543"},"transactionResult": {"type": "payment","status": "ready","authorizedAmount": 3999,"currency": "USD","responseCode": "A"},"customFields": [{"name": "yourCustomField","value": "abc123"}]}],"links": [{"rel": "next","method": "get","href": "https://api.payroc.com/v1/bank-transfer-payments?limit=2&processingTerminalId=1234001&after=E29U8OU8Q4"},{"rel": "previous","method": "get","href": "https://api.payroc.com/v1//bank-transfer-payments?limit=2&processingTerminalId=1234001&before=M2MJOG6O2Y"}]}
curl --request post \--url https://api.payroc.com/v1/bank-transfer-payments/M2MJOG6O2Y/reverse \--header 'Authorization: Bearer <access token>' \--header 'Idempotency-Key: 8e03978e-40d5-43e8-bc93-6894a57f9324'
application/json
{"paymentId": "M2MJOG6O2Y","processingTerminalId": "1234001","order": {"orderId": "OrderRef6543","dateTime": "2024-07-02T15:30:00Z","description": "Large Pepperoni Pizza","amount": 4999,"currency": "USD","breakdown": {"subtotal": 4347,"tip": {"type": "percentage","percentage": 10},"taxes": [{"name": "VAT","rate": 5,"amount": 217}]}},"customer": {"contactMethods": [{"type": "email",}],"notificationLanguage": "en"},"bankAccount": {"type": "pad","nameOnAccount": "Sarah Hazel Hopper","accountNumber": "*******7890","transitNumber": "76543","institutionNumber": "543"},"transactionResult": {"type": "payment","status": "reversal","authorizedAmount": 4999,"currency": "USD","responseCode": "A"},"customFields": [{"name": "yourCustomField","value": "abc123"}]}