# Get Transaction

You can use this call to retrieve details of a Bancontact transaction.

## Prerequisite

Get an `access_token` and use it as 'Bearer' token in your request. Find more details [here](authorization-3).

## Request

```text
GET https://api.pay.cm.com/api/v1/paymentmethods/bancontact/v1/transactions/{transactionId}
```

## Response

```json
{
  "id": "8db1e7fa-ba8a-4189-92fd-67a20217443d",
  "orderId": "8db1e7fa-ba8a-4189-92fd-67a20217443d",
  "reference": "20210623130413",
  "amount": 1200,
  "currency": "EUR",
  "description": "Order at yourdomain.tld",
  "expiresAt": "2006-01-02T15:04:05Z",
  "language": "nl",
  "country": "BE",
  "webhooks": [
    {
      "url": "https://yourdomain.tld/order-webhooks?purchaseId=order123",
      "events": [
        "FINALSTATUS"
      ]
    },
    {
      "url": "https://yourdomain.tld/payment-webhooks?purchaseId=order123",
      "events": [
        "REFUND_STATUS"
      ]
    },
    {
      "url": "https://yourdomain.tld/payment-webhooks?purchaseId=order123",
      "events": [
        "STATUS_CHANGE"
      ]
    }
  ],
  "status": "OPEN",
  "action": {
    "qrcode": {
      "url": "https://qrbackend.tld/images/213981209381209390821.png"
    },
    "intent": {
      "url": "https://docdata.tld/pay?order=123"
    },
    "redirect": {
      "url": "https://checkout.tld/3ds/bancontact/v1/123"
    }
  },
  "createdAt": "2006-01-02T15:04:05Z",
  "refunds": {
    "refundedAmount": 300,
    "refundedPendingAmount": 100
  },
  "returnUrls": {
    "success": "https://yourdomain.tld/order/payment-success.html",
    "cancelled": "https://yourdomain.tld/order/payment-cancelled.html",
    "expired": "https://yourdomain.tld/order/payment-expired.html",
    "failed": "https://yourdomain.tld/order/payment-failed.html"
  }
}
```

## Parameters

[block:parameters]
{
  "data": {
    "h-0": "Parameter",
    "h-1": "Type",
    "h-2": "Description",
    "h-3": "Constraints",
    "0-0": "id",
    "0-1": "String(36)",
    "0-2": "Transaction unique identifier.",
    "0-3": "",
    "1-0": "orderId",
    "1-1": "String(36)",
    "1-2": "Unique identifier.",
    "1-3": "",
    "2-0": "reference",
    "2-1": "String(1...255)",
    "2-2": "An identifier specified by you. If webhooks were specified in the request this identifier is added to the webhook request payload.",
    "2-3": "",
    "3-0": "amount",
    "3-1": "Int(1...99999999)",
    "3-2": "Integer representing the amount of the checkout. Denomination in the smallest currency subunit (e.g. eurocents).",
    "3-3": "",
    "4-0": "currency",
    "4-1": "String (ISO 4217)",
    "4-2": "Currency code.",
    "4-3": "ISO 4217 currency code.",
    "5-0": "description",
    "5-1": "String(1...255)",
    "5-2": "Description of the transaction.",
    "5-3": "",
    "6-0": "expiresAt",
    "6-1": "String(RFC3339)",
    "6-2": "Expiration time.",
    "6-3": "",
    "7-0": "language",
    "7-1": "String(ISO 639-1)",
    "7-2": "Preferred language of the user interface.",
    "7-3": "",
    "8-0": "country",
    "8-1": "String",
    "8-2": "Country of the Customer.",
    "8-3": "ISO 3166 Country Code.",
    "9-0": "status",
    "9-1": "String",
    "9-2": "`OPEN` - Transaction has been created. This is the initial status.  \n`SUCCESS` - Transaction successfully paid.  \n`CANCELLED` - Transaction has been cancelled by your customers.  \n`EXPIRED` - Transaction has not succeeded; expired.  \n`FAILURE` - Transaction has not succeeded; unknown reason.",
    "9-3": "",
    "10-0": "action",
    "10-1": "[action](schemas-4#action)    Object",
    "10-2": "The next action to be performed by you for this transaction. If a transaction has been created (so not yet started) then `qrcode` action (which includes the URL of the Bancontact QR code image to be shown to your customer),  and `intent` action (which includes the intent URL to be shared with your customer) will appear as possible actions. If the transaction has been successfully started using `/paymentmethods/bancontact/v1/transactions/{transactionId}/start` then only  `redirect` action will appear. ",
    "10-3": "This parameter is nullable, and it is only available while the transaction is `OPEN`.",
    "11-0": "createdAt",
    "11-1": "String(RFC3339)",
    "11-2": "Creation time.",
    "11-3": "ISO 8601 date and time.",
    "12-0": "returnUrl",
    "12-1": "String(2000)",
    "12-2": "Specifies the URL where your customers will be redirected to.",
    "12-3": "Either `returnUrl` or `returnUrls` must be specified, but not both.",
    "13-0": "returnUrls",
    "13-1": "[returnUrls](schemas-4#returnurls)   Object",
    "13-2": "Specifies a URL where your customers will be redirected to per transaction status. For example, your customers will be redirected to `returnUrls.success` when the status of the transaction changes to `SUCCESS`.",
    "13-3": "Either `returnUrl` or `returnUrls` must be specified, but not both."
  },
  "cols": 4,
  "rows": 14,
  "align": [
    "left",
    "left",
    "left",
    "left"
  ]
}
[/block]

## Optional parameters

| Parameter | Type                                 | Description                                                        | Constraints                           |
| :-------- | :----------------------------------- | :----------------------------------------------------------------- | :------------------------------------ |
| webhooks  | Array of objects                     | Webhooks enable receiving a web request once a given event occurs. | Find more details [here](webhooks-1). |
| refunds   | [refund](schemas-4#refund)    Object | Indicates refundedAmount and refundedPendingAmount.                |                                       |

## Response codes

| HTTP status | Description                                                                                                                                                                                                                                      |
| :---------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 200         | Transaction details are successfully retrieved.                                                                                                                                                                                                  |
| 4XX         | Client error response (See message for details). This response is given when the User input was incorrect or something illegal was attempted (eg. using a service without having that service configured for the user, or not being authorized). |
| 5XX         | Server error response (See message for details).                                                                                                                                                                                                 |