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/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"},"channel":"web","refundMethod":{"type":"card","cardDetails":{"entryMethod":"keyed","keyedData":{"dataFormat":"plainText","device":{"type":"PAX_A920_PRO","serialNumber":"1850010868"},"expiryDate":"1225","cardNumber":"4539858876047062"}}}}'
application/json
{"refundId": "CD3HN88U9F","processingTerminalId": "1234001","order": {"orderId": "OrderRef6543","dateTime": "2024-07-02T15:30:00Z","description": "Refund for order OrderRef6543","amount": 4999,"currency": "USD"},"card": {"type": "Visa Credit","entryMethod": "keyed","cardNumber": "453985******7062","expiryDate": "1225"},"transactionResult": {"type": "refund","status": "ready","approvalCode": "000000","authorizedAmount": -4999,"currency": "USD","responseCode": "A","responseMessage": "OK5"}}