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: 8e03978e-40d5-43e8-bc93-6894a57f9324' \--data '{"processingTerminalId":"1234001","order":{"orderId":"OrderRef6543","description":"Refund for order OrderRef6543","amount":4999,"currency":"USD"},"customer":{"notificationLanguage":"en","contactMethods":[{"type":"email","value":"[email protected]"}]},"refundMethod":{"type":"ach","secCode":"web","accountType":"checking","nameOnAccount":"Sarah Hazel Hopper","accountNumber":"1234567890","routingNumber":"123456789"},"customFields":[{"name":"yourCustomField","value":"abc123"}]}'
application/json
{"refundId": "CD3HN88U9F","processingTerminalId": "1234001","order": {"orderId": "OrderRef6543","dateTime": "2024-07-02T15:30:00Z","description": "Refund for order OrderRef6543","amount": 4999,"currency": "USD"},"customer": {"contactMethods": [{"type": "email",}],"notificationLanguage": "en"},"bankAccount": {"type": "ach","secCode": "web","accountType": "checking","nameOnAccount": "Sarah Hazel Hopper","accountNumber": "****7890","routingNumber": "*****6789"},"transactionResult": {"type": "unreferencedRefund","status": "ready","authorizedAmount": -4999,"currency": "USD","responseCode": "A","responseMessage": "NoError","processorResponseCode": "0"},"customFields": [{"name": "yourCustomField","value": "abc123"}]}