> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.coinflow.cash/guides/payouts/source-of-funds-for-payouts/coinflow-wallet/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.coinflow.cash/_mcp/server. # Merchant Payouts from Your Coinflow wallet This is the most common payout flow for platforms that hold a user balance and disburse to that user when they request a withdrawal — gaming platforms, marketplaces, gig economy apps, reward programs, SaaS creator earnings, and similar. Your backend tracks the balance. When a user requests a payout, you call Coinflow to (1) verify the user's identity, (2) save where they want their money sent, and (3) initiate the payout. Funds come out of your Coinflow wallet. #### Best for Platforms where the merchant tracks user balances and initiates payouts on the user's behalf. #### Source of funds Your **Coinflow wallet** — the same balance that receives proceeds from Coinflow Checkout. #### Supported destinations US bank account, US debit card (push-to-card), IBAN (EUR/GBP), PIX (BRL). #### UI API-driven. Coinflow optionally provides a pre-built [Bank Authentication UI](/guides/payouts/implementation-methods/bank-authentication-ui) that handles KYC + linking a destination. ## How the flow works ```mermaid sequenceDiagram autonumber participant User participant Merchant as Your backend participant Coinflow User->>Merchant: Requests payout Merchant->>Coinflow: Verify identity (KYC/KYB) Coinflow-->>Merchant: Withdrawer record Merchant->>Coinflow: Add payout destination (bank / card / IBAN / PIX) Merchant->>Coinflow: Get quote (amount + fees + speed options) Coinflow-->>Merchant: Quote breakdown Merchant->>Coinflow: Initiate payout (debits your Coinflow wallet) Coinflow->>User: Funds delivered to destination Coinflow->>Merchant: Webhook (success or failure) ``` --- ## Prerequisites > **Complete account setup first** > > This integration assumes you've completed the > [Account Setup](/guides/getting-started/account-setup) prerequisites — > sandbox merchant account, API key, team access, and any product-specific > configuration (settlement location, chargeback protection, or wallet > funding). Before sending real payouts, you'll need: 1. A merchant account ([register on sandbox](https://sandbox-merchant.coinflow.cash/register)) and an API key. 2. A **funded Coinflow wallet**. In sandbox, contact the Coinflow team for test funds. In production, your balance fills from Coinflow Checkout proceeds. 3. (Optional) Webhook endpoint configured to receive payout status updates — see [Withdraw Webhooks](/guides/developer-resources/webhooks/withdraw-webhooks). **Authorization Headers:** * `Authorization` — Your API key from the [merchant dashboard](https://sandbox-merchant.coinflow.cash/api-keys). * `x-coinflow-auth-user-id` — A unique customer ID from your own systems identifying the payer or payee. * `x-coinflow-auth-session-key` — A JWT that authorizes the payer. Valid for 24 hours; refresh after expiry. --- ## Implementation ### Step 1: Verify the withdrawer (KYC/KYB) Every user must complete identity verification before their first payout. Once verified, the same user can be paid out repeatedly with no re-verification. Choose the path that matches how you handle identity today: #### Coinflow handles KYC (most common) Pass the user's details to Coinflow and we run identity verification end-to-end. **US withdrawers** require full SSN, address, and date of birth. ### Request POST [https://api-sandbox.coinflow.cash/api/withdraw/kyc](https://api-sandbox.coinflow.cash/api/withdraw/kyc) ```curl curl -X POST https://api-sandbox.coinflow.cash/api/withdraw/kyc \ -H "x-coinflow-auth-user-id: " \ -H "Content-Type: application/json" \ -d '{ "info": { "email": "string", "firstName": "string", "surName": "string", "physicalAddress": "string", "city": "string", "state": "string", "zip": "string", "country": "string", "dob": "string", "ssn": "string" } }' ``` ```python import requests url = "https://api-sandbox.coinflow.cash/api/withdraw/kyc" payload = { "info": { "email": "string", "firstName": "string", "surName": "string", "physicalAddress": "string", "city": "string", "state": "string", "zip": "string", "country": "string", "dob": "string", "ssn": "string" } } headers = { "x-coinflow-auth-user-id": "", "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/kyc'; const options = { method: 'POST', headers: {'x-coinflow-auth-user-id': '', 'Content-Type': 'application/json'}, body: '{"info":{"email":"string","firstName":"string","surName":"string","physicalAddress":"string","city":"string","state":"string","zip":"string","country":"string","dob":"string","ssn":"string"}}' }; 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/kyc" payload := strings.NewReader("{\n \"info\": {\n \"email\": \"string\",\n \"firstName\": \"string\",\n \"surName\": \"string\",\n \"physicalAddress\": \"string\",\n \"city\": \"string\",\n \"state\": \"string\",\n \"zip\": \"string\",\n \"country\": \"string\",\n \"dob\": \"string\",\n \"ssn\": \"string\"\n }\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-coinflow-auth-user-id", "") 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/kyc") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-coinflow-auth-user-id"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"info\": {\n \"email\": \"string\",\n \"firstName\": \"string\",\n \"surName\": \"string\",\n \"physicalAddress\": \"string\",\n \"city\": \"string\",\n \"state\": \"string\",\n \"zip\": \"string\",\n \"country\": \"string\",\n \"dob\": \"string\",\n \"ssn\": \"string\"\n }\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api-sandbox.coinflow.cash/api/withdraw/kyc") .header("x-coinflow-auth-user-id", "") .header("Content-Type", "application/json") .body("{\n \"info\": {\n \"email\": \"string\",\n \"firstName\": \"string\",\n \"surName\": \"string\",\n \"physicalAddress\": \"string\",\n \"city\": \"string\",\n \"state\": \"string\",\n \"zip\": \"string\",\n \"country\": \"string\",\n \"dob\": \"string\",\n \"ssn\": \"string\"\n }\n}") .asString(); ``` ```php request('POST', 'https://api-sandbox.coinflow.cash/api/withdraw/kyc', [ 'body' => '{ "info": { "email": "string", "firstName": "string", "surName": "string", "physicalAddress": "string", "city": "string", "state": "string", "zip": "string", "country": "string", "dob": "string", "ssn": "string" } }', 'headers' => [ 'Content-Type' => 'application/json', 'x-coinflow-auth-user-id' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api-sandbox.coinflow.cash/api/withdraw/kyc"); var request = new RestRequest(Method.POST); request.AddHeader("x-coinflow-auth-user-id", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"info\": {\n \"email\": \"string\",\n \"firstName\": \"string\",\n \"surName\": \"string\",\n \"physicalAddress\": \"string\",\n \"city\": \"string\",\n \"state\": \"string\",\n \"zip\": \"string\",\n \"country\": \"string\",\n \"dob\": \"string\",\n \"ssn\": \"string\"\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "x-coinflow-auth-user-id": "", "Content-Type": "application/json" ] let parameters = ["info": [ "email": "string", "firstName": "string", "surName": "string", "physicalAddress": "string", "city": "string", "state": "string", "zip": "string", "country": "string", "dob": "string", "ssn": "string" ]] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.coinflow.cash/api/withdraw/kyc")! 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 { "withdrawer": { "_id": "string", "wallet": "string", "blockchain": "solana", "wallets": [ { "wallet": "string", "blockchain": "solana" } ], "email": "string", "availability": { "status": "Functional", "reason": "string", "editor": "string", "updatedAt": "2024-01-15T09:30:00Z" }, "currency": "USD", "merchant": "string", "verification": { "reference": "string", "status": "pending", "vendor": "middesk", "name": "string", "attested": true, "shareToken": "string", "shareTokenStatus": "string", "sessionToken": "string", "rejectionReasons": [ "string" ] }, "riskScoreOverride": true, "country": "string", "user": true, "watchlistExempt": "Unknown", "originalCurrency": "USD", "geoBlockOverride": { "reason": "string", "setBy": "string", "setAt": "2024-01-15T09:30:00Z", "expiresAt": "2024-01-15T09:30:00Z" }, "blockCardReuseExempt": true, "createdAt": "2024-01-15T09:30:00Z", "dwolla": { "customerId": "string", "status": "pending", "acceptedTerms": "2024-01-15T09:30:00Z", "verification": { "reference": "string", "status": "pending", "vendor": "middesk", "name": "string", "attested": true, "shareToken": "string", "shareTokenStatus": "string", "sessionToken": "string", "rejectionReasons": [ "string" ] } }, "watchlistId": "string" } } ``` **Non-US withdrawers** require email and country only at this step. The user completes identity verification through a hosted link returned in the response. #### Upload identity documents If your platform already collects identity documents (front + back of ID), send them to Coinflow directly via multipart upload. ### Request POST [https://api-sandbox.coinflow.cash/api/withdraw/kyc-doc](https://api-sandbox.coinflow.cash/api/withdraw/kyc-doc) ```curl curl -X POST https://api-sandbox.coinflow.cash/api/withdraw/kyc-doc \ -H "x-coinflow-auth-user-id: " \ -H "Content-Type: multipart/form-data" \ -F email="string" \ -F country="string" \ -F idType="string" \ -F merchantId="string" \ -F idFront=@string \ -F idBack=@ ``` ```python import requests url = "https://api-sandbox.coinflow.cash/api/withdraw/kyc-doc" files = { "idFront": "open('string', 'rb')", "idBack": "open('', 'rb')" } payload = { "email": "string", "country": "string", "idType": "string", "merchantId": "string" } headers = {"x-coinflow-auth-user-id": ""} response = requests.post(url, data=payload, files=files, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api-sandbox.coinflow.cash/api/withdraw/kyc-doc'; const form = new FormData(); form.append('email', 'string'); form.append('country', 'string'); form.append('idType', 'string'); form.append('merchantId', 'string'); form.append('idFront', 'string'); form.append('idBack', ''); const options = {method: 'POST', headers: {'x-coinflow-auth-user-id': ''}}; options.body = form; 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/kyc-doc" payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"email\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idType\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"merchantId\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idFront\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idBack\"; filename=\"\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-coinflow-auth-user-id", "") 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/kyc-doc") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-coinflow-auth-user-id"] = '' request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"email\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idType\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"merchantId\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idFront\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idBack\"; filename=\"\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api-sandbox.coinflow.cash/api/withdraw/kyc-doc") .header("x-coinflow-auth-user-id", "") .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"email\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idType\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"merchantId\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idFront\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idBack\"; filename=\"\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n") .asString(); ``` ```php request('POST', 'https://api-sandbox.coinflow.cash/api/withdraw/kyc-doc', [ 'multipart' => [ [ 'name' => 'email', 'contents' => 'string' ], [ 'name' => 'country', 'contents' => 'string' ], [ 'name' => 'idType', 'contents' => 'string' ], [ 'name' => 'merchantId', 'contents' => 'string' ], [ 'name' => 'idFront', 'filename' => 'string', 'contents' => null ], [ 'name' => 'idBack', 'filename' => '', 'contents' => null ] ] 'headers' => [ 'x-coinflow-auth-user-id' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api-sandbox.coinflow.cash/api/withdraw/kyc-doc"); var request = new RestRequest(Method.POST); request.AddHeader("x-coinflow-auth-user-id", ""); request.AddParameter("undefined", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"email\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idType\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"merchantId\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idFront\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"idBack\"; filename=\"\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["x-coinflow-auth-user-id": ""] let parameters = [ [ "name": "email", "value": "string" ], [ "name": "country", "value": "string" ], [ "name": "idType", "value": "string" ], [ "name": "merchantId", "value": "string" ], [ "name": "idFront", "fileName": "string" ], [ "name": "idBack", "fileName": "" ] ] let boundary = "---011000010111000001101001" var body = "" var error: NSError? = nil for param in parameters { let paramName = param["name"]! body += "--\(boundary)\r\n" body += "Content-Disposition:form-data; name=\"\(paramName)\"" if let filename = param["fileName"] { let contentType = param["content-type"]! let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8) if (error != nil) { print(error as Any) } body += "; filename=\"\(filename)\"\r\n" body += "Content-Type: \(contentType)\r\n\r\n" body += fileContent } else if let paramValue = param["value"] { body += "\r\n\r\n\(paramValue)" } } let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.coinflow.cash/api/withdraw/kyc-doc")! 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 { "withdrawer": { "_id": "string", "wallet": "string", "blockchain": "solana", "wallets": [ { "wallet": "string", "blockchain": "solana" } ], "email": "string", "availability": { "status": "Functional", "reason": "string", "editor": "string", "updatedAt": "2024-01-15T09:30:00Z" }, "currency": "USD", "merchant": "string", "verification": { "reference": "string", "status": "pending", "vendor": "middesk", "name": "string", "attested": true, "shareToken": "string", "shareTokenStatus": "string", "sessionToken": "string", "rejectionReasons": [ "string" ] }, "riskScoreOverride": true, "country": "string", "user": true, "watchlistExempt": "Unknown", "originalCurrency": "USD", "geoBlockOverride": { "reason": "string", "setBy": "string", "setAt": "2024-01-15T09:30:00Z", "expiresAt": "2024-01-15T09:30:00Z" }, "blockCardReuseExempt": true, "createdAt": "2024-01-15T09:30:00Z", "dwolla": { "customerId": "string", "status": "pending", "acceptedTerms": "2024-01-15T09:30:00Z", "verification": { "reference": "string", "status": "pending", "vendor": "middesk", "name": "string", "attested": true, "shareToken": "string", "shareTokenStatus": "string", "sessionToken": "string", "rejectionReasons": [ "string" ] } }, "watchlistId": "string" } } ``` #### Share a token from an existing identity provider If you've already verified the user through your own identity provider, you can pass a share token instead of re-verifying. Requires a tri-party data-sharing agreement — contact the Coinflow team with your identity provider's client ID to set this up. ### Request POST [https://api-sandbox.coinflow.cash/api/withdraw/kyc/share-token](https://api-sandbox.coinflow.cash/api/withdraw/kyc/share-token) ```curl curl -X POST https://api-sandbox.coinflow.cash/api/withdraw/kyc/share-token \ -H "x-coinflow-auth-user-id: " \ -H "Content-Type: application/json" \ -d '{ "vendor": "sumsub", "shareToken": "string", "country": "string", "email": "string" }' ``` ```python import requests url = "https://api-sandbox.coinflow.cash/api/withdraw/kyc/share-token" payload = { "vendor": "sumsub", "shareToken": "string", "country": "string", "email": "string" } headers = { "x-coinflow-auth-user-id": "", "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/kyc/share-token'; const options = { method: 'POST', headers: {'x-coinflow-auth-user-id': '', 'Content-Type': 'application/json'}, body: '{"vendor":"sumsub","shareToken":"string","country":"string","email":"string"}' }; 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/kyc/share-token" payload := strings.NewReader("{\n \"vendor\": \"sumsub\",\n \"shareToken\": \"string\",\n \"country\": \"string\",\n \"email\": \"string\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-coinflow-auth-user-id", "") 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/kyc/share-token") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-coinflow-auth-user-id"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"vendor\": \"sumsub\",\n \"shareToken\": \"string\",\n \"country\": \"string\",\n \"email\": \"string\"\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api-sandbox.coinflow.cash/api/withdraw/kyc/share-token") .header("x-coinflow-auth-user-id", "") .header("Content-Type", "application/json") .body("{\n \"vendor\": \"sumsub\",\n \"shareToken\": \"string\",\n \"country\": \"string\",\n \"email\": \"string\"\n}") .asString(); ``` ```php request('POST', 'https://api-sandbox.coinflow.cash/api/withdraw/kyc/share-token', [ 'body' => '{ "vendor": "sumsub", "shareToken": "string", "country": "string", "email": "string" }', 'headers' => [ 'Content-Type' => 'application/json', 'x-coinflow-auth-user-id' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api-sandbox.coinflow.cash/api/withdraw/kyc/share-token"); var request = new RestRequest(Method.POST); request.AddHeader("x-coinflow-auth-user-id", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"vendor\": \"sumsub\",\n \"shareToken\": \"string\",\n \"country\": \"string\",\n \"email\": \"string\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "x-coinflow-auth-user-id": "", "Content-Type": "application/json" ] let parameters = [ "vendor": "sumsub", "shareToken": "string", "country": "string", "email": "string" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.coinflow.cash/api/withdraw/kyc/share-token")! 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 { "withdrawer": { "_id": "string", "wallet": "string", "blockchain": "solana", "wallets": [ { "wallet": "string", "blockchain": "solana" } ], "email": "string", "availability": { "status": "Functional", "reason": "string", "editor": "string", "updatedAt": "2024-01-15T09:30:00Z" }, "currency": "USD", "merchant": "string", "verification": { "reference": "string", "status": "pending", "vendor": "middesk", "name": "string", "attested": true, "shareToken": "string", "shareTokenStatus": "string", "sessionToken": "string", "rejectionReasons": [ "string" ] }, "riskScoreOverride": true, "country": "string", "user": true, "watchlistExempt": "Unknown", "originalCurrency": "USD", "geoBlockOverride": { "reason": "string", "setBy": "string", "setAt": "2024-01-15T09:30:00Z", "expiresAt": "2024-01-15T09:30:00Z" }, "blockCardReuseExempt": true, "createdAt": "2024-01-15T09:30:00Z", "dwolla": { "customerId": "string", "status": "pending", "acceptedTerms": "2024-01-15T09:30:00Z", "verification": { "reference": "string", "status": "pending", "vendor": "middesk", "name": "string", "attested": true, "shareToken": "string", "shareTokenStatus": "string", "sessionToken": "string", "rejectionReasons": [ "string" ] } }, "watchlistId": "string" } } ``` #### Attest to your own KYC (KYC Reliance) For merchants with their own approved KYC program. Requires Compliance review and approval from the Coinflow team before use. ### Request POST [https://api-sandbox.coinflow.cash/api/withdraw/kyc/attested](https://api-sandbox.coinflow.cash/api/withdraw/kyc/attested) ```curl curl -X POST https://api-sandbox.coinflow.cash/api/withdraw/kyc/attested \ -H "x-coinflow-auth-user-id: " \ -H "Content-Type: application/json" \ -d '{ "country": "string", "email": "string", "firstName": "string", "surName": "string", "physicalAddress": "string", "city": "string", "state": "string", "zip": "string", "dob": "string" }' ``` ```python import requests url = "https://api-sandbox.coinflow.cash/api/withdraw/kyc/attested" payload = { "country": "string", "email": "string", "firstName": "string", "surName": "string", "physicalAddress": "string", "city": "string", "state": "string", "zip": "string", "dob": "string" } headers = { "x-coinflow-auth-user-id": "", "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/kyc/attested'; const options = { method: 'POST', headers: {'x-coinflow-auth-user-id': '', 'Content-Type': 'application/json'}, body: '{"country":"string","email":"string","firstName":"string","surName":"string","physicalAddress":"string","city":"string","state":"string","zip":"string","dob":"string"}' }; 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/kyc/attested" payload := strings.NewReader("{\n \"country\": \"string\",\n \"email\": \"string\",\n \"firstName\": \"string\",\n \"surName\": \"string\",\n \"physicalAddress\": \"string\",\n \"city\": \"string\",\n \"state\": \"string\",\n \"zip\": \"string\",\n \"dob\": \"string\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-coinflow-auth-user-id", "") 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/kyc/attested") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-coinflow-auth-user-id"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"country\": \"string\",\n \"email\": \"string\",\n \"firstName\": \"string\",\n \"surName\": \"string\",\n \"physicalAddress\": \"string\",\n \"city\": \"string\",\n \"state\": \"string\",\n \"zip\": \"string\",\n \"dob\": \"string\"\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api-sandbox.coinflow.cash/api/withdraw/kyc/attested") .header("x-coinflow-auth-user-id", "") .header("Content-Type", "application/json") .body("{\n \"country\": \"string\",\n \"email\": \"string\",\n \"firstName\": \"string\",\n \"surName\": \"string\",\n \"physicalAddress\": \"string\",\n \"city\": \"string\",\n \"state\": \"string\",\n \"zip\": \"string\",\n \"dob\": \"string\"\n}") .asString(); ``` ```php request('POST', 'https://api-sandbox.coinflow.cash/api/withdraw/kyc/attested', [ 'body' => '{ "country": "string", "email": "string", "firstName": "string", "surName": "string", "physicalAddress": "string", "city": "string", "state": "string", "zip": "string", "dob": "string" }', 'headers' => [ 'Content-Type' => 'application/json', 'x-coinflow-auth-user-id' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api-sandbox.coinflow.cash/api/withdraw/kyc/attested"); var request = new RestRequest(Method.POST); request.AddHeader("x-coinflow-auth-user-id", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"country\": \"string\",\n \"email\": \"string\",\n \"firstName\": \"string\",\n \"surName\": \"string\",\n \"physicalAddress\": \"string\",\n \"city\": \"string\",\n \"state\": \"string\",\n \"zip\": \"string\",\n \"dob\": \"string\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "x-coinflow-auth-user-id": "", "Content-Type": "application/json" ] let parameters = [ "country": "string", "email": "string", "firstName": "string", "surName": "string", "physicalAddress": "string", "city": "string", "state": "string", "zip": "string", "dob": "string" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.coinflow.cash/api/withdraw/kyc/attested")! 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 { "withdrawer": { "_id": "string", "wallet": "string", "blockchain": "solana", "wallets": [ { "wallet": "string", "blockchain": "solana" } ], "email": "string", "availability": { "status": "Functional", "reason": "string", "editor": "string", "updatedAt": "2024-01-15T09:30:00Z" }, "currency": "USD", "merchant": "string", "verification": { "reference": "string", "status": "pending", "vendor": "middesk", "name": "string", "attested": true, "shareToken": "string", "shareTokenStatus": "string", "sessionToken": "string", "rejectionReasons": [ "string" ] }, "riskScoreOverride": true, "country": "string", "user": true, "watchlistExempt": "Unknown", "originalCurrency": "USD", "geoBlockOverride": { "reason": "string", "setBy": "string", "setAt": "2024-01-15T09:30:00Z", "expiresAt": "2024-01-15T09:30:00Z" }, "blockCardReuseExempt": true, "createdAt": "2024-01-15T09:30:00Z", "dwolla": { "customerId": "string", "status": "pending", "acceptedTerms": "2024-01-15T09:30:00Z", "verification": { "reference": "string", "status": "pending", "vendor": "middesk", "name": "string", "attested": true, "shareToken": "string", "shareTokenStatus": "string", "sessionToken": "string", "rejectionReasons": [ "string" ] } }, "watchlistId": "string" } } ``` > **Warning** > > **451 response?** Coinflow needs additional info from the user. Redirect them to the `verificationLink` in the response body — they'll upload a photo ID and complete a selfie verification. After they finish, poll `GET /withdraw` until `verification.status === "approved"`. ### Step 2: Check the withdrawer's verification status After KYC, fetch the withdrawer record to confirm verification status before adding a payout destination. You can call this at any time to look up a withdrawer. ### Request GET [https://api-sandbox.coinflow.cash/api/withdraw](https://api-sandbox.coinflow.cash/api/withdraw) ```curl curl https://api-sandbox.coinflow.cash/api/withdraw \ -H "x-coinflow-auth-wallet: " ``` ```python import requests url = "https://api-sandbox.coinflow.cash/api/withdraw" headers = {"x-coinflow-auth-wallet": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api-sandbox.coinflow.cash/api/withdraw'; const options = {method: 'GET', headers: {'x-coinflow-auth-wallet': ''}}; 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/withdraw" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("x-coinflow-auth-wallet", "") 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") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["x-coinflow-auth-wallet"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api-sandbox.coinflow.cash/api/withdraw") .header("x-coinflow-auth-wallet", "") .asString(); ``` ```php request('GET', 'https://api-sandbox.coinflow.cash/api/withdraw', [ 'headers' => [ 'x-coinflow-auth-wallet' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api-sandbox.coinflow.cash/api/withdraw"); var request = new RestRequest(Method.GET); request.AddHeader("x-coinflow-auth-wallet", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["x-coinflow-auth-wallet": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.coinflow.cash/api/withdraw")! 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 { "withdrawer": { "_id": "string", "wallet": "string", "blockchain": "solana", "wallets": [ { "wallet": "string", "blockchain": "solana" } ], "email": "string", "availability": { "status": "Functional", "reason": "string", "editor": "string", "updatedAt": "2024-01-15T09:30:00Z" }, "currency": "USD", "merchant": "string", "verification": { "reference": "string", "status": "pending", "vendor": "middesk", "name": "string", "attested": true, "shareToken": "string", "shareTokenStatus": "string", "sessionToken": "string", "rejectionReasons": [ "string" ] }, "riskScoreOverride": true, "country": "string", "bankAccounts": [ { "last4": "string", "accountHash": "string", "alias": "string", "token": "string", "reference": "string", "accountNumberOnlyHash": "string", "isDeleted": true, "isTokenized": true, "accountNumber": "string", "statementFileKey": "string", "statementUploadedAt": "2024-01-15T09:30:00Z", "routingNumber": "string", "wireRoutingNumber": "string", "rtpEligible": true } ], "cards": [ { "last4": "string", "token": "string", "type": "VISA", "disbursementStatus": "Immediate", "createdAt": "2024-01-15T09:30:00Z", "isDeleted": true, "currency": "USD", "nameOnCard": "string", "walletGenus": "applepay", "retiredTokens": [ "string" ], "expMonth": "string", "expYear": "string" } ], "ibans": [ { "last4": "string", "accountHash": "string", "alias": "string", "token": "string", "reference": "string", "sortCode": "string", "accountOwnerNames": [ "string" ], "nameMatchStatus": "unmatched", "isDeleted": true, "statementFileKey": "string", "statementUploadedAt": "2024-01-15T09:30:00Z", "bic": "string" } ], "swifts": [ { "alias": "string", "token": "string", "reference": "string", "last4": "string", "accountHash": "string", "beneficiaryBankName": "string", "beneficiaryBankAddress": { "address1": "string", "city": "string", "state": "string", "zip": "string", "country": "string", "address2": "string" }, "swiftCode": "string", "intermediaryBank": { "swiftCode": "string", "bankAddress": { "address1": "string", "city": "string", "state": "string", "zip": "string", "country": "string", "address2": "string" }, "bankName": "string" } } ], "pixes": [ { "key": "string", "accountHash": "string", "token": "string" } ], "efts": [ { "accountHash": "string", "alias": "string", "token": "string", "reference": "string", "mask": "string", "accountOwnerNames": [ "string" ], "nameMatchStatus": "unmatched", "isDeleted": true, "accountNumber": "string", "statementFileKey": "string", "statementUploadedAt": "2024-01-15T09:30:00Z", "institutionId": "string", "institution": "string", "transit_number": "string" } ], "mobiles": [ { "alias": "string", "token": "string", "type": "mobile", "genus": "applepay", "disbursementStatus": "Immediate", "currency": "USD", "retiredTokens": [ "string" ], "deletedAt": "2024-01-15T09:30:00Z", "expMonth": "string", "expYear": "string" } ], "p2cAvailable": true, "applePayAvailable": true, "bankCurrencyOptions": [ "USD" ], "freeWithdrawSpeeds": [ "asap" ], "originalCurrency": "USD", "geoBlockOverride": { "reason": "string", "setBy": "string", "setAt": "2024-01-15T09:30:00Z", "expiresAt": "2024-01-15T09:30:00Z" }, "blockCardReuseExempt": true, "createdAt": "2024-01-15T09:30:00Z", "venmo": { "alias": "string", "token": "string", "type": "venmo", "isDeleted": true }, "paypal": { "alias": "string", "token": "string", "type": "paypal", "isDeleted": true }, "interac": { "alias": "string", "token": "string", "type": "interac", "isDeleted": true } } } ``` ### Step 3: Add a payout destination Save the place the user wants to receive funds. Available destinations depend on the country they verified under. > **Tip** > > **Want to skip building destination UI?** Coinflow's [Bank Authentication UI](/guides/payouts/implementation-methods/bank-authentication-ui) embeds the entire KYC + destination flow in your app. If you use it, you can skip Step 1 and Step 3 — you'll only need the quote and payout endpoints below. #### US bank account For US ACH and RTP payouts. ### Request POST [https://api-sandbox.coinflow.cash/api/withdraw/account](https://api-sandbox.coinflow.cash/api/withdraw/account) ```curl curl -X POST https://api-sandbox.coinflow.cash/api/withdraw/account \ -H "x-coinflow-auth-user-id: " \ -H "Content-Type: application/json" \ -d '{ "alias": "string", "routingNumber": "string", "accountNumber": "string", "type": "checking" }' ``` ```python import requests url = "https://api-sandbox.coinflow.cash/api/withdraw/account" payload = { "alias": "string", "routingNumber": "string", "accountNumber": "string", "type": "checking" } headers = { "x-coinflow-auth-user-id": "", "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/account'; const options = { method: 'POST', headers: {'x-coinflow-auth-user-id': '', 'Content-Type': 'application/json'}, body: '{"alias":"string","routingNumber":"string","accountNumber":"string","type":"checking"}' }; 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/account" payload := strings.NewReader("{\n \"alias\": \"string\",\n \"routingNumber\": \"string\",\n \"accountNumber\": \"string\",\n \"type\": \"checking\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-coinflow-auth-user-id", "") 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/account") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-coinflow-auth-user-id"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"alias\": \"string\",\n \"routingNumber\": \"string\",\n \"accountNumber\": \"string\",\n \"type\": \"checking\"\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api-sandbox.coinflow.cash/api/withdraw/account") .header("x-coinflow-auth-user-id", "") .header("Content-Type", "application/json") .body("{\n \"alias\": \"string\",\n \"routingNumber\": \"string\",\n \"accountNumber\": \"string\",\n \"type\": \"checking\"\n}") .asString(); ``` ```php request('POST', 'https://api-sandbox.coinflow.cash/api/withdraw/account', [ 'body' => '{ "alias": "string", "routingNumber": "string", "accountNumber": "string", "type": "checking" }', 'headers' => [ 'Content-Type' => 'application/json', 'x-coinflow-auth-user-id' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api-sandbox.coinflow.cash/api/withdraw/account"); var request = new RestRequest(Method.POST); request.AddHeader("x-coinflow-auth-user-id", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"alias\": \"string\",\n \"routingNumber\": \"string\",\n \"accountNumber\": \"string\",\n \"type\": \"checking\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "x-coinflow-auth-user-id": "", "Content-Type": "application/json" ] let parameters = [ "alias": "string", "routingNumber": "string", "accountNumber": "string", "type": "checking" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.coinflow.cash/api/withdraw/account")! 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 { "withdrawer": { "_id": "string", "wallet": "string", "blockchain": "solana", "wallets": [ { "wallet": "string", "blockchain": "solana" } ], "email": "string", "availability": { "status": "Functional", "reason": "string", "editor": "string", "updatedAt": "2024-01-15T09:30:00Z" }, "currency": "USD", "merchant": "string", "verification": { "reference": "string", "status": "pending", "vendor": "middesk", "name": "string", "attested": true, "shareToken": "string", "shareTokenStatus": "string", "sessionToken": "string", "rejectionReasons": [ "string" ] }, "riskScoreOverride": true, "country": "string", "bankAccounts": [ { "last4": "string", "accountHash": "string", "alias": "string", "token": "string", "reference": "string", "accountNumberOnlyHash": "string", "isDeleted": true, "isTokenized": true, "accountNumber": "string", "statementFileKey": "string", "statementUploadedAt": "2024-01-15T09:30:00Z", "routingNumber": "string", "wireRoutingNumber": "string", "rtpEligible": true } ], "cards": [ { "last4": "string", "token": "string", "type": "VISA", "disbursementStatus": "Immediate", "createdAt": "2024-01-15T09:30:00Z", "isDeleted": true, "currency": "USD", "nameOnCard": "string", "walletGenus": "applepay", "retiredTokens": [ "string" ], "expMonth": "string", "expYear": "string" } ], "ibans": [ { "last4": "string", "accountHash": "string", "alias": "string", "token": "string", "reference": "string", "sortCode": "string", "accountOwnerNames": [ "string" ], "nameMatchStatus": "unmatched", "isDeleted": true, "statementFileKey": "string", "statementUploadedAt": "2024-01-15T09:30:00Z", "bic": "string" } ], "swifts": [ { "alias": "string", "token": "string", "reference": "string", "last4": "string", "accountHash": "string", "beneficiaryBankName": "string", "beneficiaryBankAddress": { "address1": "string", "city": "string", "state": "string", "zip": "string", "country": "string", "address2": "string" }, "swiftCode": "string", "intermediaryBank": { "swiftCode": "string", "bankAddress": { "address1": "string", "city": "string", "state": "string", "zip": "string", "country": "string", "address2": "string" }, "bankName": "string" } } ], "pixes": [ { "key": "string", "accountHash": "string", "token": "string" } ], "efts": [ { "accountHash": "string", "alias": "string", "token": "string", "reference": "string", "mask": "string", "accountOwnerNames": [ "string" ], "nameMatchStatus": "unmatched", "isDeleted": true, "accountNumber": "string", "statementFileKey": "string", "statementUploadedAt": "2024-01-15T09:30:00Z", "institutionId": "string", "institution": "string", "transit_number": "string" } ], "mobiles": [ { "alias": "string", "token": "string", "type": "mobile", "genus": "applepay", "disbursementStatus": "Immediate", "currency": "USD", "retiredTokens": [ "string" ], "deletedAt": "2024-01-15T09:30:00Z", "expMonth": "string", "expYear": "string" } ], "p2cAvailable": true, "applePayAvailable": true, "bankCurrencyOptions": [ "USD" ], "freeWithdrawSpeeds": [ "asap" ], "originalCurrency": "USD", "geoBlockOverride": { "reason": "string", "setBy": "string", "setAt": "2024-01-15T09:30:00Z", "expiresAt": "2024-01-15T09:30:00Z" }, "blockCardReuseExempt": true, "createdAt": "2024-01-15T09:30:00Z", "venmo": { "alias": "string", "token": "string", "type": "venmo", "isDeleted": true }, "paypal": { "alias": "string", "token": "string", "type": "paypal", "isDeleted": true }, "interac": { "alias": "string", "token": "string", "type": "interac", "isDeleted": true } }, "tokensRequiringWireRoutingNumber": [ "string" ] } ``` #### US debit card (push-to-card) For instant payouts to a Visa or Mastercard debit card. The `cardToken` comes from [tokenizing the card](/recipes/recipes/tokenize-debit-cards-for-withdraws) — raw card numbers must never reach your servers. ### Request POST [https://api-sandbox.coinflow.cash/api/withdraw/debit-card](https://api-sandbox.coinflow.cash/api/withdraw/debit-card) ```curl curl -X POST https://api-sandbox.coinflow.cash/api/withdraw/debit-card \ -H "x-coinflow-auth-user-id: " \ -H "Content-Type: application/json" \ -d '{ "expYear": "26", "expMonth": "12", "cardToken": "tok_1Hh1YZ2eZvKYlo2C3X9a7b8d" }' ``` ```python import requests url = "https://api-sandbox.coinflow.cash/api/withdraw/debit-card" payload = { "expYear": "26", "expMonth": "12", "cardToken": "tok_1Hh1YZ2eZvKYlo2C3X9a7b8d" } headers = { "x-coinflow-auth-user-id": "", "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/debit-card'; const options = { method: 'POST', headers: {'x-coinflow-auth-user-id': '', 'Content-Type': 'application/json'}, body: '{"expYear":"26","expMonth":"12","cardToken":"tok_1Hh1YZ2eZvKYlo2C3X9a7b8d"}' }; 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/debit-card" payload := strings.NewReader("{\n \"expYear\": \"26\",\n \"expMonth\": \"12\",\n \"cardToken\": \"tok_1Hh1YZ2eZvKYlo2C3X9a7b8d\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-coinflow-auth-user-id", "") 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/debit-card") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-coinflow-auth-user-id"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"expYear\": \"26\",\n \"expMonth\": \"12\",\n \"cardToken\": \"tok_1Hh1YZ2eZvKYlo2C3X9a7b8d\"\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api-sandbox.coinflow.cash/api/withdraw/debit-card") .header("x-coinflow-auth-user-id", "") .header("Content-Type", "application/json") .body("{\n \"expYear\": \"26\",\n \"expMonth\": \"12\",\n \"cardToken\": \"tok_1Hh1YZ2eZvKYlo2C3X9a7b8d\"\n}") .asString(); ``` ```php request('POST', 'https://api-sandbox.coinflow.cash/api/withdraw/debit-card', [ 'body' => '{ "expYear": "26", "expMonth": "12", "cardToken": "tok_1Hh1YZ2eZvKYlo2C3X9a7b8d" }', 'headers' => [ 'Content-Type' => 'application/json', 'x-coinflow-auth-user-id' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api-sandbox.coinflow.cash/api/withdraw/debit-card"); var request = new RestRequest(Method.POST); request.AddHeader("x-coinflow-auth-user-id", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"expYear\": \"26\",\n \"expMonth\": \"12\",\n \"cardToken\": \"tok_1Hh1YZ2eZvKYlo2C3X9a7b8d\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "x-coinflow-auth-user-id": "", "Content-Type": "application/json" ] let parameters = [ "expYear": "26", "expMonth": "12", "cardToken": "tok_1Hh1YZ2eZvKYlo2C3X9a7b8d" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.coinflow.cash/api/withdraw/debit-card")! 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 "Debit card added successfully" ``` #### IBAN (EUR / GBP) For EU and UK payouts via SEPA and UK Faster Payments. ### Request POST [https://api-sandbox.coinflow.cash/api/withdraw/iban](https://api-sandbox.coinflow.cash/api/withdraw/iban) ```curl curl -X POST https://api-sandbox.coinflow.cash/api/withdraw/iban \ -H "x-coinflow-auth-user-id: " \ -H "Content-Type: application/json" \ -d '{ "number": "GB29NWBK60161331926819" }' ``` ```python import requests url = "https://api-sandbox.coinflow.cash/api/withdraw/iban" payload = { "number": "GB29NWBK60161331926819" } headers = { "x-coinflow-auth-user-id": "", "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/iban'; const options = { method: 'POST', headers: {'x-coinflow-auth-user-id': '', 'Content-Type': 'application/json'}, body: '{"number":"GB29NWBK60161331926819"}' }; 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/iban" payload := strings.NewReader("{\n \"number\": \"GB29NWBK60161331926819\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-coinflow-auth-user-id", "") 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/iban") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-coinflow-auth-user-id"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"number\": \"GB29NWBK60161331926819\"\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api-sandbox.coinflow.cash/api/withdraw/iban") .header("x-coinflow-auth-user-id", "") .header("Content-Type", "application/json") .body("{\n \"number\": \"GB29NWBK60161331926819\"\n}") .asString(); ``` ```php request('POST', 'https://api-sandbox.coinflow.cash/api/withdraw/iban', [ 'body' => '{ "number": "GB29NWBK60161331926819" }', 'headers' => [ 'Content-Type' => 'application/json', 'x-coinflow-auth-user-id' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api-sandbox.coinflow.cash/api/withdraw/iban"); var request = new RestRequest(Method.POST); request.AddHeader("x-coinflow-auth-user-id", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"number\": \"GB29NWBK60161331926819\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "x-coinflow-auth-user-id": "", "Content-Type": "application/json" ] let parameters = ["number": "GB29NWBK60161331926819"] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.coinflow.cash/api/withdraw/iban")! 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 "eyJ0b2tlbiI6ICJhYmNkMTIzNDU2Nzg5In0=" ``` #### PIX (BRL) For Brazilian payouts via PIX. ### Request POST [https://api-sandbox.coinflow.cash/api/withdraw/pix](https://api-sandbox.coinflow.cash/api/withdraw/pix) ```curl curl -X POST https://api-sandbox.coinflow.cash/api/withdraw/pix \ -H "x-coinflow-auth-user-id: " \ -H "Content-Type: application/json" \ -d '{ "pixKey": "user12345@example.com" }' ``` ```python import requests url = "https://api-sandbox.coinflow.cash/api/withdraw/pix" payload = { "pixKey": "user12345@example.com" } headers = { "x-coinflow-auth-user-id": "", "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/pix'; const options = { method: 'POST', headers: {'x-coinflow-auth-user-id': '', 'Content-Type': 'application/json'}, body: '{"pixKey":"user12345@example.com"}' }; 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/pix" payload := strings.NewReader("{\n \"pixKey\": \"user12345@example.com\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-coinflow-auth-user-id", "") 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/pix") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-coinflow-auth-user-id"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"pixKey\": \"user12345@example.com\"\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api-sandbox.coinflow.cash/api/withdraw/pix") .header("x-coinflow-auth-user-id", "") .header("Content-Type", "application/json") .body("{\n \"pixKey\": \"user12345@example.com\"\n}") .asString(); ``` ```php request('POST', 'https://api-sandbox.coinflow.cash/api/withdraw/pix', [ 'body' => '{ "pixKey": "user12345@example.com" }', 'headers' => [ 'Content-Type' => 'application/json', 'x-coinflow-auth-user-id' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api-sandbox.coinflow.cash/api/withdraw/pix"); var request = new RestRequest(Method.POST); request.AddHeader("x-coinflow-auth-user-id", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"pixKey\": \"user12345@example.com\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "x-coinflow-auth-user-id": "", "Content-Type": "application/json" ] let parameters = ["pixKey": "user12345@example.com"] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.coinflow.cash/api/withdraw/pix")! 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 "Pix account created successfully for key user12345@example.com" ``` ### Step 4: Get a quote Before initiating, fetch a quote so you can show the user fees, expected delivery time, and how much they'll actually receive. The response includes every speed option available for their destination — `card` (instant), `asap` (RTP), `same_day` (Same-Day ACH), and `standard` (Standard ACH). ### Request GET [https://api-sandbox.coinflow.cash/api/withdraw/quote](https://api-sandbox.coinflow.cash/api/withdraw/quote) ```curl curl -G https://api-sandbox.coinflow.cash/api/withdraw/quote \ -H "x-coinflow-auth-wallet: " \ -d token=token \ -d amount=1.1 \ -d merchantId=merchantId ``` ```python import requests url = "https://api-sandbox.coinflow.cash/api/withdraw/quote" querystring = {"token":"token","amount":"1.1","merchantId":"merchantId"} headers = {"x-coinflow-auth-wallet": ""} response = requests.get(url, headers=headers, params=querystring) print(response.json()) ``` ```javascript const url = 'https://api-sandbox.coinflow.cash/api/withdraw/quote?token=token&amount=1.1&merchantId=merchantId'; const options = {method: 'GET', headers: {'x-coinflow-auth-wallet': ''}}; 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/withdraw/quote?token=token&amount=1.1&merchantId=merchantId" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("x-coinflow-auth-wallet", "") 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/quote?token=token&amount=1.1&merchantId=merchantId") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["x-coinflow-auth-wallet"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api-sandbox.coinflow.cash/api/withdraw/quote?token=token&amount=1.1&merchantId=merchantId") .header("x-coinflow-auth-wallet", "") .asString(); ``` ```php request('GET', 'https://api-sandbox.coinflow.cash/api/withdraw/quote?token=token&amount=1.1&merchantId=merchantId', [ 'headers' => [ 'x-coinflow-auth-wallet' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api-sandbox.coinflow.cash/api/withdraw/quote?token=token&amount=1.1&merchantId=merchantId"); var request = new RestRequest(Method.GET); request.AddHeader("x-coinflow-auth-wallet", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["x-coinflow-auth-wallet": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.coinflow.cash/api/withdraw/quote?token=token&amount=1.1&merchantId=merchantId")! 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 { "asap": { "fee": { "cents": 1, "currency": "USD" }, "limit": { "cents": 1, "currency": "USD" }, "finalSettlement": { "cents": 1, "currency": "USD" }, "expectedDeliveryDate": "string", "merchantFee": { "cents": 1, "currency": "USD" }, "expectedDeliveryDateISO": "string", "customFee": { "cents": 1, "currency": "USD", "label": "string" }, "accountIneligible": true }, "same_day": { "fee": { "cents": 1, "currency": "USD" }, "limit": { "cents": 1, "currency": "USD" }, "finalSettlement": { "cents": 1, "currency": "USD" }, "expectedDeliveryDate": "string", "merchantFee": { "cents": 1, "currency": "USD" }, "expectedDeliveryDateISO": "string", "customFee": { "cents": 1, "currency": "USD", "label": "string" }, "accountIneligible": true }, "standard": { "fee": { "cents": 1, "currency": "USD" }, "limit": { "cents": 1, "currency": "USD" }, "finalSettlement": { "cents": 1, "currency": "USD" }, "expectedDeliveryDate": "string", "merchantFee": { "cents": 1, "currency": "USD" }, "expectedDeliveryDateISO": "string", "customFee": { "cents": 1, "currency": "USD", "label": "string" }, "accountIneligible": true }, "card": { "fee": { "cents": 1, "currency": "USD" }, "limit": { "cents": 1, "currency": "USD" }, "finalSettlement": { "cents": 1, "currency": "USD" }, "expectedDeliveryDate": "string", "merchantFee": { "cents": 1, "currency": "USD" }, "expectedDeliveryDateISO": "string", "customFee": { "cents": 1, "currency": "USD", "label": "string" }, "accountIneligible": true }, "iban": { "fee": { "cents": 1, "currency": "USD" }, "limit": { "cents": 1, "currency": "USD" }, "finalSettlement": { "cents": 1, "currency": "USD" }, "expectedDeliveryDate": "string", "merchantFee": { "cents": 1, "currency": "USD" }, "expectedDeliveryDateISO": "string", "customFee": { "cents": 1, "currency": "USD", "label": "string" }, "accountIneligible": true }, "pix": { "fee": { "cents": 1, "currency": "USD" }, "limit": { "cents": 1, "currency": "USD" }, "finalSettlement": { "cents": 1, "currency": "USD" }, "expectedDeliveryDate": "string", "merchantFee": { "cents": 1, "currency": "USD" }, "expectedDeliveryDateISO": "string", "customFee": { "cents": 1, "currency": "USD", "label": "string" }, "accountIneligible": true }, "eft": { "fee": { "cents": 1, "currency": "USD" }, "limit": { "cents": 1, "currency": "USD" }, "finalSettlement": { "cents": 1, "currency": "USD" }, "expectedDeliveryDate": "string", "merchantFee": { "cents": 1, "currency": "USD" }, "expectedDeliveryDateISO": "string", "customFee": { "cents": 1, "currency": "USD", "label": "string" }, "accountIneligible": true }, "venmo": { "fee": { "cents": 1, "currency": "USD" }, "limit": { "cents": 1, "currency": "USD" }, "finalSettlement": { "cents": 1, "currency": "USD" }, "expectedDeliveryDate": "string", "merchantFee": { "cents": 1, "currency": "USD" }, "expectedDeliveryDateISO": "string", "customFee": { "cents": 1, "currency": "USD", "label": "string" }, "accountIneligible": true }, "paypal": { "fee": { "cents": 1, "currency": "USD" }, "limit": { "cents": 1, "currency": "USD" }, "finalSettlement": { "cents": 1, "currency": "USD" }, "expectedDeliveryDate": "string", "merchantFee": { "cents": 1, "currency": "USD" }, "expectedDeliveryDateISO": "string", "customFee": { "cents": 1, "currency": "USD", "label": "string" }, "accountIneligible": true }, "wire": { "fee": { "cents": 1, "currency": "USD" }, "limit": { "cents": 1, "currency": "USD" }, "finalSettlement": { "cents": 1, "currency": "USD" }, "expectedDeliveryDate": "string", "merchantFee": { "cents": 1, "currency": "USD" }, "expectedDeliveryDateISO": "string", "customFee": { "cents": 1, "currency": "USD", "label": "string" }, "accountIneligible": true }, "interac": { "fee": { "cents": 1, "currency": "USD" }, "limit": { "cents": 1, "currency": "USD" }, "finalSettlement": { "cents": 1, "currency": "USD" }, "expectedDeliveryDate": "string", "merchantFee": { "cents": 1, "currency": "USD" }, "expectedDeliveryDateISO": "string", "customFee": { "cents": 1, "currency": "USD", "label": "string" }, "accountIneligible": true }, "swift": { "fee": { "cents": 1, "currency": "USD" }, "limit": { "cents": 1, "currency": "USD" }, "finalSettlement": { "cents": 1, "currency": "USD" }, "expectedDeliveryDate": "string", "merchantFee": { "cents": 1, "currency": "USD" }, "expectedDeliveryDateISO": "string", "customFee": { "cents": 1, "currency": "USD", "label": "string" }, "accountIneligible": true }, "crypto": { "fee": { "cents": 1, "currency": "USD" }, "limit": { "cents": 1, "currency": "USD" }, "finalSettlement": { "cents": 1, "currency": "USD" }, "expectedDeliveryDate": "string", "merchantFee": { "cents": 1, "currency": "USD" }, "expectedDeliveryDateISO": "string", "customFee": { "cents": 1, "currency": "USD", "label": "string" }, "accountIneligible": true }, "quote": { "cents": 1, "currency": "USD" }, "gasFees": { "gasFees": { "cents": 1, "currency": "USD" }, "gasFeesWei": "string" }, "swapFees": { "cents": 1, "currency": "USD" } } ``` ### Step 5: Initiate the payout Submit the payout. Your Coinflow wallet is debited; the user's funds are sent to their selected destination. | `speed` value | Method | Typical delivery | | ------------- | ------------------------ | ------------------- | | `card` | Push-to-card | Instant (seconds) | | `asap` | RTP (Real-Time Payments) | Instant (seconds) | | `same_day` | Same-Day ACH | Within business day | | `standard` | Standard ACH | 1–3 business days | | `iban` | SEPA | 1–2 business days | | `pix` | PIX | Instant (seconds) | ### 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: " \ -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": "", "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: '', '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", "") 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"] = '' 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 response = Unirest.post("https://api-sandbox.coinflow.cash/api/merchant/withdraws/payout/delegated") .header("Authorization", "") .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 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' => '', '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", ""); 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": "", "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" } ``` > **Info** > > **`effectiveSpeed` may differ from the `speed` you requested.** Same-Day ACH requests above NACHA's per-transaction limit (\$1,000,000) are automatically downgraded to `standard`. Always read `effectiveSpeed` from the response to confirm how the payout was actually processed. ### Step 6: Monitor Track payouts through whichever channel suits your operations: * **[Withdraw webhooks](/guides/developer-resources/webhooks/withdraw-webhooks)** — recommended. Receive real-time status changes (initiated, settled, failed, returned). * **[Merchant dashboard](https://sandbox-merchant.coinflow.cash/withdraws)** — visual interface for support and ops teams. * **[Get Balance](/api-reference/api-reference/merchant/get-payout-balance)** — check your remaining Coinflow wallet programmatically. --- ## Advanced #### Funding your Coinflow wallet In **sandbox**, contact the Coinflow team to provision test funds — there's no production money involved. In **production**, your Coinflow wallet fills automatically from Coinflow Checkout proceeds. If you need to top up directly (e.g., to seed payouts before you've taken any pay-ins), contact the Coinflow team for wire instructions. #### No pre-built UI for the full payout flow Coinflow does not currently provide a drop-in UI for merchant-initiated payouts — this integration is API-driven. You can use Coinflow's [Bank Authentication UI](/guides/payouts/implementation-methods/bank-authentication-ui) for the KYC and destination-linking portion only, then call the quote and payout endpoints from your own UI for the rest of the flow. --- ## FAQ #### What does a 451 verification response mean? Coinflow needs additional information from the withdrawer (commonly a photo ID and selfie). The response body includes a `verificationLink` — redirect the user there. Once they complete the steps, poll `GET /withdraw` and check `verification.status === "approved"`. #### Why is bank authentication required? Bank authentication confirms the user owns the account they're connecting. Per AML policy, Coinflow requires it before any withdrawal. It also prevents fraud, reduces failed payments, and protects against chargebacks. #### How do I tokenize a debit card for push-to-card? Raw card numbers must never reach your servers (PCI compliance). Coinflow provides PCI-compliant tokenization through hosted iframe components. * **Without a PCI DSS AOC:** use [Tokenize Debit Cards for Withdraws](/recipes/recipes/tokenize-debit-cards-for-withdraws). * **With a valid AOC:** use [Tokenize Card Data via API for Debit Card Payouts](/recipes/recipes/tokenize-card-data-via-api-for-debit-card-payouts). #### How do I know if I have a valid PCI DSS AOC? Merchants need a current Attestation of Compliance (AOC) from a Qualified Security Assessor. Sample formats: [merchant AOC](https://docs-prv.pcisecuritystandards.org/PCI%20DSS/Reporting%20Template%20or%20Form/PCI-DSS-v4-0-1-ROC-AOC-Merchants.pdf), [service-provider AOC](https://docs-prv.pcisecuritystandards.org/PCI%20DSS/Reporting%20Template%20or%20Form/PCI-DSS-v4-0-1-ROC-AOC-Service-Providers.pdf). If you're implementing on behalf of a merchant, you need a service-provider AOC. --- ## Next steps #### [Test in sandbox](https://sandbox-merchant.coinflow.cash/withdraws) Use the sandbox dashboard to watch test payouts move through the system. #### [Configure webhooks](/guides/developer-resources/webhooks/withdraw-webhooks) Get real-time status updates for every payout. #### [Common errors](/guides/payouts/beyond-payouts/common-payout-errors) Troubleshoot failed verifications, declined cards, and payout failures. #### [Go live](https://merchant.coinflow.cash/register) Contact the Coinflow team to activate production access. > Send payouts to your users' bank accounts and debit cards, funded by your Coinflow wallet.