> This page is for Afterpay Partner API.

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

# Enable or Disable Cross Border Trade

PUT https://agencyapi.afterpay.com/v1/onboardings/{onboardingId}/capabilities/cbt
Content-Type: application/json

Cross Border Trade (CBT) is Afterpay's FX product that enables merchants to transact internationally.

Reference: https://developers.afterpay.com/afterpay-partner-api/api-reference/reference-partner-api/capabilities/configure-cbt

## Servers

- `https://agencyapi.afterpay.com` (Production, default)
- `https://agencyapi.sandbox.afterpay.com` (Sandbox)

## Request

### Path parameters

- `onboardingId` (string, required) — The ID that is returned during a successful Create an onboarding call.

### Headers

- `Accept` (string, required, default: application/json) — Specifies media types that are acceptable for the response.

### Body (application/json)

This endpoint expects an object.

- `channels` (list of V1OnboardingsOnboardingIdCapabilitiesCbtPutRequestBodyContentApplicationJsonSchemaChannelsItems, required)

## Response

### 200

CBT configuration updated successfully.

- `requestId` (string, optional) — ID for the CBT config update request.

## Errors

### 503 Service Unavailable Error

Service unavailable.

- `timestamp` (string, optional) — Timestamp of the response.
- `status` (integer, optional) — The HTTP status code.
- `error` (string, optional) — Name of the error that occurred.
- `message` (string, optional) — A human-readable message which provides more details about the error.
- `path` (string, optional) — The attempted endpoint.

## Types

### V1OnboardingsOnboardingIdCapabilitiesCbtPutRequestBodyContentApplicationJsonSchemaChannelsItems

- `channel` (string, required) — Defines whether the channel for the capability is online or in-store. Accepted values [Online, In-store].
- `enabled` (boolean, required) — Defines whether the capability is enabled for the above channel.
- `currlocEnabled` (boolean, optional) — Shows whether the currency localization variant of CBT is enabled.

## Examples

**Request**

```json
{
  "channels": [
    {
      "channel": "ONLINE",
      "enabled": true
    },
    {
      "channel": "IN-STORE",
      "enabled": false
    }
  ]
}
```

**Response**

```json
{
  "requestId": "a1b2c3d4-e5f6-7890-ab12-cd34ef56gh78"
}
```

**SDK Code**

```python
import requests

url = "https://agencyapi.afterpay.com/v1/onboardings/123abcd-456efgh-1124bd/capabilities/cbt"

payload = { "channels": [
        {
            "channel": "ONLINE",
            "enabled": True
        },
        {
            "channel": "IN-STORE",
            "enabled": False
        }
    ] }
headers = {
    "Accept": "application/json",
    "User-Agent": "User-Agent",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://agencyapi.afterpay.com/v1/onboardings/123abcd-456efgh-1124bd/capabilities/cbt';
const options = {
  method: 'PUT',
  headers: {
    Accept: 'application/json',
    'User-Agent': 'User-Agent',
    'Content-Type': 'application/json'
  },
  body: '{"channels":[{"channel":"ONLINE","enabled":true},{"channel":"IN-STORE","enabled":false}]}'
};

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

```go
package main

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

func main() {

	url := "https://agencyapi.afterpay.com/v1/onboardings/123abcd-456efgh-1124bd/capabilities/cbt"

	payload := strings.NewReader("{\n  \"channels\": [\n    {\n      \"channel\": \"ONLINE\",\n      \"enabled\": true\n    },\n    {\n      \"channel\": \"IN-STORE\",\n      \"enabled\": false\n    }\n  ]\n}")

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

	req.Header.Add("Accept", "application/json")
	req.Header.Add("User-Agent", "User-Agent")
	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
require 'uri'
require 'net/http'

url = URI("https://agencyapi.afterpay.com/v1/onboardings/123abcd-456efgh-1124bd/capabilities/cbt")

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

request = Net::HTTP::Put.new(url)
request["Accept"] = 'application/json'
request["User-Agent"] = 'User-Agent'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"channels\": [\n    {\n      \"channel\": \"ONLINE\",\n      \"enabled\": true\n    },\n    {\n      \"channel\": \"IN-STORE\",\n      \"enabled\": false\n    }\n  ]\n}"

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

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

HttpResponse<String> response = Unirest.put("https://agencyapi.afterpay.com/v1/onboardings/123abcd-456efgh-1124bd/capabilities/cbt")
  .header("Accept", "application/json")
  .header("User-Agent", "User-Agent")
  .header("Content-Type", "application/json")
  .body("{\n  \"channels\": [\n    {\n      \"channel\": \"ONLINE\",\n      \"enabled\": true\n    },\n    {\n      \"channel\": \"IN-STORE\",\n      \"enabled\": false\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://agencyapi.afterpay.com/v1/onboardings/123abcd-456efgh-1124bd/capabilities/cbt', [
  'body' => '{
  "channels": [
    {
      "channel": "ONLINE",
      "enabled": true
    },
    {
      "channel": "IN-STORE",
      "enabled": false
    }
  ]
}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'User-Agent' => 'User-Agent',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://agencyapi.afterpay.com/v1/onboardings/123abcd-456efgh-1124bd/capabilities/cbt");
var request = new RestRequest(Method.PUT);
request.AddHeader("Accept", "application/json");
request.AddHeader("User-Agent", "User-Agent");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"channels\": [\n    {\n      \"channel\": \"ONLINE\",\n      \"enabled\": true\n    },\n    {\n      \"channel\": \"IN-STORE\",\n      \"enabled\": false\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Accept": "application/json",
  "User-Agent": "User-Agent",
  "Content-Type": "application/json"
]
let parameters = ["channels": [
    [
      "channel": "ONLINE",
      "enabled": true
    ],
    [
      "channel": "IN-STORE",
      "enabled": false
    ]
  ]] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://agencyapi.afterpay.com/v1/onboardings/123abcd-456efgh-1124bd/capabilities/cbt")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
```