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

# Apple Pay Push to Card

Merchants paying out users from a Coinflow wallet can save a user's Apple Pay
card as a **reusable payout destination**, rather than passing the raw Apple Pay
token on every disbursement. This mirrors the way a debit card is linked with
`POST /withdraw/debit-card`: the Apple Pay token is collected once, and the
returned account token is used for every subsequent payout.

### Step 1: Create a session key for the user

Each user is identified to Coinflow by an ID you choose (for example, your
internal user ID). Create a session key for that user by calling
[Get Session Key](/api-reference/api-reference/authentication/get-session-key)
with your API key and the user's ID in the `x-coinflow-auth-user-id` header.

### Request

GET [https://api-sandbox.coinflow.cash/api/auth/session-key](https://api-sandbox.coinflow.cash/api/auth/session-key)

```curl
curl https://api-sandbox.coinflow.cash/api/auth/session-key \
     -H "x-coinflow-auth-user-id: <apiKey>"
```

```python
import requests

url = "https://api-sandbox.coinflow.cash/api/auth/session-key"

headers = {"x-coinflow-auth-user-id": "<apiKey>"}

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

print(response.json())
```

```javascript
const url = 'https://api-sandbox.coinflow.cash/api/auth/session-key';
const options = {method: 'GET', headers: {'x-coinflow-auth-user-id': '<apiKey>'}};

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

```go
package main

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

func main() {

	url := "https://api-sandbox.coinflow.cash/api/auth/session-key"

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

	req.Header.Add("x-coinflow-auth-user-id", "<apiKey>")

	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://api-sandbox.coinflow.cash/api/auth/session-key")

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

request = Net::HTTP::Get.new(url)
request["x-coinflow-auth-user-id"] = '<apiKey>'

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

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

HttpResponse<String> response = Unirest.get("https://api-sandbox.coinflow.cash/api/auth/session-key")
  .header("x-coinflow-auth-user-id", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-sandbox.coinflow.cash/api/auth/session-key', [
  'headers' => [
    'x-coinflow-auth-user-id' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api-sandbox.coinflow.cash/api/auth/session-key");
var request = new RestRequest(Method.GET);
request.AddHeader("x-coinflow-auth-user-id", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["x-coinflow-auth-user-id": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.coinflow.cash/api/auth/session-key")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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

dataTask.resume()
```

### Response (200)

```json
{
  "key": "string"
}
```

### Step 2: Verify the user (KYC)

An Apple Pay card can only be linked to an **approved withdrawer**, so the user
must complete identity verification first. The simplest path is Coinflow's
hosted [Bank Authentication UI](/guides/payouts/implementation-methods/bank-authentication-ui),
opened with the session key from Step 1. You can also run KYC entirely through
the API — see the [merchant payout guide](/guides/payouts/source-of-funds-for-payouts/coinflow-wallet)
for the API-driven verification options.

### Step 3: Link the Apple Pay card

Collect an Apple Pay token object from the Apple Pay SDK's disbursement flow —
see the [Apple Pay Payouts API Implementation](/recipes/recipes/apple-pay-payouts-api-implementation)
recipe — then link the card server-to-server by calling
`POST /withdraw/apple-pay`. Pass the full `ApplePayResponseObject` — the `token`
plus the `billingContact` — as `applePayPayment`, authenticating with your API
key and the same `x-coinflow-auth-user-id` header used in Step 1.

Coinflow decrypts the token, tokenizes the underlying card, and runs a BIN
check to confirm the card is a **debit** card that is eligible for
push-to-card. Non-debit cards are rejected. On success the endpoint returns the
account **token** for the saved Apple Pay card.

### Request

POST [https://api-sandbox.coinflow.cash/api/withdraw/apple-pay](https://api-sandbox.coinflow.cash/api/withdraw/apple-pay)

```curl
curl -X POST https://api-sandbox.coinflow.cash/api/withdraw/apple-pay \
     -H "x-coinflow-auth-user-id: <apiKey>" \
     -H "Content-Type: application/json" \
     -d '{
  "applePayPayment": {
    "token": {
      "transactionIdentifier": "T1234567890ABCDEF",
      "paymentMethod": {
        "network": "Visa",
        "displayName": "Visa Debit"
      },
      "paymentData": {
        "version": "EC_v1",
        "header": {
          "transactionId": "TXN987654321",
          "ephemeralPublicKey": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE7vXq3+5vZx9Q==",
          "publicKeyHash": "a1b2c3d4e5f67890123456789abcdef0"
        },
        "signature": "MEUCIQDf7vXq3+5vZx9Q==",
        "data": "SGVsbG8gV29ybGQ="
      }
    },
    "billingContact": {
      "givenName": "John",
      "familyName": "Doe",
      "addressLines": [
        "123 Main St"
      ]
    }
  }
}'
```

```python
import requests

url = "https://api-sandbox.coinflow.cash/api/withdraw/apple-pay"

payload = { "applePayPayment": {
        "token": {
            "transactionIdentifier": "T1234567890ABCDEF",
            "paymentMethod": {
                "network": "Visa",
                "displayName": "Visa Debit"
            },
            "paymentData": {
                "version": "EC_v1",
                "header": {
                    "transactionId": "TXN987654321",
                    "ephemeralPublicKey": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE7vXq3+5vZx9Q==",
                    "publicKeyHash": "a1b2c3d4e5f67890123456789abcdef0"
                },
                "signature": "MEUCIQDf7vXq3+5vZx9Q==",
                "data": "SGVsbG8gV29ybGQ="
            }
        },
        "billingContact": {
            "givenName": "John",
            "familyName": "Doe",
            "addressLines": ["123 Main St"]
        }
    } }
headers = {
    "x-coinflow-auth-user-id": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api-sandbox.coinflow.cash/api/withdraw/apple-pay';
const options = {
  method: 'POST',
  headers: {'x-coinflow-auth-user-id': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"applePayPayment":{"token":{"transactionIdentifier":"T1234567890ABCDEF","paymentMethod":{"network":"Visa","displayName":"Visa Debit"},"paymentData":{"version":"EC_v1","header":{"transactionId":"TXN987654321","ephemeralPublicKey":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE7vXq3+5vZx9Q==","publicKeyHash":"a1b2c3d4e5f67890123456789abcdef0"},"signature":"MEUCIQDf7vXq3+5vZx9Q==","data":"SGVsbG8gV29ybGQ="}},"billingContact":{"givenName":"John","familyName":"Doe","addressLines":["123 Main St"]}}}'
};

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://api-sandbox.coinflow.cash/api/withdraw/apple-pay"

	payload := strings.NewReader("{\n  \"applePayPayment\": {\n    \"token\": {\n      \"transactionIdentifier\": \"T1234567890ABCDEF\",\n      \"paymentMethod\": {\n        \"network\": \"Visa\",\n        \"displayName\": \"Visa Debit\"\n      },\n      \"paymentData\": {\n        \"version\": \"EC_v1\",\n        \"header\": {\n          \"transactionId\": \"TXN987654321\",\n          \"ephemeralPublicKey\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE7vXq3+5vZx9Q==\",\n          \"publicKeyHash\": \"a1b2c3d4e5f67890123456789abcdef0\"\n        },\n        \"signature\": \"MEUCIQDf7vXq3+5vZx9Q==\",\n        \"data\": \"SGVsbG8gV29ybGQ=\"\n      }\n    },\n    \"billingContact\": {\n      \"givenName\": \"John\",\n      \"familyName\": \"Doe\",\n      \"addressLines\": [\n        \"123 Main St\"\n      ]\n    }\n  }\n}")

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

	req.Header.Add("x-coinflow-auth-user-id", "<apiKey>")
	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://api-sandbox.coinflow.cash/api/withdraw/apple-pay")

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

request = Net::HTTP::Post.new(url)
request["x-coinflow-auth-user-id"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"applePayPayment\": {\n    \"token\": {\n      \"transactionIdentifier\": \"T1234567890ABCDEF\",\n      \"paymentMethod\": {\n        \"network\": \"Visa\",\n        \"displayName\": \"Visa Debit\"\n      },\n      \"paymentData\": {\n        \"version\": \"EC_v1\",\n        \"header\": {\n          \"transactionId\": \"TXN987654321\",\n          \"ephemeralPublicKey\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE7vXq3+5vZx9Q==\",\n          \"publicKeyHash\": \"a1b2c3d4e5f67890123456789abcdef0\"\n        },\n        \"signature\": \"MEUCIQDf7vXq3+5vZx9Q==\",\n        \"data\": \"SGVsbG8gV29ybGQ=\"\n      }\n    },\n    \"billingContact\": {\n      \"givenName\": \"John\",\n      \"familyName\": \"Doe\",\n      \"addressLines\": [\n        \"123 Main St\"\n      ]\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.post("https://api-sandbox.coinflow.cash/api/withdraw/apple-pay")
  .header("x-coinflow-auth-user-id", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"applePayPayment\": {\n    \"token\": {\n      \"transactionIdentifier\": \"T1234567890ABCDEF\",\n      \"paymentMethod\": {\n        \"network\": \"Visa\",\n        \"displayName\": \"Visa Debit\"\n      },\n      \"paymentData\": {\n        \"version\": \"EC_v1\",\n        \"header\": {\n          \"transactionId\": \"TXN987654321\",\n          \"ephemeralPublicKey\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE7vXq3+5vZx9Q==\",\n          \"publicKeyHash\": \"a1b2c3d4e5f67890123456789abcdef0\"\n        },\n        \"signature\": \"MEUCIQDf7vXq3+5vZx9Q==\",\n        \"data\": \"SGVsbG8gV29ybGQ=\"\n      }\n    },\n    \"billingContact\": {\n      \"givenName\": \"John\",\n      \"familyName\": \"Doe\",\n      \"addressLines\": [\n        \"123 Main St\"\n      ]\n    }\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api-sandbox.coinflow.cash/api/withdraw/apple-pay', [
  'body' => '{
  "applePayPayment": {
    "token": {
      "transactionIdentifier": "T1234567890ABCDEF",
      "paymentMethod": {
        "network": "Visa",
        "displayName": "Visa Debit"
      },
      "paymentData": {
        "version": "EC_v1",
        "header": {
          "transactionId": "TXN987654321",
          "ephemeralPublicKey": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE7vXq3+5vZx9Q==",
          "publicKeyHash": "a1b2c3d4e5f67890123456789abcdef0"
        },
        "signature": "MEUCIQDf7vXq3+5vZx9Q==",
        "data": "SGVsbG8gV29ybGQ="
      }
    },
    "billingContact": {
      "givenName": "John",
      "familyName": "Doe",
      "addressLines": [
        "123 Main St"
      ]
    }
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-coinflow-auth-user-id' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api-sandbox.coinflow.cash/api/withdraw/apple-pay");
var request = new RestRequest(Method.POST);
request.AddHeader("x-coinflow-auth-user-id", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"applePayPayment\": {\n    \"token\": {\n      \"transactionIdentifier\": \"T1234567890ABCDEF\",\n      \"paymentMethod\": {\n        \"network\": \"Visa\",\n        \"displayName\": \"Visa Debit\"\n      },\n      \"paymentData\": {\n        \"version\": \"EC_v1\",\n        \"header\": {\n          \"transactionId\": \"TXN987654321\",\n          \"ephemeralPublicKey\": \"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE7vXq3+5vZx9Q==\",\n          \"publicKeyHash\": \"a1b2c3d4e5f67890123456789abcdef0\"\n        },\n        \"signature\": \"MEUCIQDf7vXq3+5vZx9Q==\",\n        \"data\": \"SGVsbG8gV29ybGQ=\"\n      }\n    },\n    \"billingContact\": {\n      \"givenName\": \"John\",\n      \"familyName\": \"Doe\",\n      \"addressLines\": [\n        \"123 Main St\"\n      ]\n    }\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-coinflow-auth-user-id": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["applePayPayment": [
    "token": [
      "transactionIdentifier": "T1234567890ABCDEF",
      "paymentMethod": [
        "network": "Visa",
        "displayName": "Visa Debit"
      ],
      "paymentData": [
        "version": "EC_v1",
        "header": [
          "transactionId": "TXN987654321",
          "ephemeralPublicKey": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE7vXq3+5vZx9Q==",
          "publicKeyHash": "a1b2c3d4e5f67890123456789abcdef0"
        ],
        "signature": "MEUCIQDf7vXq3+5vZx9Q==",
        "data": "SGVsbG8gV29ybGQ="
      ]
    ],
    "billingContact": [
      "givenName": "John",
      "familyName": "Doe",
      "addressLines": ["123 Main St"]
    ]
  ]] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.coinflow.cash/api/withdraw/apple-pay")! 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()
```

### Response (200)

```json
"eyJ0b2tlbiI6ICJhYmNkZWYxMjM0NTY3ODkwIn0="
```

### Step 4: Initiate the delegated payout

Push funds to the linked card by calling
`POST /merchant/withdraws/payout/delegated` with the user's ID as `userId`, the
token from Step 3 as `account`, and a `speed` of `card` — exactly as you would
for a saved debit card. The payout is funded from your merchant settlement
wallet. (The same account token also works on `POST /merchant/withdraws/payout`
for user-initiated payouts.)

### Request

POST [https://api-sandbox.coinflow.cash/api/merchant/withdraws/payout/delegated](https://api-sandbox.coinflow.cash/api/merchant/withdraws/payout/delegated)

**`Bank Payout`**

```curl Bank Payout
curl -X POST https://api-sandbox.coinflow.cash/api/merchant/withdraws/payout/delegated \
     -H "Authorization: <apiKey>" \
     -H "Content-Type: application/json" \
     -d '{
  "speed": "asap",
  "userId": "user-1234",
  "idempotencyKey": "d9a4d8f2-1b2c-4e5f-8a7b-3c6d9e0f1a2b",
  "account": "4db3391e-3199-4c49-9897-9ad2e73390b6",
  "amount": {
    "cents": 2500
  }
}'
```

**`Bank Payout`**

```python Bank Payout
import requests

url = "https://api-sandbox.coinflow.cash/api/merchant/withdraws/payout/delegated"

payload = {
    "speed": "asap",
    "userId": "user-1234",
    "idempotencyKey": "d9a4d8f2-1b2c-4e5f-8a7b-3c6d9e0f1a2b",
    "account": "4db3391e-3199-4c49-9897-9ad2e73390b6",
    "amount": { "cents": 2500 }
}
headers = {
    "Authorization": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

**`Bank Payout`**

```javascript Bank Payout
const url = 'https://api-sandbox.coinflow.cash/api/merchant/withdraws/payout/delegated';
const options = {
  method: 'POST',
  headers: {Authorization: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"speed":"asap","userId":"user-1234","idempotencyKey":"d9a4d8f2-1b2c-4e5f-8a7b-3c6d9e0f1a2b","account":"4db3391e-3199-4c49-9897-9ad2e73390b6","amount":{"cents":2500}}'
};

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

**`Bank Payout`**

```go Bank Payout
package main

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

func main() {

	url := "https://api-sandbox.coinflow.cash/api/merchant/withdraws/payout/delegated"

	payload := strings.NewReader("{\n  \"speed\": \"asap\",\n  \"userId\": \"user-1234\",\n  \"idempotencyKey\": \"d9a4d8f2-1b2c-4e5f-8a7b-3c6d9e0f1a2b\",\n  \"account\": \"4db3391e-3199-4c49-9897-9ad2e73390b6\",\n  \"amount\": {\n    \"cents\": 2500\n  }\n}")

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

	req.Header.Add("Authorization", "<apiKey>")
	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))

}
```

**`Bank Payout`**

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

url = URI("https://api-sandbox.coinflow.cash/api/merchant/withdraws/payout/delegated")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"speed\": \"asap\",\n  \"userId\": \"user-1234\",\n  \"idempotencyKey\": \"d9a4d8f2-1b2c-4e5f-8a7b-3c6d9e0f1a2b\",\n  \"account\": \"4db3391e-3199-4c49-9897-9ad2e73390b6\",\n  \"amount\": {\n    \"cents\": 2500\n  }\n}"

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

**`Bank Payout`**

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

HttpResponse<String> response = Unirest.post("https://api-sandbox.coinflow.cash/api/merchant/withdraws/payout/delegated")
  .header("Authorization", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"speed\": \"asap\",\n  \"userId\": \"user-1234\",\n  \"idempotencyKey\": \"d9a4d8f2-1b2c-4e5f-8a7b-3c6d9e0f1a2b\",\n  \"account\": \"4db3391e-3199-4c49-9897-9ad2e73390b6\",\n  \"amount\": {\n    \"cents\": 2500\n  }\n}")
  .asString();
```

**`Bank Payout`**

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api-sandbox.coinflow.cash/api/merchant/withdraws/payout/delegated', [
  'body' => '{
  "speed": "asap",
  "userId": "user-1234",
  "idempotencyKey": "d9a4d8f2-1b2c-4e5f-8a7b-3c6d9e0f1a2b",
  "account": "4db3391e-3199-4c49-9897-9ad2e73390b6",
  "amount": {
    "cents": 2500
  }
}',
  'headers' => [
    'Authorization' => '<apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

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

**`Bank Payout`**

```csharp Bank Payout
using RestSharp;

var client = new RestClient("https://api-sandbox.coinflow.cash/api/merchant/withdraws/payout/delegated");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"speed\": \"asap\",\n  \"userId\": \"user-1234\",\n  \"idempotencyKey\": \"d9a4d8f2-1b2c-4e5f-8a7b-3c6d9e0f1a2b\",\n  \"account\": \"4db3391e-3199-4c49-9897-9ad2e73390b6\",\n  \"amount\": {\n    \"cents\": 2500\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

**`Bank Payout`**

```swift Bank Payout
import Foundation

let headers = [
  "Authorization": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "speed": "asap",
  "userId": "user-1234",
  "idempotencyKey": "d9a4d8f2-1b2c-4e5f-8a7b-3c6d9e0f1a2b",
  "account": "4db3391e-3199-4c49-9897-9ad2e73390b6",
  "amount": ["cents": 2500]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.coinflow.cash/api/merchant/withdraws/payout/delegated")! 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()
```

### Response (200)

```json
{
  "effectiveSpeed": "asap",
  "signature": "4Cv4nbe6fkGpdSYcqhPHXkdndeiyTa8mhFoWW5x3vroxRibAUssrbXZ5VW4vxkPedcX3xTRKu7ZpkJXWKdJBCGuq"
}
```

> **Tip**
>
> Pass a unique `idempotencyKey` on every payout so a retried request can never
> double-pay, and read `effectiveSpeed` from the response to confirm how the
> payout was actually processed.

### Step 5: Monitor the payout

Track payout status through [Withdraw Webhooks](/guides/developer-resources/webhooks/withdraw-webhooks),
correlated by the `signature` returned in Step 4. The linked card stays saved
on the withdrawer and can be reused for future payouts without re-collecting an
Apple Pay token.