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

# View a Payment

GET https://sandbox.currenciesdirect.com/v1/customers/{customer_id}/payments/{payment_id}

**Deprecated**: This endpoint is deprecated. Please use [Get Payment Details](/api-reference/customers/api-integration/payments/get-payment-details) (v3) instead.

View a Single Payment.

**Authentication:** [Bearer token required](/api-guide/getting-started/authentication#oauth-20-authentication)

Reference: https://docs.redpincompany.com/api-reference/customers/api-integration/legacy-ap-is/legacy-payments/view-payment

## Authentication

- `Authorization` header (bearer token, required) — OAuth 2.0 Bearer token authentication. This API uses OAuth 2.0 Client Credentials flow. Please refer to the [Authentication](/api-guide/getting-started/authentication#oauth-20-authentication) section for detailed information on how to obtain and use your OAuth credentials.

## Servers

- `https://sandbox.currenciesdirect.com` (Sandbox, default)
- `https://api.redpincompany.com` (Production)

## Request

### Path parameters

- `customer_id` (string, required) — Unique Customer Identifier
- `payment_id` (string, required) — Unique Payment Identifier

## Response

### 200

Ok. The response will contain details of the requested Payment Instruction.

- `payment_id` (string, required) — Payment ID
- `instruction_number` (string, required) — Unique client reference to identify this conversion in future. The format will be \{customerId}-\{sequenceNumber}
- `currency_code` (string, required) — Recipient's Currency Code. **Reference:** [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)
- `amount` (double, required) — Amount being debited.
- `recipient_details` (ViewPaymentRecipientDetails, required)
- `status` (string, required) — Status of this payment.
- `payment_reference` (string, required) — Description to appear on the Recipient's bank statement.
- `created_datetime` (datetime, required) — Timestamp of the payment
- `payment_date` (date, required) — Date when the payment was completed.
- `client_reference_id` (string, required) — Unique reference id that you assigned to this payment for your own purposes.

## Errors

### 400 Bad Request Error

Bad request

- `code` (string, required)
- `description` (string, required) — Human-readable error description
- `type` (enum, optional) — Category or type of the error. - `VALIDATION_ERROR`: Error due to invalid input data or format - `AUTHORIZATION_ERROR`: Error related to insufficient permissions - `SYSTEM_ERROR`: Internal system or server errors - `RESOURCE_ERROR`: Error related to resource availability - `BUSINESS_ERROR`: Error related to business logic violations - `DATA_ERROR`: Error related to data inconsistencies or duplication
  - Allowed values: `VALIDATION_ERROR`, `AUTHORIZATION_ERROR`, `SYSTEM_ERROR`, `RESOURCE_ERROR`, `BUSINESS_ERROR`, `DATA_ERROR`
- `field` (string, optional)
- `details` (map from string to any, optional) — Additional details about the error
- `timestamp` (datetime, optional)

### 401 Unauthorized Error

Unauthorized

- `code` (string, required)
- `description` (string, required) — Human-readable error description
- `type` (enum, optional) — Category or type of the error. - `VALIDATION_ERROR`: Error due to invalid input data or format - `AUTHORIZATION_ERROR`: Error related to insufficient permissions - `SYSTEM_ERROR`: Internal system or server errors - `RESOURCE_ERROR`: Error related to resource availability - `BUSINESS_ERROR`: Error related to business logic violations - `DATA_ERROR`: Error related to data inconsistencies or duplication
  - Allowed values: `VALIDATION_ERROR`, `AUTHORIZATION_ERROR`, `SYSTEM_ERROR`, `RESOURCE_ERROR`, `BUSINESS_ERROR`, `DATA_ERROR`
- `field` (string, optional)
- `details` (map from string to any, optional) — Additional details about the error
- `timestamp` (datetime, optional)

### 404 Not Found Error

Resource not found

- `code` (string, required)
- `description` (string, required) — Human-readable error description
- `type` (enum, optional) — Category or type of the error. - `VALIDATION_ERROR`: Error due to invalid input data or format - `AUTHORIZATION_ERROR`: Error related to insufficient permissions - `SYSTEM_ERROR`: Internal system or server errors - `RESOURCE_ERROR`: Error related to resource availability - `BUSINESS_ERROR`: Error related to business logic violations - `DATA_ERROR`: Error related to data inconsistencies or duplication
  - Allowed values: `VALIDATION_ERROR`, `AUTHORIZATION_ERROR`, `SYSTEM_ERROR`, `RESOURCE_ERROR`, `BUSINESS_ERROR`, `DATA_ERROR`
- `field` (string, optional)
- `details` (map from string to any, optional) — Additional details about the error
- `timestamp` (datetime, optional)

### 500 Internal Server Error

Internal server error

- `code` (string, required)
- `description` (string, required) — Human-readable error description
- `type` (enum, optional) — Category or type of the error. - `VALIDATION_ERROR`: Error due to invalid input data or format - `AUTHORIZATION_ERROR`: Error related to insufficient permissions - `SYSTEM_ERROR`: Internal system or server errors - `RESOURCE_ERROR`: Error related to resource availability - `BUSINESS_ERROR`: Error related to business logic violations - `DATA_ERROR`: Error related to data inconsistencies or duplication
  - Allowed values: `VALIDATION_ERROR`, `AUTHORIZATION_ERROR`, `SYSTEM_ERROR`, `RESOURCE_ERROR`, `BUSINESS_ERROR`, `DATA_ERROR`
- `field` (string, optional)
- `details` (map from string to any, optional) — Additional details about the error
- `timestamp` (datetime, optional)

## Types

### ViewPaymentRecipientDetails

- `recipient_id` (integer, required) — Unique recipient reference id which can be used to identify/retrieve recipient in future.
- `recipient_name` (string, required) — Name of the Recipient.
- `country_code` (string, required) — Three letter Country Code of the Recipient. **Reference:** [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3)

## Examples

**Response**

```json
{
  "payment_id": "2908362",
  "instruction_number": "0202000005923566-000000011",
  "currency_code": "string",
  "amount": 51749.42,
  "recipient_details": {
    "recipient_id": 1687917,
    "recipient_name": "Bob Nighy",
    "country_code": "GBR"
  },
  "status": "AWAITINGBANKAPPROVAL",
  "payment_reference": "saving 225",
  "created_datetime": "2019-01-24T12:38:46Z",
  "payment_date": "2019-01-24",
  "client_reference_id": "987564823645"
}
```

**SDK Code**

```shell cURL
curl -X GET https://sandbox.currenciesdirect.com/v1/customers/cust_123456789/payments/{payment_id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

```

```python 200 Response
import requests

url = "https://sandbox.currenciesdirect.com/v1/customers/cust_123456789/payments/2908362"

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript 200 Response
const url = 'https://sandbox.currenciesdirect.com/v1/customers/cust_123456789/payments/2908362';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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

```go 200 Response
package main

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

func main() {

	url := "https://sandbox.currenciesdirect.com/v1/customers/cust_123456789/payments/2908362"

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

	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 200 Response
require 'uri'
require 'net/http'

url = URI("https://sandbox.currenciesdirect.com/v1/customers/cust_123456789/payments/2908362")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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

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

HttpResponse<String> response = Unirest.get("https://sandbox.currenciesdirect.com/v1/customers/cust_123456789/payments/2908362")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://sandbox.currenciesdirect.com/v1/customers/cust_123456789/payments/2908362', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp 200 Response
using RestSharp;

var client = new RestClient("https://sandbox.currenciesdirect.com/v1/customers/cust_123456789/payments/2908362");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift 200 Response
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox.currenciesdirect.com/v1/customers/cust_123456789/payments/2908362")! 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()
```