> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.thepennyinc.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.thepennyinc.com/_mcp/server.

# Get a webhook decision exchange

GET https://sandbox.api.thepennyinc.com/notifications/webhooks/exchanges/{notification_decision_exchange_id}

Retrieve a real-time decision exchange and its response by ID and version.

Required permissions: `notification_decision_exchange:read`.

Reference: https://docs.thepennyinc.com/banking/api-reference/platform/notifications/webhooks/exchanges/get

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://sandbox.api.thepennyinc.com` (Sandbox — safe for testing, no real money movement., default)
- `https://live.api.thepennyinc.com` (Live — real businesses, real money movement.)

## Request

### Path parameters

- `notification_decision_exchange_id` (string, required) — The ID of the decision exchange.

### Query parameters

- `version` (integer, optional, default: 0) — Resource version to return; 0 returns the latest.

### Headers

- `X-Penny-As-Business` (string, optional, nullable) — Act on behalf of another business that has granted you access. Requires the `business:act_as` permission.

## Response

### 200

The decision exchange.

- `notification_decision_exchange_id` (string, required) — Penny's unique identifier for this decision exchange.
- `version` (integer, required) — A number that increases each time this exchange's state changes. Use it to confirm you are looking at the latest information.
- `version_time` (datetime, required) — The date and time this exchange's state was last changed.
- `business_id` (string, required) — The business this decision concerns.
- `notification_endpoint_id` (string, required) — The webhook endpoint this decision request was sent to.
- `request_time` (datetime, required) — When the decision request was sent.
- `status` (enum, required) — This exchange's current status: 'pending', 'decided', 'timed_out', or 'failed'.
  - Allowed values: `pending`, `decided`, `timed_out`, `failed`
- `request` (NotificationTransactionAuthorizationRequestResponse, required) — The decision that was requested.
- `channel` (enum, required) — The channel this decision request was sent over.
  - Allowed values: `webhook`
- `response_time` (datetime, optional, nullable) — When a response was received, if one has been.
- `outcome` (enum, optional, nullable) — The effective outcome of this exchange, once resolved.
  - Allowed values: `approved`, `declined`
- `fallback_applied` (boolean, optional, default: false) — Whether the fallback outcome was applied because no response arrived in time.
- `response` (NotificationDecisionResponseResponse, optional, nullable) — The subscriber's response, if one was received.
- `metadata` (map from string to any, optional, nullable) — Additional metadata associated with this exchange.

## Errors

### 400 Bad Request Error

The request was malformed: a required field is missing or a value has the wrong type or format.

- `type` (string, required) — The name of the exception that was raised.
- `message` (string, required) — A human-readable description of the error.
- `details` (map from string to any, optional, nullable) — Structured context about the error, if any.
- `trace_id` (string, optional, nullable) — Identifier for correlating this error with server-side logs.
- `errors` (list of map from string to any, optional, nullable) — Sub-errors that contributed to this failure, if any.

### 401 Unauthorized Error

Authentication failed.

- `type` (string, required) — The name of the exception that was raised.
- `message` (string, required) — A human-readable description of the error.
- `details` (map from string to any, optional, nullable) — Structured context about the error, if any.
- `trace_id` (string, optional, nullable) — Identifier for correlating this error with server-side logs.
- `errors` (list of map from string to any, optional, nullable) — Sub-errors that contributed to this failure, if any.

### 403 Forbidden Error

The caller does not have permission to perform this action.

- `type` (string, required) — The name of the exception that was raised.
- `message` (string, required) — A human-readable description of the error.
- `details` (map from string to any, optional, nullable) — Structured context about the error, if any.
- `trace_id` (string, optional, nullable) — Identifier for correlating this error with server-side logs.
- `errors` (list of map from string to any, optional, nullable) — Sub-errors that contributed to this failure, if any.

### 404 Not Found Error

The decision exchange was not found.

- `type` (string, required) — The name of the exception that was raised.
- `message` (string, required) — A human-readable description of the error.
- `details` (map from string to any, optional, nullable) — Structured context about the error, if any.
- `trace_id` (string, optional, nullable) — Identifier for correlating this error with server-side logs.
- `errors` (list of map from string to any, optional, nullable) — Sub-errors that contributed to this failure, if any.

### 422 Unprocessable Entity Error

The request was well-formed but could not be processed because it breaks a business rule.

- `type` (string, required) — The name of the exception that was raised.
- `message` (string, required) — A human-readable description of the error.
- `details` (map from string to any, optional, nullable) — Structured context about the error, if any.
- `trace_id` (string, optional, nullable) — Identifier for correlating this error with server-side logs.
- `errors` (list of map from string to any, optional, nullable) — Sub-errors that contributed to this failure, if any.

### 429 Too Many Requests Error

Too many requests; retry after the Retry-After header.

- `type` (string, required) — The name of the exception that was raised.
- `message` (string, required) — A human-readable description of the error.
- `details` (map from string to any, optional, nullable) — Structured context about the error, if any.
- `trace_id` (string, optional, nullable) — Identifier for correlating this error with server-side logs.
- `errors` (list of map from string to any, optional, nullable) — Sub-errors that contributed to this failure, if any.

### 500 Internal Server Error

An unexpected error occurred.

- `type` (string, required) — The name of the exception that was raised.
- `message` (string, required) — A human-readable description of the error.
- `details` (map from string to any, optional, nullable) — Structured context about the error, if any.
- `trace_id` (string, optional, nullable) — Identifier for correlating this error with server-side logs.
- `errors` (list of map from string to any, optional, nullable) — Sub-errors that contributed to this failure, if any.

## Types

### NotificationTransactionAuthorizationRequestResponse

A request for a real-time decision on whether to authorize a transaction.

- `authorization` (map from string to any, required) — The transaction details relevant to making this decision.
- `identifier` (enum, optional, default: transaction.authorization) — A real-time decision Penny requests from your endpoint, which must approve or decline within the timeout.
  - Allowed values: `transaction.authorization`
- `timeout_seconds` (double, optional, nullable) — How long, in seconds (may be fractional), Penny will wait for a response before applying the fallback outcome.
- `fallback` (enum, optional, nullable) — The outcome applied if no response arrives before the timeout.
  - Allowed values: `approved`, `declined`

### NotificationDecisionResponseResponse

The subscriber's response to a decision request.

- `outcome` (enum, required) — The decided outcome.
  - Allowed values: `approved`, `declined`
- `reason` (string, optional, nullable) — The reason given for this outcome, if any.

## Examples

**Response**

```json
{
  "notification_decision_exchange_id": "notification_decision_01937d35-6ca5-74f2-8963-6ca54f29630b",
  "version": 1,
  "version_time": "2024-01-15T10:30:00Z",
  "business_id": "business_01937b95-484e-75af-8c68-484e5afc68d3",
  "notification_endpoint_id": "notification_endpoint_01937bc8-3624-739c-85ca-362439c5ca2e",
  "request_time": "2024-01-15T10:30:00Z",
  "status": "pending",
  "request": {
    "authorization": {},
    "identifier": "transaction.authorization",
    "timeout_seconds": 1.1,
    "fallback": "approved"
  },
  "channel": "webhook",
  "response_time": "2024-01-15T10:30:00Z",
  "outcome": "approved",
  "fallback_applied": false,
  "response": {
    "outcome": "approved",
    "reason": "string"
  },
  "metadata": {}
}
```

**SDK Code**

```python
import requests

url = "https://sandbox.api.thepennyinc.com/notifications/webhooks/exchanges/notification_decision_exchange_id"

headers = {
    "X-Penny-As-Business": "business_01a083e2-82ed-7a5c-9d1e-3b6f0c2a4d71",
    "Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://sandbox.api.thepennyinc.com/notifications/webhooks/exchanges/notification_decision_exchange_id';
const options = {
  method: 'GET',
  headers: {
    'X-Penny-As-Business': 'business_01a083e2-82ed-7a5c-9d1e-3b6f0c2a4d71',
    Authorization: 'Bearer <token>'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://sandbox.api.thepennyinc.com/notifications/webhooks/exchanges/notification_decision_exchange_id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-Penny-As-Business", "business_01a083e2-82ed-7a5c-9d1e-3b6f0c2a4d71")
	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://sandbox.api.thepennyinc.com/notifications/webhooks/exchanges/notification_decision_exchange_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-Penny-As-Business"] = 'business_01a083e2-82ed-7a5c-9d1e-3b6f0c2a4d71'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://sandbox.api.thepennyinc.com/notifications/webhooks/exchanges/notification_decision_exchange_id")
  .header("X-Penny-As-Business", "business_01a083e2-82ed-7a5c-9d1e-3b6f0c2a4d71")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://sandbox.api.thepennyinc.com/notifications/webhooks/exchanges/notification_decision_exchange_id', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'X-Penny-As-Business' => 'business_01a083e2-82ed-7a5c-9d1e-3b6f0c2a4d71',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://sandbox.api.thepennyinc.com/notifications/webhooks/exchanges/notification_decision_exchange_id");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Penny-As-Business", "business_01a083e2-82ed-7a5c-9d1e-3b6f0c2a4d71");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Penny-As-Business": "business_01a083e2-82ed-7a5c-9d1e-3b6f0c2a4d71",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox.api.thepennyinc.com/notifications/webhooks/exchanges/notification_decision_exchange_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```