Skip to main content

Transaction by order ID

METHODURL
GET/transactions/orderId/{orderId}
EXAMPLEhttps://test.api.macropay.com/v2/transactions/orderId/{orderId}

Returns the order ID and a list of all transactions related to it, sorted by creation date. There is no need to provide a body for this request, and different fields will be provided in each case depending on the characteristics of the transaction (e. g. a 3DS transaction will include additional fields, refunds will hold the refunded amount and currency, etc.).

✅ SUCCESS RESPONSES - RETRIEVE TRANSACTION BY ORDER ID

HTTP CODEDESCRIPTION
200The order ID and a list containing all the related transactions are provided in the body in JSON format.

✅ SUCCESS RESPONSE EXAMPLE - RETRIEVE TRANSACTION BY ORDER ID

{
"orderId": "3fc80ba8-60aa-40fd-a0d2-92098b3f93d2",
"transactions": [
{
"transactionId": "bb250610-99c0-4091-b8d4-7eef818b026d",
"mid": {
"id": "b0895393-2834-45e1-b372-228fb3feb451",
"providerApi": "worldpay",
"paymentSolution": "solutionWorldPay"
},
"transactionType": "payment",
"transactionStatus": "success",
"creationDate": "2023-01-16T06:54:03.583Z",
"modifiedDate": "2023-01-16T06:55:03.085Z",
"order": {
"orderId": "3fc80ba8-60aa-40fd-a0d2-92098b3f93d2",
"creationDate": "2023-01-16T06:53:51.442Z",
"merchantId": "214fd405-1b72-4de8-9448-fc370743c9c0",
"money": {
"amount": 9.98,
"currency": "EUR"
},
"description": "entertainment subscription",
"concept": "test",
"redirectUrl": {
"success": "https://5dcb-54-73-197-22.eu.ngrok.io/success",
"fail": "https://5dcb-54-73-197-22.eu.ngrok.io/failed",
"threeDSChallengeResult": "https://5dcb-54-73-197-22.eu.ngrok.io/challenge"
},
"userInformation": {
"ip": "251.251.213.216",
"email": "test@worldpay.es",
"country": "ES",
"language": "ES",
"customerId": "89790",
"browserInformation": {
"userAgentHeader": "Mozilla/5.0",
"acceptHeader": "text/html",
"screenHeight": 640,
"screenColorDepth": 32,
"timeZone": 120,
"enableJava": false,
"windowSize": "20",
"fingerprint": "4sd54dfsafgsadf5"
},
"billingAddress": {
“name”: “Jonh Doe”,
"street": "Carrer de Barcelona",
"city": "Barcelona",
"country": "ES",
"state": "ES-CT",
"postcode": "08001"
}
},
"generateToken": true,
"domain": "HTTPS://WWW.QA_WORLDPAY.COM",
"paymentDetails": {
"type": "credit_card_present"
},
"customTag": "QA_WORLDPAY",
"threeDSSupport": "preferred_3ds",
"threeDSDetails": {
"cardHolderAccountInformation": {
"accountAge": "no_account",
"accountLastChangeDate": "2020-06-06",
"accountLastChangeAge": "no_account",
"accountDate": "2020-06-06",
"accountPasswordDate": "2021-05-01",
"accountPasswordAge": "less_one_month",
"accountPurchaseCount": 1,
"accountStoredCardAttempts": 1,
"accountDailyTransactions": 1,
"accountYearlyTransactions": 1,
"accountEnrollmentDate": "2020-06-06",
"accountEnrollmentAge": "no_account",
"accountShippingDate": "2020-06-06",
"accountShippingAge": "no_account",
"accountShippingEqual": "account_name_identical",
"accountSuspiciousActivity": "no_suspicious_activity_observed"
},
"merchantRiskIndicator": {
"deliveryEmailAddress": "qa@1eqa.net",
"deliveryTimeframe": "electronic_delivery",
"giftCardAmount": 199,
"giftCardCount": 1,
"giftCardCurrency": "USD",
"preOrderDate": "2020-06-06",
"preOrderAvailability": "merchandise_available",
"reorderItemsInd": "first_time_ordered",
"shippingIndicator": "ship_cardholders_billing_address"
},
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "login_using_fido_authenticator",
"threeDSReqAuthMethod": "login_using_own_credentials",
"threeDSReqAuthTimestamp": "2020-06-06T12:12:12Z"
},
"threeDSRequestorPriorTransactionAuthenticationInfo": {
"threeDSReqPriorAuthData": "testing",
"threeDSReqPriorAuthMethod": "other_issuer_method",
"threeDSReqPriorAuthTimestamp": "2020-06-06T12:12:12Z",
"threeDSReqPriorRef": "123456789012345678901234567890123456"
},
"acsRenderingType": {
"acsInterface": "native_ui",
"acsUiTemplate": "single_select"
},
"deviceRenderingOptionsSupported": {
"sdkInterface": "native",
"sdkUiType": "single_select"
}
}
},
"paymentInfo": {
"tokenId": "638087c9-8ef2-4884-b6df-d68aa22b971e",
"paymentInfoCreditCard": {
"cardHolder": "J. Shopper",
"cardNumber": "400000******0002",
"expireDate": {
"expireYear": "2034",
"expireMonth": "05"
},
"binInfo": {
"cardBrand": "visa",
"country": "US",
"bankInfo": {}
}
},
"paymentMethod": "credit_card_ciphered_data",
"force3ds": "no_3ds",
"isFallback": false
},
"version": 2
},
{
"transactionId": "4fa2dbac-df95-4e61-89fd-ae11bcf37a58",
"mid": {
"id": "b0895393-2834-45e1-b372-228fb3feb451",
"providerApi": "worldpay",
"paymentSolution": "solutionWorldPay"
},
"transactionType": "refund",
"transactionStatus": "in_process",
"refundAmount": {
"amount": 9.98,
"currency": "EUR"
},
"creationDate": "2023-01-16T07:06:16.399Z",
"modifiedDate": "2023-01-16T07:06:58.619Z",
"order": {
"orderId": "3fc80ba8-60aa-40fd-a0d2-92098b3f93d2",
"creationDate": "2023-01-16T06:53:51.442Z",
"merchantId": "214fd405-1b72-4de8-9448-fc370743c9c0",
"money": {
"amount": 9.98,
"currency": "EUR"
},
"description": "entertainment subscription",
"concept": "test"",
"notificationUrl": "https://5dcb-54-73-197-22.eu.ngrok.io/notification",
"redirectUrl": {
"success": "https://5dcb-54-73-197-22.eu.ngrok.io/success",
"fail": "https://5dcb-54-73-197-22.eu.ngrok.io/failed",
"threeDSChallengeResult": "https://5dcb-54-73-197-22.eu.ngrok.io/challenge"
},
"userInformation": {
"ip": "251.251.213.216",
"email": "test@worldpay.es",
"country": "ES",
"language": "ES",
"customerId": "89790",
"browserInformation": {
"userAgentHeader": "Mozilla/5.0",
"acceptHeader": "text/html",
"screenHeight": 640,
"screenColorDepth": 32,
"timeZone": 120,
"enableJava": false,
"windowSize": "20",
"fingerprint": "4sd54dfsafgsadf5"
},
"billingAddress": {
“name”: “Jonh Doe”,
"street": "Carrer de Barcelona",
"city": "Barcelona",
"country": "ES",
"state": "ES-CT",
"postcode": "08001"
}
},
"generateToken": true,
"domain": "HTTPS://WWW.QA_WORLDPAY.COM",
"paymentDetails": {
"type": "credit_card_present"
},
"customTag": "QA_WORLDPAY",
"threeDSSupport": "preferred_3ds",
"threeDSDetails": {
"cardHolderAccountInformation": {
"accountAge": "no_account",
"accountLastChangeDate": "2020-06-06",
"accountLastChangeAge": "no_account",
"accountDate": "2020-06-06",
"accountPasswordDate": "2021-05-01",
"accountPasswordAge": "less_one_month",
"accountPurchaseCount": 1,
"accountStoredCardAttempts": 1,
"accountDailyTransactions": 1,
"accountYearlyTransactions": 1,
"accountEnrollmentDate": "2020-06-06",
"accountEnrollmentAge": "no_account",
"accountShippingDate": "2020-06-06",
"accountShippingAge": "no_account",
"accountShippingEqual": "account_name_identical",
"accountSuspiciousActivity": "no_suspicious_activity_observed"
},
"merchantRiskIndicator": {
"deliveryEmailAddress": "qa@1eqa.net",
"deliveryTimeframe": "electronic_delivery",
"giftCardAmount": 199,
"giftCardCount": 1,
"giftCardCurrency": "USD",
"preOrderDate": "2020-06-06",
"preOrderAvailability": "merchandise_available",
"reorderItemsInd": "first_time_ordered",
"shippingIndicator": "ship_cardholders_billing_address"
},
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "login_using_fido_authenticator",
"threeDSReqAuthMethod": "login_using_own_credentials",
"threeDSReqAuthTimestamp": "2020-06-06T12:12:12Z"
},
"threeDSRequestorPriorTransactionAuthenticationInfo": {
"threeDSReqPriorAuthData": "testing",
"threeDSReqPriorAuthMethod": "other_issuer_method",
"threeDSReqPriorAuthTimestamp": "2020-06-06T12:12:12Z",
"threeDSReqPriorRef": "123456789012345678901234567890123456"
},
"acsRenderingType": {
"acsInterface": "native_ui",
"acsUiTemplate": "single_select"
},
"deviceRenderingOptionsSupported": {
"sdkInterface": "native",
"sdkUiType": "single_select"
}
}
},
"version": 2
}
]
}

❌ ERROR RESPONSES - RETRIEVE TRANSACTION BY ORDER ID

HTTP CODEERROR CODEERROR MESSAGEDESCRIPTION
4000905Problem Parsing RequestThe request syntax is incorrect.
4000300Invalid RequestThe request body does not match the JSON schema or the order ID is not an UUID.
4000108Transaction Not FoundThe order ID has no related transactions.
403-User is not authorized to access this resource with an explicit denyRequester is not authorized to access to this resource
5000900Internal Server ErrorThe server experienced an unexpected error.

❌ ERROR RESPONSE EXAMPLE - RETRIEVE TRANSACTION BY ORDER ID

{
"error": {
"code": "0108",
"message": "Transaction Not Found"
}
}