> This page is for Enterprise.

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

# Initiate an outgoing instant refund credit transfer.

POST https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds
Content-Type: application/json

Return an incoming payment transaction to the sender using either the “end_to_end_id” and "value_date”, or “UETR”. The response to a refund transaction is asynchronous, which is either through a GET Refund request or as a push notification via webhook.

Reference: https://citi-demo.ferndocs.com/enterprises/api-reference/payment-services/instant-payments/express-instant-payments/express-refund-initiation

## Authentication

- `Authorization` header (bearer token, required) — All CitiConnect APIs use the oAuth2 authentication scheme, which requires a bearer token to authenticate your API call. The Token URL includes the version of authentication used by this API. See the Citi Authentication API reference for information on requesting a token.

## Servers

- `https://b2b.api.icg.citi.com/citiconnect/prod` (production gateway url, default)
- `https://sandbox.b2b.api.icg.citi.com/citiconnect/sb` (sbox url )

## Request

### Query parameters

- `client_id` (string, required) — Your unique identification, same as the identification you use for OAuth token generation, Citi shared with you during your CitiConnect API onboarding

### Headers

- `Idempotency-Id` (string, required) — Your unique identification for a POST request - Maximum length is 128. - CitiConnect API responds with an error (HTTP status 4XX) if your POST request idempotency identification value is a duplicate across a recent history of idempotency identifications in Citi's database. - If you don't receive any response (HTTP status 2XX, 4XX or 5XX) from Citi to your POST request and you wish to retry, reinitiate your request with the same idempotency identification to prevent accidental duplicate payment.

### Body (application/json)

This endpoint expects a Refunds-Initiation.

- `end_to_end_id` (string, required) — Specifies a character string with a maximum length of 35 characters limited to character set X, that is, a-z A-Z / - ? : ( ) . , ‘ + . - If client_id + end_to_end_id combination is duplicate within 90 days, payment will be rejected - Thailand Max length 12 - United State Max length 35 - IN IMPS Max length 16 - UK FPS Max length is 18 - Brazil Max length is 35 - IN UPI Max length 16 - For US WIRE/ACH, Max length is 16 and allowed value is AlphaNumeric (A-Z and 0-9) - For SEPA and SEPA IDP Max length is 35 - Japan Max length 35. It allows only upper alphabet characters A-Z and accepts special characters as follows . , () -
- `instructed_amount` (double, required) — Instructed amount can be either full original transaction amount or partial amount - Thailand PromptPay - Maximum amount is 2000000.00 - United States - Maximum amount is 1000000.00
- `instructed_currency` (enum, required) — ISO 4217 code for the transaction instructed amount currency
  - Allowed values: `THB`, `BRL`, `USD`, `EUR`, `AUD`
- `original_payment` (Original-Payment, required) — Either populate uetr OR (end_to_end_id AND value_date) for the refund to be processed
- `instruction_id` (string, optional) — Instruction id on return payment - For Thailand PromptPay refunds.instruction_id field is not applicable - For Brazil refunds.instruction_id field is not applicable - For United States refunds.instruction_id field is optional - For SEPA refunds.instruction_id field is not applicable
- `value_date` (date, optional) — Date in local time zone (e.g., EST for a United States RTP network transaction) when Citi's transaction processing application starts processing a transaction - Format YYYY-MM-DD
- `additional_info` (string, optional) — Additional or remittance information - For Thailand PromptPay - Maximum length is 40 - For United States refunds.additional_info field is not applicable - For Brazil refunds.additional_info field is optional - For SEPA, refunds.additional_info field is not applicable
- `unstructured_remittance_info` (list of string, optional) — Unstructured remitance information - For TH refunds.unstructured_remittance_info field is not applicable - For US refunds.unstructured_remittance_info field is optional - Maximum length is 140 and single instance is allowed - For Brazil refunds.unstructured_remittance_info field is not applicable - For SEPA refunds.unstructured_remittance_info field is optional - Maximum length is 140 and single instance is allowed
- `return_reason_code` (enum, optional) — Reason code to initiate the refund - For TH refunds.return_reason_code field is not applicable - For US refunds.return_reason_code field is not applicable - For Brazil refunds.return_reason_code field is not applicable - For SEPA refunds.return_reason_code field is mandatory - For AU, applicable retun reason codes are AM05, AM09, BE05, CUST, FOCR, MD05, NARR - BE05 -Beneficiary does not recognize the remitter. - AC01 -Remitter sent the transaction to the wrong account. - AM02 -Transaction amount is higher than expected. - AM06 -Transaction amount is lower than expected. - AM03 -Transaction currency is incorrect. - AG01 -Transaction information is insufficient for reconciliation. - AM05 -Transaction is a duplicate. - MS01 -Other - AM09 -Transaction amount is wrong. - CUST -Requested by customer. - FOCR -Following cancellation request. - MD05 -Collection not due. - NARR -Narrative from client.
  - Allowed values: `AC01`, `AM02`, `AM03`, `AM05`, `AM06`, `AG01`, `MS01`, `AM09`, `CUST`, `FOCR`, `MD05`, `NARR`
- `return_reason_description` (string, optional) — Reason description to initiate the refund - For AU, return reason description is mandatory if return reason code is NARR
- `debtor` (Debtor-Refund, optional)
- `ultimate_debtor` (Ultimate-Debtor-Refund, optional)

## Response

### 202

Accepted

- `end_to_end_id` (string, required) — Specifies a character string with a maximum length of 35 characters limited to character set X, that is, a-z A-Z / - ? : ( ) . , ‘ + . - If client_id + end_to_end_id combination is duplicate within 90 days, payment will be rejected - Thailand Max length 12 - United State Max length 35 - IN IMPS Max length 16 - UK FPS Max length is 18 - Brazil Max length is 35 - IN UPI Max length 16 - For US WIRE/ACH, Max length is 16 and allowed value is AlphaNumeric (A-Z and 0-9) - For SEPA and SEPA IDP Max length is 35 - Japan Max length 35. It allows only upper alphabet characters A-Z and accepts special characters as follows . , () -
- `instructed_amount` (double, required) — Instructed amount can be either full original transaction amount or partial amount - Thailand PromptPay - Maximum amount is 2000000.00 - United States - Maximum amount is 1000000.00
- `instructed_currency` (enum, required) — ISO 4217 code for the transaction instructed amount currency
  - Allowed values: `THB`, `BRL`, `USD`, `EUR`, `AUD`
- `original_payment` (Original-Payment, required) — Either populate uetr OR (end_to_end_id AND value_date) for the refund to be processed
- `instruction_id` (string, optional) — Instruction id on return payment - For Thailand PromptPay refunds.instruction_id field is not applicable - For Brazil refunds.instruction_id field is not applicable - For United States refunds.instruction_id field is optional - For SEPA refunds.instruction_id field is not applicable
- `refund_id` (string, optional) — UUID v4 format unique end-to-end transaction reference
- `creation_date_time` (datetime, optional) — GMT (ISO 8601 YYYY-MM-DDTHH:MM:SS.sssZ)- Instant Payment (Debit) - Date time, generated by CitiConnect API, when CitiConnect API accepted a payment initiation after validation - Instant Payment (Credit) - Date time, either provided by the debtor bank or generated by Citi's transaction processing application, when a transaction was created
- `network_id` (string, optional) — Transaction identification generated by the network (clearing) - For Thailand PromptPay refunds.network_id field is not applicable - For Brazil refunds.network_id field is optional - For United States refunds.network_id field is not applicable - For SEPA refunds.network_id field is not applicable
- `value_date` (date, optional) — Date in local time zone (e.g., EST for a United States RTP network transaction) when Citi's transaction processing application starts processing a transaction - Format YYYY-MM-DD
- `additional_info` (string, optional) — Additional or remittance information - For Thailand PromptPay - Maximum length is 40 - For United States refunds.additional_info field is not applicable - For Brazil refunds.additional_info field is optional - For SEPA refunds.additional_info field is not applicable
- `unstructured_remittance_info` (list of string, optional) — Unstructured remitance information - For TH refunds.unstructured_remittance_info field is not applicable - For US refunds.unstructured_remittance_info field is optional - Maximum length is 140 and single instance is allowed - For Brazil refunds.unstructured_remittance_info field is not applicable - For SEPA refunds.unstructured_remittance_info field is optional - Maximum length is 140 and single instance is allowed
- `return_reason_code` (enum, optional) — Reason code to initiate the refund - For TH refunds.return_reason_code field is not applicable - For US refunds.return_reason_code field is not applicable - For Brazil refunds.return_reason_code field is not applicable - For SEPA refunds.return_reason_code field is mandatory - For AU, applicable retun reason codes are AM05, AM09, BE05, CUST, FOCR, MD05, NARR - BE05 -Beneficiary does not recognize the remitter. - AC01 -Remitter sent the transaction to the wrong account. - AM02 -Transaction amount is higher than expected. - AM06 -Transaction amount is lower than expected. - AM03 -Transaction currency is incorrect. - AG01 -Transaction information is insufficient for reconciliation. - AM05 -Transaction is a duplicate. - MS01 -Other. - AM09 -Transaction amount is wrong. - CUST -Requested by customer. - FOCR -Following cancellation request. - MD05 -Collection not due. - NARR -Narrative from client
  - Allowed values: `BE05`, `AC01`, `AM02`, `AM03`, `AM05`, `AM06`, `AG01`, `MS01`, `AM09`, `CUST`, `FOCR`, `MD05`, `NARR`
- `return_reason_description` (string, optional) — Reason description to initiate the refund - For AU, return reason description is mandatory if return reason code is NARR
- `status` (Refund-Status, optional)
- `reasons` (list of Reason, optional)
- `debtor` (Debtor-Refund, optional)
- `ultimate_debtor` (Ultimate-Debtor-Refund, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `ref_id` (string, optional) — Unique ID for the Transaction
- `error_details` (list of Error-Detail, optional)

### 401 Unauthorized Error

Unauthorized

- `ref_id` (string, optional) — Unique ID for the Transaction
- `error_details` (list of Error-Detail, optional)

### 404 Not Found Error

Not Found

- `ref_id` (string, optional) — Unique ID for the Transaction
- `error_details` (list of Error-Detail, optional)

### 405 Method Not Allowed Error

Method Not Allowed

- `ref_id` (string, optional) — Unique ID for the Transaction
- `error_details` (list of Error-Detail, optional)

### 409 Conflict Error

Conflict

- `ref_id` (string, optional) — Unique ID for the Transaction
- `error_details` (list of Error-Detail, optional)

### 415 Unsupported Media Type Error

Unsupported Media Type

- `ref_id` (string, optional) — Unique ID for the Transaction
- `error_details` (list of Error-Detail, optional)

### 500 Internal Server Error

Internal Server Error

- `ref_id` (string, optional) — Unique ID for the Transaction
- `error_details` (list of Error-Detail, optional)

## Types

### Original-Payment

Either populate uetr OR (end_to_end_id AND value_date) for the refund to be processed

- `end_to_end_id` (string, optional) — Specifies a character string with a maximum length of 35 characters limited to character set X, that is, a-z A-Z / - ? : ( ) . , ‘ + . - If client_id + end_to_end_id combination is duplicate within 90 days, payment will be rejected - Thailand Max length 12 - United State Max length 35 - IN IMPS Max length 16 - UK FPS Max length is 18 - Brazil Max length is 35 - IN UPI Max length 16 - For US WIRE/ACH, Max length is 16 and allowed value is AlphaNumeric (A-Z and 0-9) - For SEPA and SEPA IDP Max length is 35 - Japan Max length 35. It allows only upper alphabet characters A-Z and accepts special characters as follows . , () -
- `uetr` (string, optional) — UUID v4 format unique end-to-end transaction reference
- `value_date` (date, optional) — Format YYYY-MM-DD Date in local time zone (e.g., EST for a United States RTP network transaction) when Citi's transaction processing application starts processing a transaction
- `instructed_amount` (double, optional) — Instructed amount - Thailand PromptPay - Maximum amount is 2000000.00 - United States - Maximum amount is 1000000.00 - SEPA - Maximum amount is 1000000.00
- `instructed_currency` (enum, optional) — ISO 4217 code for the transaction instructed amount currency
  - Allowed values: `THB`, `USD`, `BRL`, `EUR`

### Debtor-Refund

- `name` (string, optional) — Name of Debtor to be passed for Refund payment - For United States debtor.name field is mandatory for decision code IPAY and PECR - For Thailand debtor.name field is not applicable - For Brazil debtor.name field is not applicable - For SEPA debtor.name field is not applicable
- `street_name` (string, optional) — Street Name of Debtor to be passed for Refund payment - For United States debtor.street_name field is optional - For Thailand debtor.street_name field is not applicable - For Brazil debtor.street_name field is not applicable - For SEPA debtor.street_name field is not applicable
- `building_number` (string, optional) — Building number of Debtor to be passed for Refund payment - For United States debtor.building_number field is optional - For Thailand debtor.building_number field is not applicable - For Brazil debtor.building_number field is not applicable - For SEPA debtor.building_number field is not applicable
- `postal_code` (string, optional) — Postal code of Debtor to be passed for Refund payment - For United States debtor.postal_code field is optional - For Thailand debtor.postal_code field is not applicable - For Brazil debtor.postal_code field is not applicable - For SEPA debtor.postal_code field is not applicable
- `city` (string, optional) — City of Debtor to be passed for Refund payment - For United States debtor.city field is optional - For Thailand debtor.city field is not applicable - For Brazil debtor.city field is not applicable - For SEPA debtor.city field is not applicable
- `state` (string, optional) — State of Debtor to be passed for Refund payment - For United States debtor.state field is optional - For Thailand debtor.state field is not applicable - For Brazil debtor.state field is not applicable - For SEPA debtor.state field is not applicable
- `country` (string, optional) — Country of Debtor to be passed for Refund payment - For United States debtor.country field is optional - For Thailand debtor.country field is not applicable - For Brazil debtor.country field is not applicable - For SEPA debtor.country field is not applicable
- `address_lines` (list of string, optional) — Debtor Address lines which is array of 7 lines and each line has maximum 70 characters which is to be passed for Refund payment - For United States debtor.address_lines field is optional - For Thailand debtor.address_lines field is not applicable - For Brazil debtor.address_lines field is not applicable - For SEPA debtor.address_lines field is not applicable

### Ultimate-Debtor-Refund

- `name` (string, optional) — Name of Ultimate Debtor to be passed for Refund payment - For United States ultimate_debtor.name field is optional - For Thailand ultimatedebtor.name field is not applicable - For Brazil ultimatedebtor.name field is not applicable - For SEPA ultimate_debtor.name field is not applicable
- `street_name` (string, optional) — Street Name of Ultimate Debtor to be passed for Refund payment - For United States ultimate_debtor.street_name field is optional - For Thailand ultimatedebtor.street_name field is not applicable - For Brazil ultimatedebtor.street_name field is not applicable - For SEPA ultimate_debtor.street_name field is not applicable
- `building_number` (string, optional) — Building number of Ultimate Debtor to be passed for Refund payment - For United States ultimate_debtor.building_number field is optional - For Thailand ultimatedebtor.building_number field is not applicable - For Brazil ultimatedebtor.building_number field is not applicable - For SEPA ultimate_debtor.building_number field is not applicable
- `postal_code` (string, optional) — Postal code of Ultimate Debtor to be passed for Refund payment - For United States ultimate_debtor.postal_code field is optional - For Thailand ultimatedebtor.postal_code field is not applicable - For Brazil ultimatedebtor.postal_code field is not applicable - For SEPA ultimate_debtor.postal_code field is not applicable
- `city` (string, optional) — City of Ultimate Debtor to be passed for Refund payment - For United States ultimate_debtor.city field is optional - For Thailand ultimatedebtor.city field is not applicable - For Brazil ultimatedebtor.city field is not applicable - For SEPA ultimate_debtor.city field is not applicable
- `state` (string, optional) — State of Ultimate Debtor to be passed for Refund payment - For United States ultimate_debtor.state field is optional - For Thailand ultimatedebtor.state field is not applicable - For Brazil ultimatedebtor.state field is not applicable - For SEPA ultimate_debtor.state field is not applicable
- `country` (string, optional) — Country of Ultimate Debtor to be passed for Refund payment - For United States ultimate_debtor.country field is optional - For Thailand ultimatedebtor.country field is not applicable - For Brazil ultimatedebtor.country field is not applicable - For SEPA ultimate_debtor.country field is not applicable
- `address_lines` (list of string, optional) — Ultimate Debtor Address lines which is array of 7 lines and each line has maximum 70 characters which is to be passed for Refund payment - For United States ultimate_debtor.address_lines field is optional - For Thailand ultimatedebtor.address_lines field is not applicable - For Brazil ultimatedebtor.address_lines field is not applicable - For SEPA ultimate_debtor.address_lines field is not applicable

### Refund-Status

- `date_time` (datetime, required) — GMT (ISO 8601 YYYY-MM-DDTHH:MM:SS.sssZ) - Date time of transaction status
- `code` (enum, required) — ISO 20022 transaction status code
  - Allowed values: `ACCC`, `ACTC`, `RJCT`
- `description` (string, required) — Status code description - ACTC - Accepted - ACCC - Completed - RJCT - Rejected
- `type` (enum, optional) — Refund Status P - Partial Refund F - Full Refund
  - Allowed values: `P`, `F`

### Reason

- `code` (string, optional) — Reason codes (e.g., AM03,AM02,AC02,CH03,CH04,CH20,CH21,BE23,NARR and etc.) - refer to validation_code_description excel file for complete list of response codes and descriptions
- `description` (string, optional) — Reason code description (e.g., - AM03 -Method instructed currency is invalid (not in ISO 4217 format or value) - AM02 -Instructed amount is not ≥ 0.01 & ≤ 2,000,000.00. - AC02 -Debtor account is invalid - CH03 -Value date is in the future - CH04 -Value date is in the past - CH20 -Value-added tax (VAT) amount format is invalid - CH21 -Bill identification 1 is mandatory for a bill payment,Bill identification 2 and 3 are conditional for a bill payment - BE23 -Creditor mobile number (proxy identification) format is invalid - NARR -Creditor name maximum length is 50 ) - refer to validation_code_description excel file for complete list of response codes and descriptions
- `non_iso_code` (string, optional) — Reason local Clearing codes (e.g.0000,0080,0081,0082,0083,0084,1100 and etc.).Additional status code received from the local clearing which does not follow ISO standards but will on some occasions provide additional insights. Codes will vary by country (where applicable) and will be published on our developer portal - For UK it is an optional field with max length 4 - For SEPA IDP it is an optional field - For US, this field is optional - For SEPA, it is an optional field

### Error-Detail

- `issue` (string, optional) — more details about the issue
- `action` (string, optional) — corrective action to be taken to resolve above issue
- `code` (string, optional) — unique code representing the issue

## Examples

### OK

**Response**

```json
{
  "end_to_end_id": "r/434SKtUcdGQ",
  "instructed_amount": 29876.98,
  "instructed_currency": "THB",
  "original_payment": {
    "end_to_end_id": "r/434SKtUcdGQ",
    "uetr": "4f09214d-296c-494b-8e9c-810bf1d9fc93",
    "value_date": "2022-09-13"
  },
  "refund_id": "4f09214d-296c-494b-8e9c-810bf1d9fc93",
  "additional_info": "Text",
  "status": {
    "date_time": "2022-09-13T08:23:49.112Z",
    "code": "ACTC",
    "description": "Accepted"
  }
}
```

**SDK Code**

```python OK
import requests

url = "https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds"

querystring = {"client_id":"6d3cf821-db6d-496d-bec0-064a362e9c31"}

headers = {
    "Idempotency-Id": "a44cbb60-6de4-4edb-9a7a-123414bba3bb",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, headers=headers, params=querystring)

print(response.json())
```

```javascript OK
const url = 'https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31';
const options = {
  method: 'POST',
  headers: {
    'Idempotency-Id': 'a44cbb60-6de4-4edb-9a7a-123414bba3bb',
    Authorization: 'Bearer <token>'
  }
};

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

```go OK
package main

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

func main() {

	url := "https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31"

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

	req.Header.Add("Idempotency-Id", "a44cbb60-6de4-4edb-9a7a-123414bba3bb")
	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 OK
require 'uri'
require 'net/http'

url = URI("https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31")

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

request = Net::HTTP::Post.new(url)
request["Idempotency-Id"] = 'a44cbb60-6de4-4edb-9a7a-123414bba3bb'
request["Authorization"] = 'Bearer <token>'

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

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

HttpResponse<String> response = Unirest.post("https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31")
  .header("Idempotency-Id", "a44cbb60-6de4-4edb-9a7a-123414bba3bb")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Idempotency-Id' => 'a44cbb60-6de4-4edb-9a7a-123414bba3bb',
  ],
]);

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

```csharp OK
using RestSharp;

var client = new RestClient("https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31");
var request = new RestRequest(Method.POST);
request.AddHeader("Idempotency-Id", "a44cbb60-6de4-4edb-9a7a-123414bba3bb");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift OK
import Foundation

let headers = [
  "Idempotency-Id": "a44cbb60-6de4-4edb-9a7a-123414bba3bb",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```

### TH Refund Transfer

**Request**

```json
{
  "end_to_end_id": "r/434SKtUcdGQ",
  "instructed_amount": 2987.96,
  "instructed_currency": "THB",
  "original_payment": {
    "end_to_end_id": "r/434SKtUcdGQ",
    "value_date": "2022-09-13"
  },
  "additional_info": "Text"
}
```

**Response**

```json
{
  "end_to_end_id": "r/434SKtUcdGQ",
  "instructed_amount": 29876.98,
  "instructed_currency": "THB",
  "original_payment": {
    "end_to_end_id": "r/434SKtUcdGQ",
    "uetr": "4f09214d-296c-494b-8e9c-810bf1d9fc93",
    "value_date": "2022-09-13"
  },
  "refund_id": "4f09214d-296c-494b-8e9c-810bf1d9fc93",
  "additional_info": "Text",
  "status": {
    "date_time": "2022-09-13T08:23:49.112Z",
    "code": "ACTC",
    "description": "Accepted"
  }
}
```

**SDK Code**

```python TH Refund Transfer
import requests

url = "https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds"

querystring = {"client_id":"6d3cf821-db6d-496d-bec0-064a362e9c31"}

payload = {
    "end_to_end_id": "r/434SKtUcdGQ",
    "instructed_amount": 2987.96,
    "instructed_currency": "THB",
    "original_payment": {
        "end_to_end_id": "r/434SKtUcdGQ",
        "value_date": "2022-09-13"
    },
    "additional_info": "Text"
}
headers = {
    "Idempotency-Id": "a44cbb60-6de4-4edb-9a7a-123414bba3bb",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript TH Refund Transfer
const url = 'https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31';
const options = {
  method: 'POST',
  headers: {
    'Idempotency-Id': 'a44cbb60-6de4-4edb-9a7a-123414bba3bb',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"end_to_end_id":"r/434SKtUcdGQ","instructed_amount":2987.96,"instructed_currency":"THB","original_payment":{"end_to_end_id":"r/434SKtUcdGQ","value_date":"2022-09-13"},"additional_info":"Text"}'
};

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

```go TH Refund Transfer
package main

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

func main() {

	url := "https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31"

	payload := strings.NewReader("{\n  \"end_to_end_id\": \"r/434SKtUcdGQ\",\n  \"instructed_amount\": 2987.96,\n  \"instructed_currency\": \"THB\",\n  \"original_payment\": {\n    \"end_to_end_id\": \"r/434SKtUcdGQ\",\n    \"value_date\": \"2022-09-13\"\n  },\n  \"additional_info\": \"Text\"\n}")

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

	req.Header.Add("Idempotency-Id", "a44cbb60-6de4-4edb-9a7a-123414bba3bb")
	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 TH Refund Transfer
require 'uri'
require 'net/http'

url = URI("https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31")

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

request = Net::HTTP::Post.new(url)
request["Idempotency-Id"] = 'a44cbb60-6de4-4edb-9a7a-123414bba3bb'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"end_to_end_id\": \"r/434SKtUcdGQ\",\n  \"instructed_amount\": 2987.96,\n  \"instructed_currency\": \"THB\",\n  \"original_payment\": {\n    \"end_to_end_id\": \"r/434SKtUcdGQ\",\n    \"value_date\": \"2022-09-13\"\n  },\n  \"additional_info\": \"Text\"\n}"

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

```java TH Refund Transfer
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31")
  .header("Idempotency-Id", "a44cbb60-6de4-4edb-9a7a-123414bba3bb")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"end_to_end_id\": \"r/434SKtUcdGQ\",\n  \"instructed_amount\": 2987.96,\n  \"instructed_currency\": \"THB\",\n  \"original_payment\": {\n    \"end_to_end_id\": \"r/434SKtUcdGQ\",\n    \"value_date\": \"2022-09-13\"\n  },\n  \"additional_info\": \"Text\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31', [
  'body' => '{
  "end_to_end_id": "r/434SKtUcdGQ",
  "instructed_amount": 2987.96,
  "instructed_currency": "THB",
  "original_payment": {
    "end_to_end_id": "r/434SKtUcdGQ",
    "value_date": "2022-09-13"
  },
  "additional_info": "Text"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'Idempotency-Id' => 'a44cbb60-6de4-4edb-9a7a-123414bba3bb',
  ],
]);

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

```csharp TH Refund Transfer
using RestSharp;

var client = new RestClient("https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31");
var request = new RestRequest(Method.POST);
request.AddHeader("Idempotency-Id", "a44cbb60-6de4-4edb-9a7a-123414bba3bb");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"end_to_end_id\": \"r/434SKtUcdGQ\",\n  \"instructed_amount\": 2987.96,\n  \"instructed_currency\": \"THB\",\n  \"original_payment\": {\n    \"end_to_end_id\": \"r/434SKtUcdGQ\",\n    \"value_date\": \"2022-09-13\"\n  },\n  \"additional_info\": \"Text\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift TH Refund Transfer
import Foundation

let headers = [
  "Idempotency-Id": "a44cbb60-6de4-4edb-9a7a-123414bba3bb",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "end_to_end_id": "r/434SKtUcdGQ",
  "instructed_amount": 2987.96,
  "instructed_currency": "THB",
  "original_payment": [
    "end_to_end_id": "r/434SKtUcdGQ",
    "value_date": "2022-09-13"
  ],
  "additional_info": "Text"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31")! 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()
```

### BR Refund Transfer

**Request**

```json
{
  "end_to_end_id": "r/434SKtUcd77",
  "instructed_amount": 100.01,
  "instructed_currency": "BRL",
  "original_payment": {
    "end_to_end_id": "r/434SKtUaaGQ",
    "value_date": "2023-10-01"
  },
  "additional_info": "Refund Request"
}
```

**Response**

```json
{
  "end_to_end_id": "r/434SKtUcdGQ",
  "instructed_amount": 29876.98,
  "instructed_currency": "THB",
  "original_payment": {
    "end_to_end_id": "r/434SKtUcdGQ",
    "uetr": "4f09214d-296c-494b-8e9c-810bf1d9fc93",
    "value_date": "2022-09-13"
  },
  "refund_id": "4f09214d-296c-494b-8e9c-810bf1d9fc93",
  "additional_info": "Text",
  "status": {
    "date_time": "2022-09-13T08:23:49.112Z",
    "code": "ACTC",
    "description": "Accepted"
  }
}
```

**SDK Code**

```python BR Refund Transfer
import requests

url = "https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds"

querystring = {"client_id":"6d3cf821-db6d-496d-bec0-064a362e9c31"}

payload = {
    "end_to_end_id": "r/434SKtUcd77",
    "instructed_amount": 100.01,
    "instructed_currency": "BRL",
    "original_payment": {
        "end_to_end_id": "r/434SKtUaaGQ",
        "value_date": "2023-10-01"
    },
    "additional_info": "Refund Request"
}
headers = {
    "Idempotency-Id": "a44cbb60-6de4-4edb-9a7a-123414bba3bb",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript BR Refund Transfer
const url = 'https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31';
const options = {
  method: 'POST',
  headers: {
    'Idempotency-Id': 'a44cbb60-6de4-4edb-9a7a-123414bba3bb',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"end_to_end_id":"r/434SKtUcd77","instructed_amount":100.01,"instructed_currency":"BRL","original_payment":{"end_to_end_id":"r/434SKtUaaGQ","value_date":"2023-10-01"},"additional_info":"Refund Request"}'
};

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

```go BR Refund Transfer
package main

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

func main() {

	url := "https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31"

	payload := strings.NewReader("{\n  \"end_to_end_id\": \"r/434SKtUcd77\",\n  \"instructed_amount\": 100.01,\n  \"instructed_currency\": \"BRL\",\n  \"original_payment\": {\n    \"end_to_end_id\": \"r/434SKtUaaGQ\",\n    \"value_date\": \"2023-10-01\"\n  },\n  \"additional_info\": \"Refund Request\"\n}")

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

	req.Header.Add("Idempotency-Id", "a44cbb60-6de4-4edb-9a7a-123414bba3bb")
	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 BR Refund Transfer
require 'uri'
require 'net/http'

url = URI("https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31")

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

request = Net::HTTP::Post.new(url)
request["Idempotency-Id"] = 'a44cbb60-6de4-4edb-9a7a-123414bba3bb'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"end_to_end_id\": \"r/434SKtUcd77\",\n  \"instructed_amount\": 100.01,\n  \"instructed_currency\": \"BRL\",\n  \"original_payment\": {\n    \"end_to_end_id\": \"r/434SKtUaaGQ\",\n    \"value_date\": \"2023-10-01\"\n  },\n  \"additional_info\": \"Refund Request\"\n}"

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

```java BR Refund Transfer
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31")
  .header("Idempotency-Id", "a44cbb60-6de4-4edb-9a7a-123414bba3bb")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"end_to_end_id\": \"r/434SKtUcd77\",\n  \"instructed_amount\": 100.01,\n  \"instructed_currency\": \"BRL\",\n  \"original_payment\": {\n    \"end_to_end_id\": \"r/434SKtUaaGQ\",\n    \"value_date\": \"2023-10-01\"\n  },\n  \"additional_info\": \"Refund Request\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31', [
  'body' => '{
  "end_to_end_id": "r/434SKtUcd77",
  "instructed_amount": 100.01,
  "instructed_currency": "BRL",
  "original_payment": {
    "end_to_end_id": "r/434SKtUaaGQ",
    "value_date": "2023-10-01"
  },
  "additional_info": "Refund Request"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'Idempotency-Id' => 'a44cbb60-6de4-4edb-9a7a-123414bba3bb',
  ],
]);

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

```csharp BR Refund Transfer
using RestSharp;

var client = new RestClient("https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31");
var request = new RestRequest(Method.POST);
request.AddHeader("Idempotency-Id", "a44cbb60-6de4-4edb-9a7a-123414bba3bb");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"end_to_end_id\": \"r/434SKtUcd77\",\n  \"instructed_amount\": 100.01,\n  \"instructed_currency\": \"BRL\",\n  \"original_payment\": {\n    \"end_to_end_id\": \"r/434SKtUaaGQ\",\n    \"value_date\": \"2023-10-01\"\n  },\n  \"additional_info\": \"Refund Request\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift BR Refund Transfer
import Foundation

let headers = [
  "Idempotency-Id": "a44cbb60-6de4-4edb-9a7a-123414bba3bb",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "end_to_end_id": "r/434SKtUcd77",
  "instructed_amount": 100.01,
  "instructed_currency": "BRL",
  "original_payment": [
    "end_to_end_id": "r/434SKtUaaGQ",
    "value_date": "2023-10-01"
  ],
  "additional_info": "Refund Request"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31")! 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()
```

### US Refund Transfer

**Request**

```json
{
  "end_to_end_id": "r/434SKtUcd01",
  "instructed_amount": 200.01,
  "instructed_currency": "USD",
  "original_payment": {
    "end_to_end_id": "r/434SKtUaaGQ",
    "value_date": "2023-11-01"
  },
  "instruction_id": "1245hgfdartyu1",
  "debtor": {
    "name": "JOHN",
    "street_name": "street",
    "building_number": "No16",
    "postal_code": "102546",
    "city": "New Jer",
    "state": "New Town",
    "country": "US"
  },
  "ultimate_debtor": {
    "street_name": "street",
    "postal_code": "102546",
    "city": "New Jer",
    "state": "New Town",
    "country": "US"
  }
}
```

**Response**

```json
{
  "end_to_end_id": "r/434SKtUcdGQ",
  "instructed_amount": 29876.98,
  "instructed_currency": "THB",
  "original_payment": {
    "end_to_end_id": "r/434SKtUcdGQ",
    "uetr": "4f09214d-296c-494b-8e9c-810bf1d9fc93",
    "value_date": "2022-09-13"
  },
  "refund_id": "4f09214d-296c-494b-8e9c-810bf1d9fc93",
  "additional_info": "Text",
  "status": {
    "date_time": "2022-09-13T08:23:49.112Z",
    "code": "ACTC",
    "description": "Accepted"
  }
}
```

**SDK Code**

```python US Refund Transfer
import requests

url = "https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds"

querystring = {"client_id":"6d3cf821-db6d-496d-bec0-064a362e9c31"}

payload = {
    "end_to_end_id": "r/434SKtUcd01",
    "instructed_amount": 200.01,
    "instructed_currency": "USD",
    "original_payment": {
        "end_to_end_id": "r/434SKtUaaGQ",
        "value_date": "2023-11-01"
    },
    "instruction_id": "1245hgfdartyu1",
    "debtor": {
        "name": "JOHN",
        "street_name": "street",
        "building_number": "No16",
        "postal_code": "102546",
        "city": "New Jer",
        "state": "New Town",
        "country": "US"
    },
    "ultimate_debtor": {
        "street_name": "street",
        "postal_code": "102546",
        "city": "New Jer",
        "state": "New Town",
        "country": "US"
    }
}
headers = {
    "Idempotency-Id": "a44cbb60-6de4-4edb-9a7a-123414bba3bb",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript US Refund Transfer
const url = 'https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31';
const options = {
  method: 'POST',
  headers: {
    'Idempotency-Id': 'a44cbb60-6de4-4edb-9a7a-123414bba3bb',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"end_to_end_id":"r/434SKtUcd01","instructed_amount":200.01,"instructed_currency":"USD","original_payment":{"end_to_end_id":"r/434SKtUaaGQ","value_date":"2023-11-01"},"instruction_id":"1245hgfdartyu1","debtor":{"name":"JOHN","street_name":"street","building_number":"No16","postal_code":"102546","city":"New Jer","state":"New Town","country":"US"},"ultimate_debtor":{"street_name":"street","postal_code":"102546","city":"New Jer","state":"New Town","country":"US"}}'
};

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

```go US Refund Transfer
package main

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

func main() {

	url := "https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31"

	payload := strings.NewReader("{\n  \"end_to_end_id\": \"r/434SKtUcd01\",\n  \"instructed_amount\": 200.01,\n  \"instructed_currency\": \"USD\",\n  \"original_payment\": {\n    \"end_to_end_id\": \"r/434SKtUaaGQ\",\n    \"value_date\": \"2023-11-01\"\n  },\n  \"instruction_id\": \"1245hgfdartyu1\",\n  \"debtor\": {\n    \"name\": \"JOHN\",\n    \"street_name\": \"street\",\n    \"building_number\": \"No16\",\n    \"postal_code\": \"102546\",\n    \"city\": \"New Jer\",\n    \"state\": \"New Town\",\n    \"country\": \"US\"\n  },\n  \"ultimate_debtor\": {\n    \"street_name\": \"street\",\n    \"postal_code\": \"102546\",\n    \"city\": \"New Jer\",\n    \"state\": \"New Town\",\n    \"country\": \"US\"\n  }\n}")

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

	req.Header.Add("Idempotency-Id", "a44cbb60-6de4-4edb-9a7a-123414bba3bb")
	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 US Refund Transfer
require 'uri'
require 'net/http'

url = URI("https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31")

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

request = Net::HTTP::Post.new(url)
request["Idempotency-Id"] = 'a44cbb60-6de4-4edb-9a7a-123414bba3bb'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"end_to_end_id\": \"r/434SKtUcd01\",\n  \"instructed_amount\": 200.01,\n  \"instructed_currency\": \"USD\",\n  \"original_payment\": {\n    \"end_to_end_id\": \"r/434SKtUaaGQ\",\n    \"value_date\": \"2023-11-01\"\n  },\n  \"instruction_id\": \"1245hgfdartyu1\",\n  \"debtor\": {\n    \"name\": \"JOHN\",\n    \"street_name\": \"street\",\n    \"building_number\": \"No16\",\n    \"postal_code\": \"102546\",\n    \"city\": \"New Jer\",\n    \"state\": \"New Town\",\n    \"country\": \"US\"\n  },\n  \"ultimate_debtor\": {\n    \"street_name\": \"street\",\n    \"postal_code\": \"102546\",\n    \"city\": \"New Jer\",\n    \"state\": \"New Town\",\n    \"country\": \"US\"\n  }\n}"

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

```java US Refund Transfer
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31")
  .header("Idempotency-Id", "a44cbb60-6de4-4edb-9a7a-123414bba3bb")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"end_to_end_id\": \"r/434SKtUcd01\",\n  \"instructed_amount\": 200.01,\n  \"instructed_currency\": \"USD\",\n  \"original_payment\": {\n    \"end_to_end_id\": \"r/434SKtUaaGQ\",\n    \"value_date\": \"2023-11-01\"\n  },\n  \"instruction_id\": \"1245hgfdartyu1\",\n  \"debtor\": {\n    \"name\": \"JOHN\",\n    \"street_name\": \"street\",\n    \"building_number\": \"No16\",\n    \"postal_code\": \"102546\",\n    \"city\": \"New Jer\",\n    \"state\": \"New Town\",\n    \"country\": \"US\"\n  },\n  \"ultimate_debtor\": {\n    \"street_name\": \"street\",\n    \"postal_code\": \"102546\",\n    \"city\": \"New Jer\",\n    \"state\": \"New Town\",\n    \"country\": \"US\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31', [
  'body' => '{
  "end_to_end_id": "r/434SKtUcd01",
  "instructed_amount": 200.01,
  "instructed_currency": "USD",
  "original_payment": {
    "end_to_end_id": "r/434SKtUaaGQ",
    "value_date": "2023-11-01"
  },
  "instruction_id": "1245hgfdartyu1",
  "debtor": {
    "name": "JOHN",
    "street_name": "street",
    "building_number": "No16",
    "postal_code": "102546",
    "city": "New Jer",
    "state": "New Town",
    "country": "US"
  },
  "ultimate_debtor": {
    "street_name": "street",
    "postal_code": "102546",
    "city": "New Jer",
    "state": "New Town",
    "country": "US"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'Idempotency-Id' => 'a44cbb60-6de4-4edb-9a7a-123414bba3bb',
  ],
]);

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

```csharp US Refund Transfer
using RestSharp;

var client = new RestClient("https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31");
var request = new RestRequest(Method.POST);
request.AddHeader("Idempotency-Id", "a44cbb60-6de4-4edb-9a7a-123414bba3bb");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"end_to_end_id\": \"r/434SKtUcd01\",\n  \"instructed_amount\": 200.01,\n  \"instructed_currency\": \"USD\",\n  \"original_payment\": {\n    \"end_to_end_id\": \"r/434SKtUaaGQ\",\n    \"value_date\": \"2023-11-01\"\n  },\n  \"instruction_id\": \"1245hgfdartyu1\",\n  \"debtor\": {\n    \"name\": \"JOHN\",\n    \"street_name\": \"street\",\n    \"building_number\": \"No16\",\n    \"postal_code\": \"102546\",\n    \"city\": \"New Jer\",\n    \"state\": \"New Town\",\n    \"country\": \"US\"\n  },\n  \"ultimate_debtor\": {\n    \"street_name\": \"street\",\n    \"postal_code\": \"102546\",\n    \"city\": \"New Jer\",\n    \"state\": \"New Town\",\n    \"country\": \"US\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift US Refund Transfer
import Foundation

let headers = [
  "Idempotency-Id": "a44cbb60-6de4-4edb-9a7a-123414bba3bb",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "end_to_end_id": "r/434SKtUcd01",
  "instructed_amount": 200.01,
  "instructed_currency": "USD",
  "original_payment": [
    "end_to_end_id": "r/434SKtUaaGQ",
    "value_date": "2023-11-01"
  ],
  "instruction_id": "1245hgfdartyu1",
  "debtor": [
    "name": "JOHN",
    "street_name": "street",
    "building_number": "No16",
    "postal_code": "102546",
    "city": "New Jer",
    "state": "New Town",
    "country": "US"
  ],
  "ultimate_debtor": [
    "street_name": "street",
    "postal_code": "102546",
    "city": "New Jer",
    "state": "New Town",
    "country": "US"
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31")! 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()
```

### SEPA Refund Transfer

**Request**

```json
{
  "end_to_end_id": "r/434SKtUcd01",
  "instructed_amount": 200.01,
  "instructed_currency": "EUR",
  "original_payment": {
    "end_to_end_id": "r/434SKtUaaGQ",
    "value_date": "2023-11-01"
  },
  "unstructured_remittance_info": [
    "More details of refund"
  ],
  "return_reason_code": "AM05"
}
```

**Response**

```json
{
  "end_to_end_id": "r/434SKtUcdGQ",
  "instructed_amount": 29876.98,
  "instructed_currency": "THB",
  "original_payment": {
    "end_to_end_id": "r/434SKtUcdGQ",
    "uetr": "4f09214d-296c-494b-8e9c-810bf1d9fc93",
    "value_date": "2022-09-13"
  },
  "refund_id": "4f09214d-296c-494b-8e9c-810bf1d9fc93",
  "additional_info": "Text",
  "status": {
    "date_time": "2022-09-13T08:23:49.112Z",
    "code": "ACTC",
    "description": "Accepted"
  }
}
```

**SDK Code**

```python SEPA Refund Transfer
import requests

url = "https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds"

querystring = {"client_id":"6d3cf821-db6d-496d-bec0-064a362e9c31"}

payload = {
    "end_to_end_id": "r/434SKtUcd01",
    "instructed_amount": 200.01,
    "instructed_currency": "EUR",
    "original_payment": {
        "end_to_end_id": "r/434SKtUaaGQ",
        "value_date": "2023-11-01"
    },
    "unstructured_remittance_info": ["More details of refund"],
    "return_reason_code": "AM05"
}
headers = {
    "Idempotency-Id": "a44cbb60-6de4-4edb-9a7a-123414bba3bb",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript SEPA Refund Transfer
const url = 'https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31';
const options = {
  method: 'POST',
  headers: {
    'Idempotency-Id': 'a44cbb60-6de4-4edb-9a7a-123414bba3bb',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"end_to_end_id":"r/434SKtUcd01","instructed_amount":200.01,"instructed_currency":"EUR","original_payment":{"end_to_end_id":"r/434SKtUaaGQ","value_date":"2023-11-01"},"unstructured_remittance_info":["More details of refund"],"return_reason_code":"AM05"}'
};

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

```go SEPA Refund Transfer
package main

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

func main() {

	url := "https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31"

	payload := strings.NewReader("{\n  \"end_to_end_id\": \"r/434SKtUcd01\",\n  \"instructed_amount\": 200.01,\n  \"instructed_currency\": \"EUR\",\n  \"original_payment\": {\n    \"end_to_end_id\": \"r/434SKtUaaGQ\",\n    \"value_date\": \"2023-11-01\"\n  },\n  \"unstructured_remittance_info\": [\n    \"More details of refund\"\n  ],\n  \"return_reason_code\": \"AM05\"\n}")

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

	req.Header.Add("Idempotency-Id", "a44cbb60-6de4-4edb-9a7a-123414bba3bb")
	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 SEPA Refund Transfer
require 'uri'
require 'net/http'

url = URI("https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31")

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

request = Net::HTTP::Post.new(url)
request["Idempotency-Id"] = 'a44cbb60-6de4-4edb-9a7a-123414bba3bb'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"end_to_end_id\": \"r/434SKtUcd01\",\n  \"instructed_amount\": 200.01,\n  \"instructed_currency\": \"EUR\",\n  \"original_payment\": {\n    \"end_to_end_id\": \"r/434SKtUaaGQ\",\n    \"value_date\": \"2023-11-01\"\n  },\n  \"unstructured_remittance_info\": [\n    \"More details of refund\"\n  ],\n  \"return_reason_code\": \"AM05\"\n}"

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

```java SEPA Refund Transfer
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31")
  .header("Idempotency-Id", "a44cbb60-6de4-4edb-9a7a-123414bba3bb")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"end_to_end_id\": \"r/434SKtUcd01\",\n  \"instructed_amount\": 200.01,\n  \"instructed_currency\": \"EUR\",\n  \"original_payment\": {\n    \"end_to_end_id\": \"r/434SKtUaaGQ\",\n    \"value_date\": \"2023-11-01\"\n  },\n  \"unstructured_remittance_info\": [\n    \"More details of refund\"\n  ],\n  \"return_reason_code\": \"AM05\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31', [
  'body' => '{
  "end_to_end_id": "r/434SKtUcd01",
  "instructed_amount": 200.01,
  "instructed_currency": "EUR",
  "original_payment": {
    "end_to_end_id": "r/434SKtUaaGQ",
    "value_date": "2023-11-01"
  },
  "unstructured_remittance_info": [
    "More details of refund"
  ],
  "return_reason_code": "AM05"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'Idempotency-Id' => 'a44cbb60-6de4-4edb-9a7a-123414bba3bb',
  ],
]);

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

```csharp SEPA Refund Transfer
using RestSharp;

var client = new RestClient("https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31");
var request = new RestRequest(Method.POST);
request.AddHeader("Idempotency-Id", "a44cbb60-6de4-4edb-9a7a-123414bba3bb");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"end_to_end_id\": \"r/434SKtUcd01\",\n  \"instructed_amount\": 200.01,\n  \"instructed_currency\": \"EUR\",\n  \"original_payment\": {\n    \"end_to_end_id\": \"r/434SKtUaaGQ\",\n    \"value_date\": \"2023-11-01\"\n  },\n  \"unstructured_remittance_info\": [\n    \"More details of refund\"\n  ],\n  \"return_reason_code\": \"AM05\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift SEPA Refund Transfer
import Foundation

let headers = [
  "Idempotency-Id": "a44cbb60-6de4-4edb-9a7a-123414bba3bb",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "end_to_end_id": "r/434SKtUcd01",
  "instructed_amount": 200.01,
  "instructed_currency": "EUR",
  "original_payment": [
    "end_to_end_id": "r/434SKtUaaGQ",
    "value_date": "2023-11-01"
  ],
  "unstructured_remittance_info": ["More details of refund"],
  "return_reason_code": "AM05"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://b2b.api.icg.citi.com/citiconnect/prod/paymentservices/v1/refunds?client_id=6d3cf821-db6d-496d-bec0-064a362e9c31")! 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()
```