Follow

How can I get all details of a transaction via the API?

You can get all information about a transaction by doing an HTTP GET on a CHARGE object using its ID (which you got in the initial reply and notification) and an enterprise API level.

For example:

  • URL: https://api.live.oscato.com/api/charges/54aea18ee4b005fbaf09f5f3c
  • Method: GET
  • Basic Authentication:
    • Login Name: UBUY/BBtXa7yubR8ipuT
    • Password: [remains empty]

Example response:

{
  "links": {
    "self": "https://api.live.oscato.com/api/charges/54aea18ee4b005fbaf09f5f3c",
    "payout": "https://api.live.oscato.com/opg/api/charges/54aea18ee4b005fbaf09f5f3c/payout"
  },
  "timestamp": "2015-01-08T15:26:51.822+0000",
  "operation": "CHARGE",
  "resultCode": "00000.WIRECARD.0",
  "resultInfo": "Approved",
  "status": {
    "code": "charged",
    "reason": "debited"
  },
  "interaction": {
    "code": "PROCEED",
    "reason": "OK"
  },
  "clearing": {
    "amount": 19.99,
    "currency": "EUR"
  },
  "identification": {
    "longId": "54aea18ee4b005fbaf09f5f3c",
    "transactionId": "tr101",
    "providerId": "C960435142073077787970"
  },
  "redirect": {
    "url": "https://my.ubuy.com/shop/success.html",
    "method": "GET",
    "parameters": [
      {
        "name": "interactionCode",
        "value": "PROCEED"
      },
      {
        "name": "transactionId",
        "value": "tr101"
      },
      {
        "name": "interactionReason",
        "value": "OK"
      },
      {
        "name": "longId",
        "value": "54aea18ee4b005fbaf09f5f3c"
      },
      {
        "name": "shortId",
        "value": "07342-20357"
      },
      {
        "name": "resultCode",
        "value": "00000.WIRECARD.0"
      },
      {
        "name": "currency",
        "value": "EUR"
      },
      {
        "name": "amount",
        "value": "19.99"
      }
    ]
  },
  "customer": {
    "number": "42",
    "email": "walter.smith@example.com"
  }
}
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments