> 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.

# Add a new recipient

POST https://sandbox.currenciesdirect.com/v2/customers/{customer_id}/recipients
Content-Type: application/json

To make a money transfer, you'll need to add details of the Recipient's account. There are a number of parameters which you can use to specify this account, but generally, recipient data objects consist of:

General Information

- Recipient personal details
- Legal structure (Individual/ Corporation)
- Contact information
- Country Code (ISO3166-1 alpha-3)


This [OAuth 2.0 Authenticated](/api-guide/getting-started/authentication#oauth-20-authentication) Add Recipient API allows you to register a recipient with their personal and bank details.


Reference: https://docs.redpincompany.com/api-reference/customers/api-integration/recipients/add-a-new-recipient

## 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 identifier for the customer to whom the recipient is being added.

### Body (application/json)

This endpoint expects an AddRecipientRequest.

- `name` (string, required) — Name of the recipient as per their bank records.
- `type` (enum, required) — Organisational type of a recipient; whether an Individual or Corporate.
  - Allowed values: `Individual`, `Corporate`
- `country_code` (string, required) — Three-letter [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code representing the recipient's country.
- `customer_own_account` (enum, required) — Recipient to be added is customer own account or not.
  - Allowed values: `yes`, `no`
- `address` (RecipientAddressRequest, required)
- `recipient_bank_details` (AddRecipientRequestRecipientBankDetails, required) — Recipient bank account details vary by country. For example, an IBAN is sufficient for most European and Nordic countries. However, for the United States, you must provide an account number, routing code type, routing code value, and the bank's country code. You must also specify the `currency` of the recipient's bank account using a three-letter ISO 4217 currency code (e.g., `GBP` for British Pound). The following are the four supported combinations of recipient bank account details: * `iban` * `account_number` and `swift_code` * `account_number`, `swift_code`, and `routing_code_value` * `account_number`, `routing_code_type`, `routing_code_value`, and `bank_country_code` **Examples:** 1. IBAN: ```json {"currency": "AED", "iban": "AE070331234567890123456"} ``` 2. Account number and Swift code: ```json {"currency": "AED", "account_number": "12345678", "swift_code": "BOMLAEADXXX"} ``` 3. Account number, Swift code, and Routing code value: ```json {"currency": "AED", "account_number": "12345678", "swift_code": "BOMLAEADXXX", "routing_code_value": "601613"} ``` 4. Account number, Routing code type, Routing code value, and Bank country code: ```json {"currency": "AED", "account_number": "12345678", "routing_code_type": "SORT", "routing_code_value": "601613", "bank_country_code": "ARE"} ```
- `nick_name` (string, optional) — Optional nickname for the recipient. Useful for quick searches and display purposes.
- `email` (string, optional) — Email address of a recipient, which may be used in case of an issue with a transaction.
- `phone_number` (string, optional) — Recipient's phone number.
- `mobile_number` (string, optional) — Recipient's mobile number.
- `client_reference_id` (string, optional) — A Reference Id that you can assign to this recipient, for your records.
- `payment_reference` (string, optional) — Optional payment reference required by some accounts. This reference should be used for future payments. It should not contain any special character.
- `confirm_recipient` (AddRecipientRequestConfirmRecipient, optional) — Container for confirmation of recipient details. This object is required only when the initial API call fails due to a [Confirmation of Payee (CoP)](https://www.wearepay.uk/what-we-do/overlay-services/confirmation-of-payee/) or [Verification of Payee (VoP)](https://www.europeanpaymentscouncil.eu/what-we-do/other-schemes/verification-payee) check failure. If the failure is related to CoP/VoP, the API response will include `request_identifier` and `event_id`, which must be used in the subsequent retry request along with the appropriate `customer_action`. Detailed instructions for handling these scenarios can be found in: - [UK Confirmation of Payee (CoP) Guide](/api-guide/regulatory-guides/cop-guide) - [SEPA Verification of Payee (VoP) Guide](/api-guide/regulatory-guides/vop-guide)
- `additional_details` (AddRecipientRequestAdditionalDetails, optional) — Additional details for the recipient.

## Response

### 200

Recipient added successfully or CoP/VoP verification failure

- `client_reference_id` (string, optional) — Reference Id assigned to this recipient. Present in successful responses.
- `recipient_id` (string, optional) — Unique identifier for the recipient. Present in successful responses.
- `code` (string, optional) — Response code from the CoP/VoP check. Indicates the type of match result from the payee's bank. Present only when CoP/VoP verification fails.
- `description` (string, optional) — Human-readable description of the CoP/VoP check result. Present only when CoP/VoP verification fails.
- `recipient_check` (AddRecipientResponseRecipientCheck, optional) — Details of the CoP/VoP check result including identifiers needed for retry. Present only when CoP/VoP verification fails.

## Errors

### 400 Bad Request Error

Bad request - invalid parameters

- `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 - invalid authorization header

- `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

Customer 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)

## Types

### RecipientAddressRequest

- `address_line` (string, required) — First line of the postal address of the recipient.
- `city` (string, required) — Recipient's city, town, or village.
- `state` (string, required) — Recipient's state, country, province or a prefecture.
- `post_code` (string, required) — Recipient's postal code, zip code or pin code.

### AddRecipientRequestRecipientBankDetails

Recipient bank account details vary by country. For example, an IBAN is sufficient for most European and Nordic countries. However, for the United States, you must provide an account number, routing code type, routing code value, and the bank's country code. You must also specify the `currency` of the recipient's bank account using a three-letter ISO 4217 currency code (e.g., `GBP` for British Pound). The following are the four supported combinations of recipient bank account details: * `iban` * `account_number` and `swift_code` * `account_number`, `swift_code`, and `routing_code_value` * `account_number`, `routing_code_type`, `routing_code_value`, and `bank_country_code` **Examples:** 1. IBAN: ```json {"currency": "AED", "iban": "AE070331234567890123456"} ``` 2. Account number and Swift code: ```json {"currency": "AED", "account_number": "12345678", "swift_code": "BOMLAEADXXX"} ``` 3. Account number, Swift code, and Routing code value: ```json {"currency": "AED", "account_number": "12345678", "swift_code": "BOMLAEADXXX", "routing_code_value": "601613"} ``` 4. Account number, Routing code type, Routing code value, and Bank country code: ```json {"currency": "AED", "account_number": "12345678", "routing_code_type": "SORT", "routing_code_value": "601613", "bank_country_code": "ARE"} ```

- `currency` (string, required) — Three letter [ISO4217](https://en.wikipedia.org/wiki/ISO_4217) Currency Code of Recipient's bank account.
- `iban` (string, optional) — Recipient IBAN as per their bank records.
- `account_number` (string, optional) — Recipient's bank account number as per their statement.
- `swift_code` (string, optional) — Swift Code of the recipient's bank account.
- `routing_code_type` (enum, optional) — Recipient routing code type. Supported values: * `IFSC` – Indian Financial System Code (India) * `SORT` – Sort Code (United Kingdom and Ireland) * `BRANCH` – Branch Code * `CNAPS` – China National Advanced Payment System (China) * `ABA` – American Bankers Association Routing Number (United States) * `BSB` – Bank State Branch Code (Australia) * `Transit` – Transit Number (Canada)
  - Allowed values: `IFSC`, `SORT`, `BRANCH`, `CNAPS`, `ABA`, `BSB`, `Transit`
- `routing_code_value` (string, optional) — Routing Code of the recipient's bank account.
- `bank_country_code` (string, optional) — Recipient bank country code.

### AddRecipientRequestConfirmRecipient

Container for confirmation of recipient details. This object is required only when the initial API call fails due to a [Confirmation of Payee (CoP)](https://www.wearepay.uk/what-we-do/overlay-services/confirmation-of-payee/) or [Verification of Payee (VoP)](https://www.europeanpaymentscouncil.eu/what-we-do/other-schemes/verification-payee) check failure. If the failure is related to CoP/VoP, the API response will include `request_identifier` and `event_id`, which must be used in the subsequent retry request along with the appropriate `customer_action`. Detailed instructions for handling these scenarios can be found in: - [UK Confirmation of Payee (CoP) Guide](/api-guide/regulatory-guides/cop-guide) - [SEPA Verification of Payee (VoP) Guide](/api-guide/regulatory-guides/vop-guide)

- `customer_action` (enum, optional) — Action to be taken by the customer if the CoP/VoP check fails.
  - Allowed values: `override`, `update`
- `request_identifier` (string, optional) — The request ID returned in the response of the failed CoP/VoP attempt. Required in the retry request.
- `event_id` (string, optional) — The event ID returned in the response of the failed CoP/VoP attempt. Required in the retry request.

### AddRecipientRequestAdditionalDetails

Additional details for the recipient.

- `tax_id` (string, optional) — Tax identification number or registration number for the recipient. **Required for:** - **BRL (Brazilian Real)**: Tax ID must be provided in the `tax_id` field. - **KRW (South Korean Won)**: Registration number must be provided in the `tax_id` field. - **CLP (Chilean Peso)**: 9-digit RUT/RUN number must be provided in the `tax_id` field. - **CRC (Costa Rican Colón)**: "Cédula Jurídica" 9–12 digits must be provided in the `tax_id` field. - **PEN (Peruvian Sol)**: 11-digit RUC for Corporates, 8-digit DNI for individuals resident in Peru must be provided in the `tax_id` field. **Optional for:** All other currencies.

### AddRecipientResponseRecipientCheck

Details of the CoP/VoP check result including identifiers needed for retry. Present only when CoP/VoP verification fails.

- `request_identifier` (string, optional) — Unique identifier for the CoP/VoP check request.
- `suggested_recipient_name` (string, optional) — The name suggested by the payee's bank as a close match.
- `event_id` (string, optional) — Event identifier for tracking the CoP/VoP check.

## Examples

### Add an Individual Recipient in UAE using IBAN

**Request**

```json
{
  "name": "Ahmed Al Mansoori",
  "type": "Individual",
  "country_code": "ARE",
  "customer_own_account": "no",
  "address": {
    "address_line": "Office 2101, Jumeirah Bay X2 Tower",
    "city": "Dubai",
    "state": "Dubai",
    "post_code": "000000"
  },
  "recipient_bank_details": {
    "currency": "AED",
    "iban": "AE070331234567890123456"
  },
  "nick_name": "Ahmed UAE",
  "email": "ahmed.mansoori@example.com",
  "phone_number": "+971-501234567",
  "mobile_number": "+971-501234567",
  "client_reference_id": "recipient-123",
  "payment_reference": "Invoice#4567",
  "additional_details": {
    "tax_id": "AH12345678"
  }
}
```

**Response**

```json
{
  "client_reference_id": "recipient-123",
  "recipient_id": "1668758"
}
```

**SDK Code**

```python Add an Individual Recipient in UAE using IBAN
import requests

url = "https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients"

payload = {
    "name": "Ahmed Al Mansoori",
    "type": "Individual",
    "country_code": "ARE",
    "customer_own_account": "no",
    "address": {
        "address_line": "Office 2101, Jumeirah Bay X2 Tower",
        "city": "Dubai",
        "state": "Dubai",
        "post_code": "000000"
    },
    "recipient_bank_details": {
        "currency": "AED",
        "iban": "AE070331234567890123456"
    },
    "nick_name": "Ahmed UAE",
    "email": "ahmed.mansoori@example.com",
    "phone_number": "+971-501234567",
    "mobile_number": "+971-501234567",
    "client_reference_id": "recipient-123",
    "payment_reference": "Invoice#4567",
    "additional_details": { "tax_id": "AH12345678" }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Add an Individual Recipient in UAE using IBAN
const url = 'https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"Ahmed Al Mansoori","type":"Individual","country_code":"ARE","customer_own_account":"no","address":{"address_line":"Office 2101, Jumeirah Bay X2 Tower","city":"Dubai","state":"Dubai","post_code":"000000"},"recipient_bank_details":{"currency":"AED","iban":"AE070331234567890123456"},"nick_name":"Ahmed UAE","email":"ahmed.mansoori@example.com","phone_number":"+971-501234567","mobile_number":"+971-501234567","client_reference_id":"recipient-123","payment_reference":"Invoice#4567","additional_details":{"tax_id":"AH12345678"}}'
};

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

```go Add an Individual Recipient in UAE using IBAN
package main

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

func main() {

	url := "https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients"

	payload := strings.NewReader("{\n  \"name\": \"Ahmed Al Mansoori\",\n  \"type\": \"Individual\",\n  \"country_code\": \"ARE\",\n  \"customer_own_account\": \"no\",\n  \"address\": {\n    \"address_line\": \"Office 2101, Jumeirah Bay X2 Tower\",\n    \"city\": \"Dubai\",\n    \"state\": \"Dubai\",\n    \"post_code\": \"000000\"\n  },\n  \"recipient_bank_details\": {\n    \"currency\": \"AED\",\n    \"iban\": \"AE070331234567890123456\"\n  },\n  \"nick_name\": \"Ahmed UAE\",\n  \"email\": \"ahmed.mansoori@example.com\",\n  \"phone_number\": \"+971-501234567\",\n  \"mobile_number\": \"+971-501234567\",\n  \"client_reference_id\": \"recipient-123\",\n  \"payment_reference\": \"Invoice#4567\",\n  \"additional_details\": {\n    \"tax_id\": \"AH12345678\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

```ruby Add an Individual Recipient in UAE using IBAN
require 'uri'
require 'net/http'

url = URI("https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Ahmed Al Mansoori\",\n  \"type\": \"Individual\",\n  \"country_code\": \"ARE\",\n  \"customer_own_account\": \"no\",\n  \"address\": {\n    \"address_line\": \"Office 2101, Jumeirah Bay X2 Tower\",\n    \"city\": \"Dubai\",\n    \"state\": \"Dubai\",\n    \"post_code\": \"000000\"\n  },\n  \"recipient_bank_details\": {\n    \"currency\": \"AED\",\n    \"iban\": \"AE070331234567890123456\"\n  },\n  \"nick_name\": \"Ahmed UAE\",\n  \"email\": \"ahmed.mansoori@example.com\",\n  \"phone_number\": \"+971-501234567\",\n  \"mobile_number\": \"+971-501234567\",\n  \"client_reference_id\": \"recipient-123\",\n  \"payment_reference\": \"Invoice#4567\",\n  \"additional_details\": {\n    \"tax_id\": \"AH12345678\"\n  }\n}"

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

```java Add an Individual Recipient in UAE using IBAN
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Ahmed Al Mansoori\",\n  \"type\": \"Individual\",\n  \"country_code\": \"ARE\",\n  \"customer_own_account\": \"no\",\n  \"address\": {\n    \"address_line\": \"Office 2101, Jumeirah Bay X2 Tower\",\n    \"city\": \"Dubai\",\n    \"state\": \"Dubai\",\n    \"post_code\": \"000000\"\n  },\n  \"recipient_bank_details\": {\n    \"currency\": \"AED\",\n    \"iban\": \"AE070331234567890123456\"\n  },\n  \"nick_name\": \"Ahmed UAE\",\n  \"email\": \"ahmed.mansoori@example.com\",\n  \"phone_number\": \"+971-501234567\",\n  \"mobile_number\": \"+971-501234567\",\n  \"client_reference_id\": \"recipient-123\",\n  \"payment_reference\": \"Invoice#4567\",\n  \"additional_details\": {\n    \"tax_id\": \"AH12345678\"\n  }\n}")
  .asString();
```

```php Add an Individual Recipient in UAE using IBAN
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients', [
  'body' => '{
  "name": "Ahmed Al Mansoori",
  "type": "Individual",
  "country_code": "ARE",
  "customer_own_account": "no",
  "address": {
    "address_line": "Office 2101, Jumeirah Bay X2 Tower",
    "city": "Dubai",
    "state": "Dubai",
    "post_code": "000000"
  },
  "recipient_bank_details": {
    "currency": "AED",
    "iban": "AE070331234567890123456"
  },
  "nick_name": "Ahmed UAE",
  "email": "ahmed.mansoori@example.com",
  "phone_number": "+971-501234567",
  "mobile_number": "+971-501234567",
  "client_reference_id": "recipient-123",
  "payment_reference": "Invoice#4567",
  "additional_details": {
    "tax_id": "AH12345678"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Add an Individual Recipient in UAE using IBAN
using RestSharp;

var client = new RestClient("https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Ahmed Al Mansoori\",\n  \"type\": \"Individual\",\n  \"country_code\": \"ARE\",\n  \"customer_own_account\": \"no\",\n  \"address\": {\n    \"address_line\": \"Office 2101, Jumeirah Bay X2 Tower\",\n    \"city\": \"Dubai\",\n    \"state\": \"Dubai\",\n    \"post_code\": \"000000\"\n  },\n  \"recipient_bank_details\": {\n    \"currency\": \"AED\",\n    \"iban\": \"AE070331234567890123456\"\n  },\n  \"nick_name\": \"Ahmed UAE\",\n  \"email\": \"ahmed.mansoori@example.com\",\n  \"phone_number\": \"+971-501234567\",\n  \"mobile_number\": \"+971-501234567\",\n  \"client_reference_id\": \"recipient-123\",\n  \"payment_reference\": \"Invoice#4567\",\n  \"additional_details\": {\n    \"tax_id\": \"AH12345678\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Add an Individual Recipient in UAE using IBAN
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Ahmed Al Mansoori",
  "type": "Individual",
  "country_code": "ARE",
  "customer_own_account": "no",
  "address": [
    "address_line": "Office 2101, Jumeirah Bay X2 Tower",
    "city": "Dubai",
    "state": "Dubai",
    "post_code": "000000"
  ],
  "recipient_bank_details": [
    "currency": "AED",
    "iban": "AE070331234567890123456"
  ],
  "nick_name": "Ahmed UAE",
  "email": "ahmed.mansoori@example.com",
  "phone_number": "+971-501234567",
  "mobile_number": "+971-501234567",
  "client_reference_id": "recipient-123",
  "payment_reference": "Invoice#4567",
  "additional_details": ["tax_id": "AH12345678"]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```

### Add Recipient CoP/VoP Failure

**Request**

```json
{
  "name": "Ahmed Al Mansoori",
  "type": "Individual",
  "country_code": "ARE",
  "customer_own_account": "no",
  "address": {
    "address_line": "Office 2101, Jumeirah Bay X2 Tower",
    "city": "Dubai",
    "state": "Dubai",
    "post_code": "000000"
  },
  "recipient_bank_details": {
    "currency": "AED",
    "iban": "AE070331234567890123456"
  },
  "nick_name": "Ahmed UAE",
  "email": "ahmed.mansoori@example.com",
  "phone_number": "+971-501234567",
  "mobile_number": "+971-501234567",
  "client_reference_id": "recipient-123",
  "payment_reference": "InvoiceA#4567",
  "additional_details": {
    "tax_id": "AH12345678"
  }
}
```

**Response**

```json
{
  "code": "MBAM",
  "description": "Payee's bank has performed the matching and confirms it is a close match.",
  "recipient_check": {
    "request_identifier": "123456789",
    "suggested_recipient_name": "John Doe",
    "event_id": "AG-435435454435"
  }
}
```

**SDK Code**

```python Add Recipient CoP/VoP Failure
import requests

url = "https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients"

payload = {
    "name": "Ahmed Al Mansoori",
    "type": "Individual",
    "country_code": "ARE",
    "customer_own_account": "no",
    "address": {
        "address_line": "Office 2101, Jumeirah Bay X2 Tower",
        "city": "Dubai",
        "state": "Dubai",
        "post_code": "000000"
    },
    "recipient_bank_details": {
        "currency": "AED",
        "iban": "AE070331234567890123456"
    },
    "nick_name": "Ahmed UAE",
    "email": "ahmed.mansoori@example.com",
    "phone_number": "+971-501234567",
    "mobile_number": "+971-501234567",
    "client_reference_id": "recipient-123",
    "payment_reference": "InvoiceA#4567",
    "additional_details": { "tax_id": "AH12345678" }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Add Recipient CoP/VoP Failure
const url = 'https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"Ahmed Al Mansoori","type":"Individual","country_code":"ARE","customer_own_account":"no","address":{"address_line":"Office 2101, Jumeirah Bay X2 Tower","city":"Dubai","state":"Dubai","post_code":"000000"},"recipient_bank_details":{"currency":"AED","iban":"AE070331234567890123456"},"nick_name":"Ahmed UAE","email":"ahmed.mansoori@example.com","phone_number":"+971-501234567","mobile_number":"+971-501234567","client_reference_id":"recipient-123","payment_reference":"InvoiceA#4567","additional_details":{"tax_id":"AH12345678"}}'
};

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

```go Add Recipient CoP/VoP Failure
package main

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

func main() {

	url := "https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients"

	payload := strings.NewReader("{\n  \"name\": \"Ahmed Al Mansoori\",\n  \"type\": \"Individual\",\n  \"country_code\": \"ARE\",\n  \"customer_own_account\": \"no\",\n  \"address\": {\n    \"address_line\": \"Office 2101, Jumeirah Bay X2 Tower\",\n    \"city\": \"Dubai\",\n    \"state\": \"Dubai\",\n    \"post_code\": \"000000\"\n  },\n  \"recipient_bank_details\": {\n    \"currency\": \"AED\",\n    \"iban\": \"AE070331234567890123456\"\n  },\n  \"nick_name\": \"Ahmed UAE\",\n  \"email\": \"ahmed.mansoori@example.com\",\n  \"phone_number\": \"+971-501234567\",\n  \"mobile_number\": \"+971-501234567\",\n  \"client_reference_id\": \"recipient-123\",\n  \"payment_reference\": \"InvoiceA#4567\",\n  \"additional_details\": {\n    \"tax_id\": \"AH12345678\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

```ruby Add Recipient CoP/VoP Failure
require 'uri'
require 'net/http'

url = URI("https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Ahmed Al Mansoori\",\n  \"type\": \"Individual\",\n  \"country_code\": \"ARE\",\n  \"customer_own_account\": \"no\",\n  \"address\": {\n    \"address_line\": \"Office 2101, Jumeirah Bay X2 Tower\",\n    \"city\": \"Dubai\",\n    \"state\": \"Dubai\",\n    \"post_code\": \"000000\"\n  },\n  \"recipient_bank_details\": {\n    \"currency\": \"AED\",\n    \"iban\": \"AE070331234567890123456\"\n  },\n  \"nick_name\": \"Ahmed UAE\",\n  \"email\": \"ahmed.mansoori@example.com\",\n  \"phone_number\": \"+971-501234567\",\n  \"mobile_number\": \"+971-501234567\",\n  \"client_reference_id\": \"recipient-123\",\n  \"payment_reference\": \"InvoiceA#4567\",\n  \"additional_details\": {\n    \"tax_id\": \"AH12345678\"\n  }\n}"

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

```java Add Recipient CoP/VoP Failure
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Ahmed Al Mansoori\",\n  \"type\": \"Individual\",\n  \"country_code\": \"ARE\",\n  \"customer_own_account\": \"no\",\n  \"address\": {\n    \"address_line\": \"Office 2101, Jumeirah Bay X2 Tower\",\n    \"city\": \"Dubai\",\n    \"state\": \"Dubai\",\n    \"post_code\": \"000000\"\n  },\n  \"recipient_bank_details\": {\n    \"currency\": \"AED\",\n    \"iban\": \"AE070331234567890123456\"\n  },\n  \"nick_name\": \"Ahmed UAE\",\n  \"email\": \"ahmed.mansoori@example.com\",\n  \"phone_number\": \"+971-501234567\",\n  \"mobile_number\": \"+971-501234567\",\n  \"client_reference_id\": \"recipient-123\",\n  \"payment_reference\": \"InvoiceA#4567\",\n  \"additional_details\": {\n    \"tax_id\": \"AH12345678\"\n  }\n}")
  .asString();
```

```php Add Recipient CoP/VoP Failure
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients', [
  'body' => '{
  "name": "Ahmed Al Mansoori",
  "type": "Individual",
  "country_code": "ARE",
  "customer_own_account": "no",
  "address": {
    "address_line": "Office 2101, Jumeirah Bay X2 Tower",
    "city": "Dubai",
    "state": "Dubai",
    "post_code": "000000"
  },
  "recipient_bank_details": {
    "currency": "AED",
    "iban": "AE070331234567890123456"
  },
  "nick_name": "Ahmed UAE",
  "email": "ahmed.mansoori@example.com",
  "phone_number": "+971-501234567",
  "mobile_number": "+971-501234567",
  "client_reference_id": "recipient-123",
  "payment_reference": "InvoiceA#4567",
  "additional_details": {
    "tax_id": "AH12345678"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Add Recipient CoP/VoP Failure
using RestSharp;

var client = new RestClient("https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Ahmed Al Mansoori\",\n  \"type\": \"Individual\",\n  \"country_code\": \"ARE\",\n  \"customer_own_account\": \"no\",\n  \"address\": {\n    \"address_line\": \"Office 2101, Jumeirah Bay X2 Tower\",\n    \"city\": \"Dubai\",\n    \"state\": \"Dubai\",\n    \"post_code\": \"000000\"\n  },\n  \"recipient_bank_details\": {\n    \"currency\": \"AED\",\n    \"iban\": \"AE070331234567890123456\"\n  },\n  \"nick_name\": \"Ahmed UAE\",\n  \"email\": \"ahmed.mansoori@example.com\",\n  \"phone_number\": \"+971-501234567\",\n  \"mobile_number\": \"+971-501234567\",\n  \"client_reference_id\": \"recipient-123\",\n  \"payment_reference\": \"InvoiceA#4567\",\n  \"additional_details\": {\n    \"tax_id\": \"AH12345678\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Add Recipient CoP/VoP Failure
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Ahmed Al Mansoori",
  "type": "Individual",
  "country_code": "ARE",
  "customer_own_account": "no",
  "address": [
    "address_line": "Office 2101, Jumeirah Bay X2 Tower",
    "city": "Dubai",
    "state": "Dubai",
    "post_code": "000000"
  ],
  "recipient_bank_details": [
    "currency": "AED",
    "iban": "AE070331234567890123456"
  ],
  "nick_name": "Ahmed UAE",
  "email": "ahmed.mansoori@example.com",
  "phone_number": "+971-501234567",
  "mobile_number": "+971-501234567",
  "client_reference_id": "recipient-123",
  "payment_reference": "InvoiceA#4567",
  "additional_details": ["tax_id": "AH12345678"]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```

### CoP/VoP Failure retry

**Request**

```json
{
  "name": "Ahmed Al Mansoori",
  "type": "Individual",
  "country_code": "ARE",
  "customer_own_account": "no",
  "address": {
    "address_line": "Office 2101, Jumeirah Bay X2 Tower",
    "city": "Dubai",
    "state": "Dubai",
    "post_code": "000000"
  },
  "recipient_bank_details": {
    "currency": "AED",
    "iban": "AE070331234567890123456"
  },
  "nick_name": "Ahmed UAE",
  "email": "ahmed.mansoori@example.com",
  "phone_number": "+971-501234567",
  "mobile_number": "+971-501234567",
  "client_reference_id": "recipient-123",
  "payment_reference": "Invoice#4567",
  "confirm_recipient": {
    "customer_action": "override",
    "request_identifier": "123456789",
    "event_id": "AG-435435454435"
  },
  "additional_details": {
    "tax_id": "AH12345678"
  }
}
```

**Response**

```json
{
  "client_reference_id": "recipient-123",
  "recipient_id": "1668758"
}
```

**SDK Code**

```python CoP/VoP Failure retry
import requests

url = "https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients"

payload = {
    "name": "Ahmed Al Mansoori",
    "type": "Individual",
    "country_code": "ARE",
    "customer_own_account": "no",
    "address": {
        "address_line": "Office 2101, Jumeirah Bay X2 Tower",
        "city": "Dubai",
        "state": "Dubai",
        "post_code": "000000"
    },
    "recipient_bank_details": {
        "currency": "AED",
        "iban": "AE070331234567890123456"
    },
    "nick_name": "Ahmed UAE",
    "email": "ahmed.mansoori@example.com",
    "phone_number": "+971-501234567",
    "mobile_number": "+971-501234567",
    "client_reference_id": "recipient-123",
    "payment_reference": "Invoice#4567",
    "confirm_recipient": {
        "customer_action": "override",
        "request_identifier": "123456789",
        "event_id": "AG-435435454435"
    },
    "additional_details": { "tax_id": "AH12345678" }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript CoP/VoP Failure retry
const url = 'https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"Ahmed Al Mansoori","type":"Individual","country_code":"ARE","customer_own_account":"no","address":{"address_line":"Office 2101, Jumeirah Bay X2 Tower","city":"Dubai","state":"Dubai","post_code":"000000"},"recipient_bank_details":{"currency":"AED","iban":"AE070331234567890123456"},"nick_name":"Ahmed UAE","email":"ahmed.mansoori@example.com","phone_number":"+971-501234567","mobile_number":"+971-501234567","client_reference_id":"recipient-123","payment_reference":"Invoice#4567","confirm_recipient":{"customer_action":"override","request_identifier":"123456789","event_id":"AG-435435454435"},"additional_details":{"tax_id":"AH12345678"}}'
};

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

```go CoP/VoP Failure retry
package main

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

func main() {

	url := "https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients"

	payload := strings.NewReader("{\n  \"name\": \"Ahmed Al Mansoori\",\n  \"type\": \"Individual\",\n  \"country_code\": \"ARE\",\n  \"customer_own_account\": \"no\",\n  \"address\": {\n    \"address_line\": \"Office 2101, Jumeirah Bay X2 Tower\",\n    \"city\": \"Dubai\",\n    \"state\": \"Dubai\",\n    \"post_code\": \"000000\"\n  },\n  \"recipient_bank_details\": {\n    \"currency\": \"AED\",\n    \"iban\": \"AE070331234567890123456\"\n  },\n  \"nick_name\": \"Ahmed UAE\",\n  \"email\": \"ahmed.mansoori@example.com\",\n  \"phone_number\": \"+971-501234567\",\n  \"mobile_number\": \"+971-501234567\",\n  \"client_reference_id\": \"recipient-123\",\n  \"payment_reference\": \"Invoice#4567\",\n  \"confirm_recipient\": {\n    \"customer_action\": \"override\",\n    \"request_identifier\": \"123456789\",\n    \"event_id\": \"AG-435435454435\"\n  },\n  \"additional_details\": {\n    \"tax_id\": \"AH12345678\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

```ruby CoP/VoP Failure retry
require 'uri'
require 'net/http'

url = URI("https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Ahmed Al Mansoori\",\n  \"type\": \"Individual\",\n  \"country_code\": \"ARE\",\n  \"customer_own_account\": \"no\",\n  \"address\": {\n    \"address_line\": \"Office 2101, Jumeirah Bay X2 Tower\",\n    \"city\": \"Dubai\",\n    \"state\": \"Dubai\",\n    \"post_code\": \"000000\"\n  },\n  \"recipient_bank_details\": {\n    \"currency\": \"AED\",\n    \"iban\": \"AE070331234567890123456\"\n  },\n  \"nick_name\": \"Ahmed UAE\",\n  \"email\": \"ahmed.mansoori@example.com\",\n  \"phone_number\": \"+971-501234567\",\n  \"mobile_number\": \"+971-501234567\",\n  \"client_reference_id\": \"recipient-123\",\n  \"payment_reference\": \"Invoice#4567\",\n  \"confirm_recipient\": {\n    \"customer_action\": \"override\",\n    \"request_identifier\": \"123456789\",\n    \"event_id\": \"AG-435435454435\"\n  },\n  \"additional_details\": {\n    \"tax_id\": \"AH12345678\"\n  }\n}"

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

```java CoP/VoP Failure retry
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Ahmed Al Mansoori\",\n  \"type\": \"Individual\",\n  \"country_code\": \"ARE\",\n  \"customer_own_account\": \"no\",\n  \"address\": {\n    \"address_line\": \"Office 2101, Jumeirah Bay X2 Tower\",\n    \"city\": \"Dubai\",\n    \"state\": \"Dubai\",\n    \"post_code\": \"000000\"\n  },\n  \"recipient_bank_details\": {\n    \"currency\": \"AED\",\n    \"iban\": \"AE070331234567890123456\"\n  },\n  \"nick_name\": \"Ahmed UAE\",\n  \"email\": \"ahmed.mansoori@example.com\",\n  \"phone_number\": \"+971-501234567\",\n  \"mobile_number\": \"+971-501234567\",\n  \"client_reference_id\": \"recipient-123\",\n  \"payment_reference\": \"Invoice#4567\",\n  \"confirm_recipient\": {\n    \"customer_action\": \"override\",\n    \"request_identifier\": \"123456789\",\n    \"event_id\": \"AG-435435454435\"\n  },\n  \"additional_details\": {\n    \"tax_id\": \"AH12345678\"\n  }\n}")
  .asString();
```

```php CoP/VoP Failure retry
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients', [
  'body' => '{
  "name": "Ahmed Al Mansoori",
  "type": "Individual",
  "country_code": "ARE",
  "customer_own_account": "no",
  "address": {
    "address_line": "Office 2101, Jumeirah Bay X2 Tower",
    "city": "Dubai",
    "state": "Dubai",
    "post_code": "000000"
  },
  "recipient_bank_details": {
    "currency": "AED",
    "iban": "AE070331234567890123456"
  },
  "nick_name": "Ahmed UAE",
  "email": "ahmed.mansoori@example.com",
  "phone_number": "+971-501234567",
  "mobile_number": "+971-501234567",
  "client_reference_id": "recipient-123",
  "payment_reference": "Invoice#4567",
  "confirm_recipient": {
    "customer_action": "override",
    "request_identifier": "123456789",
    "event_id": "AG-435435454435"
  },
  "additional_details": {
    "tax_id": "AH12345678"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp CoP/VoP Failure retry
using RestSharp;

var client = new RestClient("https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Ahmed Al Mansoori\",\n  \"type\": \"Individual\",\n  \"country_code\": \"ARE\",\n  \"customer_own_account\": \"no\",\n  \"address\": {\n    \"address_line\": \"Office 2101, Jumeirah Bay X2 Tower\",\n    \"city\": \"Dubai\",\n    \"state\": \"Dubai\",\n    \"post_code\": \"000000\"\n  },\n  \"recipient_bank_details\": {\n    \"currency\": \"AED\",\n    \"iban\": \"AE070331234567890123456\"\n  },\n  \"nick_name\": \"Ahmed UAE\",\n  \"email\": \"ahmed.mansoori@example.com\",\n  \"phone_number\": \"+971-501234567\",\n  \"mobile_number\": \"+971-501234567\",\n  \"client_reference_id\": \"recipient-123\",\n  \"payment_reference\": \"Invoice#4567\",\n  \"confirm_recipient\": {\n    \"customer_action\": \"override\",\n    \"request_identifier\": \"123456789\",\n    \"event_id\": \"AG-435435454435\"\n  },\n  \"additional_details\": {\n    \"tax_id\": \"AH12345678\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift CoP/VoP Failure retry
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Ahmed Al Mansoori",
  "type": "Individual",
  "country_code": "ARE",
  "customer_own_account": "no",
  "address": [
    "address_line": "Office 2101, Jumeirah Bay X2 Tower",
    "city": "Dubai",
    "state": "Dubai",
    "post_code": "000000"
  ],
  "recipient_bank_details": [
    "currency": "AED",
    "iban": "AE070331234567890123456"
  ],
  "nick_name": "Ahmed UAE",
  "email": "ahmed.mansoori@example.com",
  "phone_number": "+971-501234567",
  "mobile_number": "+971-501234567",
  "client_reference_id": "recipient-123",
  "payment_reference": "Invoice#4567",
  "confirm_recipient": [
    "customer_action": "override",
    "request_identifier": "123456789",
    "event_id": "AG-435435454435"
  ],
  "additional_details": ["tax_id": "AH12345678"]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox.currenciesdirect.com/v2/customers/cust_123456789/recipients")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```