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/abc123/payment-plans \--header 'Authorization: Bearer <access token>' \--header 'Content-Type: application/json' \--header 'Idempotency-Key: abc123' \--data '{"paymentPlanId":"1001_yearly_plan","name":"1001 yearly payment plan","description":"1001 yearly payment plan","currency":"EUR","setupOrder":{"amount":1010,"description":"payment plan setup order","breakdown":{"subtotal":1000,"taxes":[{"name":"VAT","rate":1}]}},"recurringOrder":{"amount":1010,"description":"payment plan setup order","breakdown":{"subtotal":1000,"taxes":[{"name":"VAT","rate":1}]}},"length":5,"type":"automatic","frequency":"yearly","onUpdate":"continue","onDelete":"complete"}'
application/json
{"paymentPlanId": "1001_yearly_plan","processingTerminalId": "1001","name": "1001 yearly payment plan","description": "1001 yearly payment plan","currency": "EUR","setupOrder": {"amount": 1010,"description": "payment plan setup order","breakdown": {"subtotal": 1000,"taxes": [{"name": "VAT","rate": 1}]}},"recurringOrder": {"amount": 1010,"description": "payment plan recurring order","breakdown": {"subtotal": 1000,"taxes": [{"name": "VAT","rate": 1}]}},"length": 5,"type": "automatic","frequency": "yearly","onUpdate": "continue","onDelete": "complete"}
curl --request post \--url https://api.payroc.com/v1/processing-terminals/abc123/secure-tokens \--header 'Authorization: Bearer <access token>' \--header 'Content-Type: application/json' \--header 'Idempotency-Key: abc123' \--data '{"operator":"Adam Smith","mitAgreement":"unscheduled","customer":{"firstName":"Jessica","lastName":"Red","dateOfBirth":"1990-01-01","referenceNumber":"Customer-12","billingAddress":{"address1":"Example Street","address2":"Example address2","address3":"Example address3","city":"Fresno","state":"California","country":"US","postalCode":93650},"shippingAddress":{"recipientName":"Example shipping recipientName","address":{"address1":"Example shipping street","address2":"Example shipping address2","address3":"Exampleshipping address3","city":"Austin","state":"Texas","country":"US","postalCode":73301}},"contactMethods":[{"type":"email","value":"[email protected]"}],"notificationLanguage":"en"},"ipAddress":{"type":"ipv4","value":"124.201.101.1"},"source":{"type":"card","cardDetails":{"entryMethod":"keyed","cardholderName":"Joe Bloggs","keyedData":{"dataFormat":"plainText","cardNumber":"4001020000000009","expiryDate":"0825","cvv":"713"}}}}'
application/json
{"secureTokenId": "MREF_fce7bf52-b3b4-4270-aee9-77b938595078Hm","processingTerminalId": "1001","mitAgreement": "unscheduled","customer": {"firstName": "Joe","lastName": "Bloggs","dateOfBirth": "1950-01-01","referenceNumber": "Customer-1","billingAddress": {"address1": "Example Street","address2": "Example address2","address3": "Example address3","city": "Example Town","state": "California","country": "US","postalCode": "1234"},"shippingAddress": {"recipientName": "Example shipping recipientName","address": {"address1": "Example shipping street","address2": "Example shipping address2","address3": "Exampleshipping address3","city": "Example shipping city","state": "Texas","country": "US","postalCode": "1"}},"contactMethods": [{"type": "email",}],"notificationLanguage": "en"},"source": {"type": "card","cardholderName": "Joe Bloggs","cardNumber": "400102******0009","expiryDate": "0825"},"token": "2967532489076298","status": "notValidated"}
curl --request post \--url https://api.payroc.com/v1/processing-terminals/abc123/subscriptions \--header 'Authorization: Bearer <access token>' \--header 'Content-Type: application/json' \--header 'Idempotency-Key: abc123' \--data '{"subscriptionId":"11001_subscription_cinema","paymentPlanId":"1001_payment_plan_yearly","paymentMethod":{"type":"secureToken","token":"2967533500670317"},"name":"subscription from postman","description":"created through postman for card token","setupOrder":{"amount":1010,"description":"setup order","breakdown":{"subtotal":1000,"taxes":[{"name":"VAT","rate":1}]},"orderId":"setup order"},"recurringOrder":{"amount":1010,"description":"recurring order","breakdown":{"subtotal":1000,"taxes":[{"name":"VAT","rate":1}]}},"startDate":"2023-07-01T00:00:00.000Z","endDate":"2025-07-01T00:00:00.000Z","length":2,"pauseCollectionFor":0}'
application/json
{"subscriptionId": "1001_subscription_cinema","processingTerminalId": "1001","paymentPlan": {"paymentPlanId": "1001_paymentplan_yearly","name": "yearly payment plan","link": {"rel": "self","method": "GET","href": "https://api.payroc.com/v1/processing-terminals/1001/payment-plans/1001_paymentplan_yearly"}},"secureToken": {"secureTokenId": "SecureCard1001","customerName": "Joe Bloggs","token": "2967533500670317","status": "notValidated","link": {"rel": "self","method": "GET","href": "https://api.payroc.com/v1/processing-terminals/1001/secure-tokens/SecureCard1001"}},"name": "avant-garde","description": "avant-garde cinema subscription","currency": "EUR","setupOrder": {"orderId": "setup-order","amount": 1010,"description": "setup order","breakdown": {"subtotal": 1000,"taxes": [{"name": "VAT","rate": 1}]}},"recurringOrder": {"amount": 1010,"description": "recurring order","breakdown": {"subtotal": 1000,"taxes": [{"name": "VAT","rate": 1}]}},"currentState": {"status": "active","nextDueDate": "2023-04-25T00:00:00.000Z","paidInvoices": 0,"outstandingInvoices": 3},"startDate": "2023-04-25T00:00:00.000Z","endDate": "2025-04-25T00:00:00.000Z","length": 24,"type": "automatic","frequency": "yearly","pauseCollectionFor": 0}
curl --request post \--url https://api.payroc.com/v1/processing-terminals/abc123/subscriptions/abc123/pay \--header 'Authorization: Bearer <access token>' \--header 'Content-Type: application/json' \--header 'Idempotency-Key: abc123' \--data '{"operator":"Giuseppe Green","order":{"amount":1010,"description":"manual payment","breakdown":{"subtotal":1000,"taxes":[{"name":"VAT","rate":1}]},"orderId":"manual payment orderx12s"}}'
application/json
{"subscriptionId": "1017_subscription_metro","processingTerminalId": "1017","payment": {"paymentId": "GTZH5WVXK9","dateTime": "2023-07-27T22:36:03.506Z","amount": 1010,"currency": "CAD","status": "ready","responseCode": "A","link": {"rel": "self","method": "GET","href": "https://api.payroc.com/v1/bank-transfer-payments/GTZH5WVXK9"}},"secureToken": {"secureTokenId": "MREF_465772d1-ab4e-4881-8052-5021a745ed18Df","customerName": "Joe Bloggs","token": "2967536686508441","status": "notValidated","link": {"rel": "self","method": "GET","href": "https://api.payroc.com/v1/processing-terminals/1017/secure-tokens/MREF_465772d1-ab4e-4881-8052-5021a745ed18Df"}},"currentState": {"status": "active","nextDueDate": "2024-07-01T00:00:00.000Z","paidInvoices": 1,"outstandingInvoices": 2}}
{"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"}}