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/processing-terminals/1234001/payment-plans \--header 'Authorization: Bearer <access token>' \--header 'Content-Type: application/json' \--header 'Idempotency-Key: 8e03978e-40d5-43e8-bc93-6894a57f9324' \--data '{"paymentPlanId":"PlanRef8765","name":"Premium Club","description":"Monthly Premium Club subscription","currency":"USD","setupOrder":{"amount":4999,"description":"Initial setup fee for Premium Club subscription","breakdown":{"subtotal":4347,"taxes":[{"name":"Sales Tax","rate":5}]}},"recurringOrder":{"amount":4999,"description":"Monthly Premium Club subscription","breakdown":{"subtotal":4347,"taxes":[{"name":"Sales Tax","rate":5}]}},"length":12,"type":"automatic","frequency":"monthly","onUpdate":"continue","onDelete":"complete","customFieldNames":["yourCustomField"]}'
application/json
{"paymentPlanId": "PlanRef8765","processingTerminalId": "1234001","name": "Premium Club","description": "Monthly Premium Club subscription","currency": "USD","setupOrder": {"amount": 4999,"description": "Initial setup fee for Premium Club subscription","breakdown": {"subtotal": 4347,"taxes": [{"name": "Sales Tax","rate": 5}]}},"recurringOrder": {"amount": 4999,"description": "Monthly Premium Club subscription","breakdown": {"subtotal": 4347,"taxes": [{"name": "Sales Tax","rate": 5}]}},"length": 12,"type": "automatic","frequency": "monthly","onUpdate": "continue","onDelete": "complete","customFieldNames": ["yourCustomField"]}
curl --request post \--url https://api.payroc.com/v1/processing-terminals/1234001/secure-tokens \--header 'Authorization: Bearer <access token>' \--header 'Content-Type: application/json' \--header 'Idempotency-Key: 8e03978e-40d5-43e8-bc93-6894a57f9324' \--data '{"operator":"Jane","mitAgreement":"unscheduled","customer":{"firstName":"Sarah","lastName":"Hopper","dateOfBirth":"1990-07-15","referenceNumber":"Customer-12","billingAddress":{"address1":"1 Example Ave.","address2":"Example Address Line 2","address3":"Example Address Line 3","city":"Chicago","state":"Illinois","country":"US","postalCode":"60056"},"shippingAddress":{"recipientName":"Sarah Hopper","address":{"address1":"1 Example Ave.","address2":"Example Address Line 2","address3":"Example Address Line 3","city":"Chicago","state":"Illinois","country":"US","postalCode":"60056"}},"contactMethods":[{"type":"email","value":"[email protected]"}],"notificationLanguage":"en"},"ipAddress":{"type":"ipv4","value":"104.18.24.203"},"source":{"type":"card","cardDetails":{"entryMethod":"keyed","cardholderName":"Sarah Hazel Hopper","keyedData":{"dataFormat":"plainText","cardNumber":"4539858876047062","expiryDate":"1225","cvv":"234"}}},"customFields":[{"name":"yourCustomField","value":"abc123"}]}'
application/json
{"secureTokenId": "MREF_abc1de23-f4a5-6789-bcd0-12e345678901fa","processingTerminalId": "1234001","mitAgreement": "unscheduled","customer": {"firstName": "Sarah","lastName": "Hopper","dateOfBirth": "1990-07-15","referenceNumber": "Customer-12","billingAddress": {"address1": "1 Example Ave.","address2": "Example Address Line 2","address3": "Example Address Line 3","city": "Chicago","state": "Illinois","country": "US","postalCode": "60056"},"shippingAddress": {"recipientName": "Sarah Hopper","address": {"address1": "1 Example Ave.","address2": "Example Address Line 2","address3": "Example Address Line 3","city": "Chicago","state": "Illinois","country": "US","postalCode": "60056"}},"contactMethods": [{"type": "email",}],"notificationLanguage": "en"},"source": {"type": "card","cardholderName": "Sarah Hazel Hopper","cardNumber": "453985******7062","expiryDate": "1225"},"token": "296753123456","status": "notValidated","customFields": [{"name": "yourCustomField","value": "abc123"}]}
curl --request post \--url https://api.payroc.com/v1/processing-terminals/1234001/subscriptions \--header 'Authorization: Bearer <access token>' \--header 'Content-Type: application/json' \--header 'Idempotency-Key: 8e03978e-40d5-43e8-bc93-6894a57f9324' \--data '{"subscriptionId":"SubRef7654","paymentPlanId":"PlanRef8765","paymentMethod":{"type":"secureToken","token":"296753123456"},"name":"Premium Club","description":"Premium Club subscription","setupOrder":{"amount":4999,"description":"Initial setup fee for Premium Club subscription","breakdown":{"subtotal":4347,"taxes":[{"name":"Sales Tax","rate":5}]},"orderId":"OrderRef6543"},"recurringOrder":{"amount":4999,"description":"Monthly Premium Club subscription","breakdown":{"subtotal":4347,"taxes":[{"name":"Sales Tax","rate":5}]}},"startDate":"2024-07-02","endDate":"2025-07-01","length":12,"pauseCollectionFor":0,"customFields":[{"name":"yourCustomField","value":"abc123"}]}'
application/json
{"subscriptionId": "SubRef7654","processingTerminalId": "1234001","paymentPlan": {"paymentPlanId": "PlanRef8765","name": "Monthly Premium Club subscription","link": {"rel": "self","method": "GET","href": "https://api.payroc.com/v1/processing-terminals/1234001/payment-plans/PlanRef8765"}},"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"}},"name": "Premium Club","description": "Premium Club subscription","currency": "USD","setupOrder": {"orderId": "OrderRef6543","amount": 4999,"description": "Initial setup fee for Premium Club subscription","breakdown": {"subtotal": 4347,"taxes": [{"name": "Sales Tax","rate": 5}],"surcharge": {"amount": 217,"percentage": 5}}},"recurringOrder": {"amount": 4999,"description": "Premium Club subscription","breakdown": {"subtotal": 4347,"taxes": [{"name": "Sales Tax","rate": 5}],"surcharge": {"amount": 217,"percentage": 5}}},"currentState": {"status": "active","nextDueDate": "2024-08-02","paidInvoices": 0,"outstandingInvoices": 3},"startDate": "2024-07-02","endDate": "2025-07-01","length": 12,"type": "automatic","frequency": "monthly","pauseCollectionFor": 0,"customFields": [{"name": "yourCustomField","value": "abc123"}]}
curl --request post \--url https://api.payroc.com/v1/processing-terminals/1234001/subscriptions/SubRef7654/pay \--header 'Authorization: Bearer <access token>' \--header 'Content-Type: application/json' \--header 'Idempotency-Key: 8e03978e-40d5-43e8-bc93-6894a57f9324' \--data '{"operator":"Jane","order":{"amount":4999,"description":"Monthly Premium Club subscription","breakdown":{"subtotal":4999,"taxes":[{"name":"Sales Tax","rate":5}]},"orderId":"OrderRef6543"},"customFields":[{"name":"yourCustomField","value":"abc123"}]}'
application/json
{"subscriptionId": "SubRef7654","processingTerminalId": "1234001","payment": {"paymentId": "M2MJOG6O2Y","dateTime": "2024-07-02T15:30:00Z","amount": 4999,"currency": "USD","status": "ready","responseCode": "A","link": {"rel": "self","method": "GET","href": "https://api.payroc.com/v1/bank-transfer-payments/M2MJOG6O2Y"}},"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"}},"currentState": {"status": "active","nextDueDate": "2024-08-02","paidInvoices": 1,"outstandingInvoices": 2},"customFields": [{"name": "yourCustomField","value": "abc123"}]}
{"paymentPlanId": "PaymentPlanTest","processingTerminalId": "3204001","name": "Davi Crisostomo","description": "Payment Plan creation","currency": "USD","setupOrder": {"amount": 11000,"description": "Setup Amount"},"length": 24,"type": "manual","frequency": "monthly","onUpdate": "update","onDelete": "complete"}
{"secureTokenId": "MREF_1a93f3a6-9029-419f-9e87-3e2db6f0ae85uA","processingTerminalId": "3204001","source": {"type": "card","cardholderName": "","cardNumber": "444433******1111","expiryDate": "1226"},"token": "2967538502417872","status": "cvv_validated"}
{"subscriptionId": "SubTest","processingTerminalId": "3204001","paymentPlan": {"paymentPlanId": "PaymentPlanTest","name": "Davi Crisostomo","link": {"rel": "self","method": "GET","href": "https://api.uat.payroc.com/v1/processing-terminals/3204001/payment-plans/PaymentPlanTest"}},"secureToken": {"secureTokenId": "MREF_1a93f3a6-9029-419f-9e87-3e2db6f0ae85uA","customerName": "","token": "2967538502417872","status": "cvv_validated","link": {"rel": "self","method": "GET","href": "https://api.uat.payroc.com/v1/processing-terminals/3204001/secure-tokens/MREF_1a93f3a6-9029-419f-9e87-3e2db6f0ae85uA"}},"name": "Davi Crisostomo","description": "Create Subscription from ICC payment","currency": "USD","setupOrder": {"orderId": "TheOrderID","amount": 11000,"description": "Desription of SETUPORDER"},"recurringOrder": {"amount": 11000,"description": "RECURRING Order price"},"currentState": {"status": "active","nextDueDate": "2023-08-02","paidInvoices": 0,"outstandingInvoices": 122},"startDate": "2023-08-02","endDate": "2025-12-02","length": 24,"type": "automatic","frequency": "weekly","pauseCollectionFor": 0}
{"paymentId": "KOHM1D3EZH","processingTerminalId": "3204001","operator": "Davi Crisostomo","order": {"orderId": "UniqueValueForOrderID","dateTime": "2023-06-20T20:25:57.641+01:00","description": "Subscription Payment - Manual","amount": 11000,"currency": "USD"},"card": {"type": "Visa Credit","entryMethod": "keyed","cardNumber": "444433******1111","expiryDate": "1226","secureToken": {"secureTokenId": "MREF_1a93f3a6-9029-419f-9e87-3e2db6f0ae85uA","customerName": "","token": "2967538502417872","status": "cvv_validated","link": {"rel": "self","method": "GET","href": "https://api.uat.payroc.com/v1/processing-terminals/3204001/secure-tokens/MREF_1a93f3a6-9029-419f-9e87-3e2db6f0ae85uA"}},"securityChecks": {"cvvResult": "M","avsResult": "Y"}},"transactionResult": {"type": "sale","status": "ready","approvalCode": "OK24225","authorizedAmount": 11000,"currency": "USD","responseCode": "A","responseMessage": "OK24225","cardSchemeReferenceId": "nkMX2G7ZqPavgbYiYacQ"}}