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/M2MJOG6O2Y \--header 'Authorization: Bearer <access token>'
application/json
{"paymentId": "M2MJOG6O2Y","processingTerminalId": "1017","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": "ach","secCode": "web","accountType": "checking","nameOnAccount": "Sarah Hazel Hopper","accountNumber": "****3159","routingNumber": "063100277","secureToken": {"secureTokenId": "MREF_abc1de23-f4a5-6789-bcd0-12e345678901fa","customerName": "Sarah Hazel Hopper","token": "296753123456","status": "notValidated","link": {"rel": "self","method": "GET","href": "https://api.payroc.com/v1/processing-terminals/1234001/secure-tokens/MREF_abc1de23-f4a5-6789-bcd0-12e345678901fa"}}},"transactionResult": {"type": "payment","status": "ready","authorizedAmount": 4999,"currency": "USD","responseCode": "A","responseMessage": "NoError","processorResponseCode": "0"},"customFields": [{"name": "yourCustomField","value": "abc123"}]}
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/refund \--header 'Authorization: Bearer <access token>' \--header 'Content-Type: application/json' \--header 'Idempotency-Key: 8e03978e-40d5-43e8-bc93-6894a57f9324' \--data '{"amount":4999,"description":"amount to refund"}'
application/json
{"paymentId": "M2MJOG6O2Y","processingTerminalId": "1234001","order": {"orderId": "OrderRef6543","dateTime": "2024-07-02T15:30:00Z","description": "Refund for order OrderRef6543","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": "****7890","transitNumber": "76543","institutionNumber": "543","secureToken": {"secureTokenId": "MREF_abc1de23-f4a5-6789-bcd0-12e345678901fa","customerName": "Sarah Hopper","token": "296753123456","status": "notValidated","link": {"rel": "self","method": "GET","href": "https://api.payroc.com/v1/processing-terminals/1234001/secure-tokens/MREF_abc1de23-f4a5-6789-bcd0-12e345678901fa"}}},"transactionResult": {"type": "payment","status": "reversal","authorizedAmount": 4999,"currency": "USD","responseCode": "A"},"customFields": [{"name": "yourCustomField","value": "abc123"}]}