# Get Payment

You can use this call to retrieve the details of a specific payment made with an iDEAL QR 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/idealqr/v1/transactions/{transactionId}/payments/{paymentId}
```

## Response

```json
{
  "payment": "433a3406-3460-4795-b7ed-b5b9ad1aa9bf",
  "transaction": "8db1e7fa-ba8a-4189-92fd-67a20217443d",
  "idealTransactionId": "1234567890123456",
  "status": "SUCCESS",
  "createdAt": "2006-01-02T15:04:05Z",
  "amount": 1200,
  "consumerName": "John",
  "consumerBic": "RABONL2U",
  "consumerIban": "NL24RABO8487376045",
  "refunds": {
    "refundedAmount": 300,
    "refundedPendingAmount": 100
  }
}
```

## Parameters

[block:parameters]
{
  "data": {
    "h-0": "Parameter",
    "h-1": "Type",
    "h-2": "Description",
    "h-3": "Constraints",
    "0-0": "payment",
    "0-1": "String(36)",
    "0-2": "Payment unique identifier.",
    "0-3": "",
    "1-0": "transaction",
    "1-1": "String(36)",
    "1-2": "Transaction unique identifier.",
    "1-3": "",
    "2-0": "idealTransactionId",
    "2-1": "String(16)",
    "2-2": "The 16-digit transaction ID within the iDEAL scheme as known by the  issuing bank. The value can have leading zeros.",
    "2-3": "",
    "3-0": "status",
    "3-1": "String",
    "3-2": "`OPEN` - Payment has been created. This is the initial status.  \n`SUCCESS` - Payment successfully paid.  \n`CANCELLED` - Payment has been cancelled by your customers.  \n`EXPIRED` - Payment has not succeeded; expired.  \n`FAILURE` - Payment has not succeeded; unknown reason.",
    "3-3": "",
    "4-0": "createdAt",
    "4-1": "String(RFC3339)",
    "4-2": "Creation time.",
    "4-3": "ISO 8601 date and time."
  },
  "cols": 4,
  "rows": 5,
  "align": [
    "left",
    "left",
    "left",
    "left"
  ]
}
[/block]

## Optional parameters

| Parameter    | Type                                 | Description                                                                                                     | Constraints                          |
| :----------- | :----------------------------------- | :-------------------------------------------------------------------------------------------------------------- | :----------------------------------- |
| amount       | Int(1...99999999)                    | Integer representing the amount of the payment. Denomination in the smallest currency subunit (e.g. eurocents). |                                      |
| consumerName | String                               | Name of the customer that completed the payment.                                                                | Only present in successful payments. |
| consumerBic  | String(8...11)                       | Bank Identification Code used by the customer to complete the payment.                                          | Only present in successful payments. |
| consumerIban | String                               | IBAN used by the customer to complete the payment.                                                              | Only present in successful payments. |
| refunds      | [refund](schemas-2#refund)    Object | Indicates refundedAmount and refundedPendingAmount.                                                             |                                      |

## Response codes

| HTTP status | Description                                                                                                                                                                                                                                      |
| :---------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 200         | Transaction's payment  details 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).                                                                                                                                                                                                 |