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>"
Parameter | Type | Required? | Description |
---|---|---|---|
processingTerminalId | string | Yes | Unique identifier that we assigned to the terminal. |
singleUseToken | string | Yes | Unique token that the gateway assigned to the payment details. |
string | Yes | Cardholder’s email address. | |
amount | number <double> | Yes | Total amount of the transaction, which includes surcharges. The value is in the currency’s lowest denomination, for example, cents. |
currency | string | Yes | ISO-4217 currency code of the transaction. |
orderId | string | Yes | Unique identifier that the merchant assigns to the order. |
cardholderChallenge | string | No | Indicates if the merchant wants the issuing bank to challenge the cardholder. Send one of the following values: • REQUIRED - Merchant wants the issuing bank to challenge the cardholder. • OPTIONAL - Issuing bank decides whether to challenge the cardholder. |
https://payments.payroc.com/merchant/mpi?processingTerminalId=4479001&amount=100¤cy=EUR&orderId=25&email=joe%40adomain.com&singleUseToken=1a8731f50b02e287ac0529fbce352317c089d4adc1178c1867d65114078791d3c3e13962cbab6b574769dfe9ad5397a5aa67a529ceb0b7be17751f076bbe0e4d
Field | Description |
---|---|
result | Indicates the result of the 3-D Secure check. We return one of the following values: • A - The issuing bank approved the transaction. • D - The issuing bank declined the transaction. |
mpiReference | MPI reference of the 3-D Secure check. |
orderId | Unique identifier that the merchant assigned to the order. |
status | Status of the 3-D Secure check. We return one of the following values: • A - Issuing bank attempted to authenticate the cardholder’s identity. • N - Issuing bank didn’t attempt to authenticate the cardholder’s identity. • U - Issuing bank was unable to authenticate the cardholder’s identity. • Y - Issuing bank authenticated the cardholder’s identity. |
eci | Response code from 3-D Secure. We return one of the following values: • 05 - Issuing bank used 3-D Secure to authenticate the cardholder. • 06 - Issuing bank or cardholder is not enrolled for 3D Secure. • 07 - 3-D Secure check failed. |
https://{MPI_RECEIPT_URL}?result=A&status=A&eci=06&mpiReference=d01656cf0ec3e62e3754&orderId=25
curl --request post \--url https://api.payroc.com/v1/payments \--header 'Authorization: Bearer <access token>' \--header 'Content-Type: application/json' \--header 'Idempotency-Key: 8e03978e-40d5-43e8-bc93-6894a57f9324' \--data '{"channel":"web","processingTerminalId":"1234001","operator":"Postman","order":{"orderId":"OrderRef6543","description":"Large Pepperoni Pizza","currency":"USD","amount":4999},"customer":{"firstName":"Sarah","lastName":"Hopper","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"}}},"paymentMethod":{"type":"card","cardDetails":{"entryMethod":"keyed","keyedData":{"dataFormat":"plainText","device":{"model":"paxA80","serialNumber":"WPC202833004712"},"expiryDate":"1225","cardNumber":"4539858876047062"}}},"customFields":[{"name":"yourCustomField","value":"abc123"}]}'
application/json
{"paymentId": "M2MJOG6O2Y","processingTerminalId": "1234001","operator": "Postman","order": {"orderId": "OrderRef6543","dateTime": "2024-07-02T15:30:00Z","description": "Large Pepperoni Pizza","amount": 4999,"currency": "USD"},"customer": {"firstName": "Sarah","lastName": "Hopper","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"}}},"card": {"type": "MasterCard","entryMethod": "keyed","cardNumber": "453985******7062","expiryDate": "1225","securityChecks": {"cvvResult": "M","avsResult": "Y"}},"supportedOperations": ["capture","fullyReverse","partiallyReverse","incrementAuthorization","adjustTip","setAsPending"],"transactionResult": {"type": "sale","status": "ready","approvalCode": "OK3","authorizedAmount": 4999,"currency": "USD","responseCode": "A","responseMessage": "OK3"},"customFields": [{"name": "yourCustomField","value": "abc123"}]}