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/bank-transfer-refunds \--header 'Authorization: Bearer <access token>' \--header 'Content-Type: application/json' \--header 'Idempotency-Key: abc123' \--data '{"processingTerminalId":"1017","order":{"orderId":314,"description":"refund example","amount":1000,"currency":"USD"},"customer":{"notificationLanguage":"en","contactMethods":[{"type":"email","value":"[email protected]"}]},"refundMethod":{"type":"ach","secCode":"web","accountType":"checking","nameOnAccount":"Joe Bloggs","accountNumber":"32183159","routingNumber":"063100277"}}'
application/json
{"refundId": "JH58KQ5K5E","processingTerminalId": "1017","order": {"orderId": "314","dateTime": "2023-05-17T13:24:11.693Z","description": "refund example","amount": 50000,"currency": "USD"},"customer": {"contactMethods": [{"type": "email",}],"notificationLanguage": "en"},"bankAccount": {"type": "ach","secCode": "web","accountType": "checking","nameOnAccount": "Joe Bloggs","accountNumber": "****3159","routingNumber": "*****0277"},"transactionResult": {"type": "unreferencedRefund","status": "ready","authorizedAmount": -50000,"currency": "USD","responseCode": "A","responseMessage": "NoError","processorResponseCode": "0"}}