Create Iban Account
POST https://api-sandbox.coinflow.cash/api/withdraw/iban Content-Type: application/json
Creates an Iban account for a particular user
Reference: /api-reference/api-reference/withdraw/create-iban-account
Authentication
x-coinflow-auth-user-idheader (required) — The external identifier of the end user - see /api-reference/api-reference/authentication/get-session-keyAuthorizationheader (required) — The API key of the merchant - see /api-reference/api-reference/authentication/get-session-keyx-coinflow-auth-walletheader (required) — The web3 wallet of the end user - see /api-reference/api-reference/authentication/get-session-keyx-coinflow-auth-blockchainheader (required) — The blockchain associated with the end user - see /api-reference/api-reference/authentication/get-session-keyx-coinflow-auth-merchant-idheader (required) — The merchant ID the session should be generated forx-coinflow-auth-session-keyheader (required) — The session key generated for the end user - see /api-reference/api-reference/authentication/get-session-key
Request
Body (application/json)
number(string, required) — The IBAN number or in the case of the UK the 8-digit account numbersortCode(string, optional) — Only used for the UK, the 6-digit sort codebic(string, optional) — Only used for the Sepa, the bank identifier code - required when requestedaccountHolder(string, optional) — The account holder name registered with the bank - required when requested (e.g. when a Verification of Payee check needs the exact name)alias(string, optional)
Response
200
Token representing the new Iban account
string
Examples
Request
{
"number": "GB29NWBK60161331926819"
}
Response
"eyJ0b2tlbiI6ICJhYmNkMTIzNDU2Nzg5In0="
SDK Code
import requests
url = "https://api-sandbox.coinflow.cash/api/withdraw/iban"
payload = { "number": "GB29NWBK60161331926819" }
headers = {
"x-coinflow-auth-user-id": "<apiKey>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = 'https://api-sandbox.coinflow.cash/api/withdraw/iban';
const options = {
method: 'POST',
headers: {'x-coinflow-auth-user-id': '<apiKey>', '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);
}
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", "<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))
}
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"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": \"GB29NWBK60161331926819\"\n}"
response = http.request(request)
puts response.read_body
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
HttpResponse<String> response = Unirest.post("https://api-sandbox.coinflow.cash/api/withdraw/iban")
.header("x-coinflow-auth-user-id", "<apiKey>")
.header("Content-Type", "application/json")
.body("{\n \"number\": \"GB29NWBK60161331926819\"\n}")
.asString();
<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://api-sandbox.coinflow.cash/api/withdraw/iban', [
'body' => '{
"number": "GB29NWBK60161331926819"
}',
'headers' => [
'Content-Type' => 'application/json',
'x-coinflow-auth-user-id' => '<apiKey>',
],
]);
echo $response->getBody();
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", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"number\": \"GB29NWBK60161331926819\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import Foundation
let headers = [
"x-coinflow-auth-user-id": "<apiKey>",
"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()