Get transaction details

Get transaction details

Aspects to consider

If you want to use this service, you would have consider following aspects:
  1. Use the service on the endpoint:
    1. Sandbox: https://sandbox-merchant.greenpay.me/transactions/get
    2. Production: https://merchant.greenpay.me/transactions/get

Step for using the service

1. Data structure

In order to consume the service, a POST must be run with the following structure.

{
"merchantId": "{{merchantId}}",
"orderReference": "{{orderReference}}"
}


The following data are required:
  1. merchantId: Is an ID given by GreePay for you commerce.
  2. orderReference: It is the Order Reference of the transaction you want to search.

2. Execute POST for get transaction

An HTTP POST type request must be sent to the transaction list endpoint, with the json object that contains the transaction data.
Once the request has been sent and it has been made successfully made, an object of type JSON is obtained as a response.
On receiving this response, the parameter to be obtained from the JSON object is "body", since it contains the result of the reversal. The following image shows an example of the response received after submitting a request:

2.1 Success case of using the get details service

The following example shows the success response in JSON format:
Example 1. Success

{
"code": 200,
"status": "SUCCESS",
"result": {
"amount": "1.50",
"authorizer": "bncr",
"date": "2020-10-10T00:18:15.407164",
"merchant": "AllTerminals-3daf-BNCR-USD",
"referenceNumber": "2020100918181597aba4e56330cfdcd6d060f7b4",
"state": "approved",
"retrievalNumber": "701016540713",
"authorizationID": "533793",
"currency": "USD",
"creditCardBin": "424242",
"cardNumber": "4242",
"description": "Membership of ..",
"source": "on_demand",
"kount": {
"score": "46",
"country": "CR",
"response": "A",
"mobile": "N"
}
},
"errors": []
}


2.2. Error case of using the get details service

Example 3. Transaction does not exist

{
"code": 404,
"status": "FAIL",
"errors": [
"Error: Transaction not found"
]
}




    • Related Articles

    • Refund transaction

      Aspects to consider If you want to use this service, you would have consider following aspects: Use the service on endpoint: Sandbox: https://sandbox-merchant.greenpay.me/transactions/refund ...
    • Void or cancel transaction

      Aspects to consider If you want to use this service, you would have consider following aspects:: Use the service on the endpoint:  Sandbox: https://sandbox-merchant.greenpay.me/transactions/void ...
    • Get responses on a webhook

      1. Description If the merchant requires receiving the payments responses or card tokenization response in a backend, either to update orders, information or only store the response in the database as a backup, then they have to enable a webhook. A ...
    • Create tokenization order

      To consider A tokenization order is created to prepare the Greenpay API for create a token from credit or debit card data. The following aspects have to be consider for it: Use these endpoints: Sandbox: https://sandbox-merchant.greenpay.me/tokenize ...
    • Widget payment process

      To consider Para utilizar el widget de pago de Greenpay, se debe considerar los siguiente: You must have a sandbox or production account, to obtain a sandbox account visit About sandbox or test account. The payment widget is a web element that can be ...