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=abc123' \--header 'Authorization: Bearer <access token>'
application/json
{"limit": 2,"count": 2,"hasMore": true,"data": [{"paymentId": "GTNOY9O4R4","processingTerminalId": "1017","order": {"orderId": "602","dateTime": "2023-05-16T15:53:18.000Z","description": "sample order","amount": 12100,"currency": "CAD","breakdown": {"subtotal": 10000,"tip": {"type": "percentage","amount": 1100,"percentage": 10},"taxes": [{"name": "VAT","rate": 10,"amount": 1000}]}},"customer": {"contactMethods": [{"type": "email",}],"notificationLanguage": "en"},"bankAccount": {"type": "pad","nameOnAccount": "Joe Bloggs","accountNumber": "*******8909","transitNumber": "12345","institutionNumber": "123"},"transactionResult": {"type": "payment","status": "ready","authorizedAmount": 12100,"currency": "CAD","responseCode": "A"}},{"paymentId": "E29U8OU8Q4","processingTerminalId": "1017","order": {"orderId": "541","dateTime": "2023-05-16T15:52:56.000Z","description": "test","amount": 12100,"currency": "CAD","breakdown": {"subtotal": 10000,"tip": {"type": "percentage","amount": 1100,"percentage": 10},"taxes": [{"name": "VAT","rate": 10,"amount": 1000}]}},"customer": {"contactMethods": [{"type": "email",}],"notificationLanguage": "en"},"bankAccount": {"type": "pad","nameOnAccount": "Joe Bloggs","accountNumber": "*******8909","transitNumber": "12345","institutionNumber": "123"},"transactionResult": {"type": "payment","status": "ready","authorizedAmount": 12100,"currency": "CAD","responseCode": "A"}}],"links": [{"rel": "next","method": "get","href": "https://api.payroc.com/v1/bank-transfer-payments?limit=2&processingTerminalId=1017&after=E29U8OU8Q4"},{"rel": "previous","method": "get","href": "https://api.payroc.com/v1//bank-transfer-payments?limit=2&processingTerminalId=1017&before=GTNOY9O4R4"}]}
curl --request post \--url https://api.payroc.com/v1/bank-transfer-payments/abc123/reverse \--header 'Authorization: Bearer <access token>' \--header 'Idempotency-Key: abc123'
application/json
{"paymentId": "JKNIJXNZAK","processingTerminalId": "1017","order": {"orderId": "157","dateTime": "2023-05-16T15:54:43.000Z","description": "sample order","amount": 12100,"currency": "CAD","breakdown": {"subtotal": 10000,"tip": {"type": "percentage","percentage": 10},"taxes": [{"name": "VAT","rate": 10,"amount": 1000}]}},"customer": {"contactMethods": [{"type": "email",}],"notificationLanguage": "en"},"bankAccount": {"type": "pad","nameOnAccount": "Joe Bloggs","accountNumber": "*******8909","transitNumber": "12345","institutionNumber": "123"},"transactionResult": {"type": "payment","status": "reversal","authorizedAmount": 12100,"currency": "CAD","responseCode": "A"}}