Transaction by transaction ID
Endpoint Info
METHOD | URL |
---|---|
GET | /transactions/{transactionId} |
EXAMPLE | https://test.api.macropay.com/v2/transactions/{transactionId} |
Overview
Returns all the information available for a given transaction ID. 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 Transaction ID
HTTP CODE | DESCRIPTION |
---|---|
200 | The order ID and a list containing the requested transaction are provided in the body in JSON format. |
Success Response Example - Retrieve Successful Transaction by Transaction ID
{
"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",
"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"
}
}
},
"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
}
Success Response Example - Retrieve Failed Transaction by Transaction ID
{
"transactionId": "5fbd732e-7c72-49cb-afc4-55d7f65cd824",
"mid": {
"id": "b29afeb0-5880-44d6-aff0-995fb1467a3c",
"providerApi": "worldpay",
"paymentSolution": "solutionWorldPay"
},
"error": {
"code": "0205",
"message": "Restricted Card"
},
"transactionType": "payment",
"transactionStatus": "failed",
"creationDate": "2024-04-15T07:50:19.040Z",
"modifiedDate": "2024-04-15T07:50:31.895Z",
"order": {
"orderId": "b1555054-9f2f-4c0d-b410-5d6099bae13d",
"creationDate": "2024-04-15T07:50:11.048Z",
"merchantId": "ea9b1ac4-b398-4432-9860-be1aaaeb67c2",
"money": {
"amount": 9.98,
"currency": "EUR"
},
"description": "Simple payment with mockacquirer",
"concept": "test"",
"notificationUrl": "https://5dcb-54-73-197-22.eu.ngrok.io/notification",
"redirectUrl": {
"success": "https://aae8-54-73-197-22.ngrok-free.app/success?text=123456",
"fail": "https://aae8-54-73-197-22.ngrok-free.app/failed",
"threeDSChallengeResult": "https://aae8-54-73-197-22.ngrok-free.app/challenge"
},
"userInformation": {
"ip": "62.57.181.213",
"email": "TEST+12@mockacquirer.es",
"country": "ES",
"language": "ES"
},
"generateToken": true,
"domain": "HTTPS://WWW.QA_MOCKACQUIRER.COM",
"paymentDetails": {
"type": "credit_card_present"
},
"customTag": "QA_MOCKACQUIRER",
"threeDSSupport": "no_3ds"
},
"paymentInfo": {
"paymentInfoCreditCard": {
"cardHolder": "MockAcquirer Test",
"cardNumber": "400000******0010",
"expireDate": {
"expireYear": "2025",
"expireMonth": "05"
},
"binInfo": {
"cardBrand": "visa",
"cardType": "credit",
"country": "US",
"cardSegment": "consumer",
"bankInfo": {
"bank": "Intl Hdqtrs-Center Owned"
}
}
},
"paymentMethod": "credit_card_ciphered_data",
"isFallback": false,
"is3ds": false
},
"version": 2
}
Error Responses - Retrieve Transaction by Transaction ID
HTTP CODE | ERROR CODE | ERROR MESSAGE | DESCRIPTION |
---|---|---|---|
400 | 0905 | Problem Parsing Request | The request syntax is incorrect. |
400 | 0300 | Invalid Request | The request body does not match the JSON schema or the transaction ID is not an UUID. |
400 | 0108 | Transaction Not Found | The transaction ID does not exist. |
403 | - | User is not authorized to access this resource with an explicit deny | Requester is not authorized to access to this resource |
500 | 0900 | Internal Server Error | The server experienced an unexpected error. |
Error Response Example - Retrieve Transaction by Transaction ID
{
"error": {
"code": "0108",
"message": "Transaction Not Found"
}
}