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: abc123' \--data '{"processingTerminalId":"1023","order":{"orderId":"1023_refund_oa8","description":"refund example","amount":1000,"currency":"USD"},"channel":"web","refundMethod":{"type":"card","cardDetails":{"entryMethod":"keyed","keyedData":{"dataFormat":"plainText","device":{"type":"DATECS_BLUEPAD50","serialNumber":"WPC202833004712"},"expiryDate":"0328","cardNumber":"5001650000000000"}}}}'
application/json
{"refundId": "CD3HN88U9F","processingTerminalId": "1023","order": {"orderId": "1023_refund_oa8","dateTime": "2023-07-27T08:51:02.910Z","description": "refund example","amount": 1000,"currency": "USD"},"card": {"type": "MasterCard","entryMethod": "keyed","cardNumber": "500165******0000","expiryDate": "0328"},"transactionResult": {"type": "refund","status": "ready","approvalCode": "000000","authorizedAmount": -1000,"currency": "USD","responseCode": "A","responseMessage": "OK5"}}