Payouts - Create
curl --request POST \
--url https://sandbox.foldd.com/payouts/create \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data @- <<EOF
{
"amount": 1,
"routing": {
"type": "single",
"data": {
"merchant_connector_id": "<string>"
}
},
"connector": [
"wise",
"adyen"
],
"confirm": true,
"payout_method_data": {
"card": {
"card_number": "4242424242424242",
"expiry_month": "<string>",
"expiry_year": "<string>",
"card_holder_name": "John Doe"
}
},
"billing": {
"address": {
"city": "New York",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
},
"email": "<string>"
},
"auto_fulfill": true,
"customer_id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"customer": {
"id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"name": "John Doe",
"email": "johntest@test.com",
"phone": "9123456789",
"phone_country_code": "+1"
},
"return_url": "https://foldd.com",
"business_label": "food",
"description": "It's my first payout request",
"recurring": false,
"metadata": {},
"payout_token": "187282ab-40ef-47a9-9206-5099ba31e432",
"profile_id": "<string>",
"payout_link": true,
"payout_link_config": {
"logo": "https://foldd.com/favicon.ico",
"merchant_name": "Foldd",
"theme": "#4285F4",
"payout_link_id": "pm_collect_link_2bdacf398vwzq5n422S1",
"enabled_payment_methods": "[{\"payment_method\": \"bank_transfer\", \"payment_method_types\": [\"ach\", \"bacs\"]}]",
"test_mode": false
},
"session_expiry": 900,
"email": "johntest@test.com",
"name": "John Test",
"phone": "9123456789",
"phone_country_code": "+1",
"payout_method_id": "<string>"
}
EOFimport requests
url = "https://sandbox.foldd.com/payouts/create"
payload = {
"amount": 1,
"routing": {
"type": "single",
"data": { "merchant_connector_id": "<string>" }
},
"connector": ["wise", "adyen"],
"confirm": True,
"payout_method_data": { "card": {
"card_number": "4242424242424242",
"expiry_month": "<string>",
"expiry_year": "<string>",
"card_holder_name": "John Doe"
} },
"billing": {
"address": {
"city": "New York",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
},
"email": "<string>"
},
"auto_fulfill": True,
"customer_id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"customer": {
"id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"name": "John Doe",
"email": "johntest@test.com",
"phone": "9123456789",
"phone_country_code": "+1"
},
"return_url": "https://foldd.com",
"business_label": "food",
"description": "It's my first payout request",
"recurring": False,
"metadata": {},
"payout_token": "187282ab-40ef-47a9-9206-5099ba31e432",
"profile_id": "<string>",
"payout_link": True,
"payout_link_config": {
"logo": "https://foldd.com/favicon.ico",
"merchant_name": "Foldd",
"theme": "#4285F4",
"payout_link_id": "pm_collect_link_2bdacf398vwzq5n422S1",
"enabled_payment_methods": "[{\"payment_method\": \"bank_transfer\", \"payment_method_types\": [\"ach\", \"bacs\"]}]",
"test_mode": False
},
"session_expiry": 900,
"email": "johntest@test.com",
"name": "John Test",
"phone": "9123456789",
"phone_country_code": "+1",
"payout_method_id": "<string>"
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 1,
routing: {type: 'single', data: {merchant_connector_id: '<string>'}},
connector: ['wise', 'adyen'],
confirm: true,
payout_method_data: {
card: {
card_number: '4242424242424242',
expiry_month: '<string>',
expiry_year: '<string>',
card_holder_name: 'John Doe'
}
},
billing: {
address: {
city: 'New York',
line1: '123, King Street',
line2: 'Powelson Avenue',
line3: 'Bridgewater',
zip: '08807',
state: 'New York',
first_name: 'John',
last_name: 'Doe'
},
phone: {number: '9123456789', country_code: '+1'},
email: '<string>'
},
auto_fulfill: true,
customer_id: 'cus_y3oqhf46pyzuxjbcn2giaqnb44',
customer: {
id: 'cus_y3oqhf46pyzuxjbcn2giaqnb44',
name: 'John Doe',
email: 'johntest@test.com',
phone: '9123456789',
phone_country_code: '+1'
},
return_url: 'https://foldd.com',
business_label: 'food',
description: 'It\'s my first payout request',
recurring: false,
metadata: {},
payout_token: '187282ab-40ef-47a9-9206-5099ba31e432',
profile_id: '<string>',
payout_link: true,
payout_link_config: {
logo: 'https://foldd.com/favicon.ico',
merchant_name: 'Foldd',
theme: '#4285F4',
payout_link_id: 'pm_collect_link_2bdacf398vwzq5n422S1',
enabled_payment_methods: '[{"payment_method": "bank_transfer", "payment_method_types": ["ach", "bacs"]}]',
test_mode: false
},
session_expiry: 900,
email: 'johntest@test.com',
name: 'John Test',
phone: '9123456789',
phone_country_code: '+1',
payout_method_id: '<string>'
})
};
fetch('https://sandbox.foldd.com/payouts/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.foldd.com/payouts/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 1,
'routing' => [
'type' => 'single',
'data' => [
'merchant_connector_id' => '<string>'
]
],
'connector' => [
'wise',
'adyen'
],
'confirm' => true,
'payout_method_data' => [
'card' => [
'card_number' => '4242424242424242',
'expiry_month' => '<string>',
'expiry_year' => '<string>',
'card_holder_name' => 'John Doe'
]
],
'billing' => [
'address' => [
'city' => 'New York',
'line1' => '123, King Street',
'line2' => 'Powelson Avenue',
'line3' => 'Bridgewater',
'zip' => '08807',
'state' => 'New York',
'first_name' => 'John',
'last_name' => 'Doe'
],
'phone' => [
'number' => '9123456789',
'country_code' => '+1'
],
'email' => '<string>'
],
'auto_fulfill' => true,
'customer_id' => 'cus_y3oqhf46pyzuxjbcn2giaqnb44',
'customer' => [
'id' => 'cus_y3oqhf46pyzuxjbcn2giaqnb44',
'name' => 'John Doe',
'email' => 'johntest@test.com',
'phone' => '9123456789',
'phone_country_code' => '+1'
],
'return_url' => 'https://foldd.com',
'business_label' => 'food',
'description' => 'It\'s my first payout request',
'recurring' => false,
'metadata' => [
],
'payout_token' => '187282ab-40ef-47a9-9206-5099ba31e432',
'profile_id' => '<string>',
'payout_link' => true,
'payout_link_config' => [
'logo' => 'https://foldd.com/favicon.ico',
'merchant_name' => 'Foldd',
'theme' => '#4285F4',
'payout_link_id' => 'pm_collect_link_2bdacf398vwzq5n422S1',
'enabled_payment_methods' => '[{"payment_method": "bank_transfer", "payment_method_types": ["ach", "bacs"]}]',
'test_mode' => false
],
'session_expiry' => 900,
'email' => 'johntest@test.com',
'name' => 'John Test',
'phone' => '9123456789',
'phone_country_code' => '+1',
'payout_method_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.foldd.com/payouts/create"
payload := strings.NewReader("{\n \"amount\": 1,\n \"routing\": {\n \"type\": \"single\",\n \"data\": {\n \"merchant_connector_id\": \"<string>\"\n }\n },\n \"connector\": [\n \"wise\",\n \"adyen\"\n ],\n \"confirm\": true,\n \"payout_method_data\": {\n \"card\": {\n \"card_number\": \"4242424242424242\",\n \"expiry_month\": \"<string>\",\n \"expiry_year\": \"<string>\",\n \"card_holder_name\": \"John Doe\"\n }\n },\n \"billing\": {\n \"address\": {\n \"city\": \"New York\",\n \"line1\": \"123, King Street\",\n \"line2\": \"Powelson Avenue\",\n \"line3\": \"Bridgewater\",\n \"zip\": \"08807\",\n \"state\": \"New York\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\"\n },\n \"phone\": {\n \"number\": \"9123456789\",\n \"country_code\": \"+1\"\n },\n \"email\": \"<string>\"\n },\n \"auto_fulfill\": true,\n \"customer_id\": \"cus_y3oqhf46pyzuxjbcn2giaqnb44\",\n \"customer\": {\n \"id\": \"cus_y3oqhf46pyzuxjbcn2giaqnb44\",\n \"name\": \"John Doe\",\n \"email\": \"johntest@test.com\",\n \"phone\": \"9123456789\",\n \"phone_country_code\": \"+1\"\n },\n \"return_url\": \"https://foldd.com\",\n \"business_label\": \"food\",\n \"description\": \"It's my first payout request\",\n \"recurring\": false,\n \"metadata\": {},\n \"payout_token\": \"187282ab-40ef-47a9-9206-5099ba31e432\",\n \"profile_id\": \"<string>\",\n \"payout_link\": true,\n \"payout_link_config\": {\n \"logo\": \"https://foldd.com/favicon.ico\",\n \"merchant_name\": \"Foldd\",\n \"theme\": \"#4285F4\",\n \"payout_link_id\": \"pm_collect_link_2bdacf398vwzq5n422S1\",\n \"enabled_payment_methods\": \"[{\\\"payment_method\\\": \\\"bank_transfer\\\", \\\"payment_method_types\\\": [\\\"ach\\\", \\\"bacs\\\"]}]\",\n \"test_mode\": false\n },\n \"session_expiry\": 900,\n \"email\": \"johntest@test.com\",\n \"name\": \"John Test\",\n \"phone\": \"9123456789\",\n \"phone_country_code\": \"+1\",\n \"payout_method_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.foldd.com/payouts/create")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 1,\n \"routing\": {\n \"type\": \"single\",\n \"data\": {\n \"merchant_connector_id\": \"<string>\"\n }\n },\n \"connector\": [\n \"wise\",\n \"adyen\"\n ],\n \"confirm\": true,\n \"payout_method_data\": {\n \"card\": {\n \"card_number\": \"4242424242424242\",\n \"expiry_month\": \"<string>\",\n \"expiry_year\": \"<string>\",\n \"card_holder_name\": \"John Doe\"\n }\n },\n \"billing\": {\n \"address\": {\n \"city\": \"New York\",\n \"line1\": \"123, King Street\",\n \"line2\": \"Powelson Avenue\",\n \"line3\": \"Bridgewater\",\n \"zip\": \"08807\",\n \"state\": \"New York\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\"\n },\n \"phone\": {\n \"number\": \"9123456789\",\n \"country_code\": \"+1\"\n },\n \"email\": \"<string>\"\n },\n \"auto_fulfill\": true,\n \"customer_id\": \"cus_y3oqhf46pyzuxjbcn2giaqnb44\",\n \"customer\": {\n \"id\": \"cus_y3oqhf46pyzuxjbcn2giaqnb44\",\n \"name\": \"John Doe\",\n \"email\": \"johntest@test.com\",\n \"phone\": \"9123456789\",\n \"phone_country_code\": \"+1\"\n },\n \"return_url\": \"https://foldd.com\",\n \"business_label\": \"food\",\n \"description\": \"It's my first payout request\",\n \"recurring\": false,\n \"metadata\": {},\n \"payout_token\": \"187282ab-40ef-47a9-9206-5099ba31e432\",\n \"profile_id\": \"<string>\",\n \"payout_link\": true,\n \"payout_link_config\": {\n \"logo\": \"https://foldd.com/favicon.ico\",\n \"merchant_name\": \"Foldd\",\n \"theme\": \"#4285F4\",\n \"payout_link_id\": \"pm_collect_link_2bdacf398vwzq5n422S1\",\n \"enabled_payment_methods\": \"[{\\\"payment_method\\\": \\\"bank_transfer\\\", \\\"payment_method_types\\\": [\\\"ach\\\", \\\"bacs\\\"]}]\",\n \"test_mode\": false\n },\n \"session_expiry\": 900,\n \"email\": \"johntest@test.com\",\n \"name\": \"John Test\",\n \"phone\": \"9123456789\",\n \"phone_country_code\": \"+1\",\n \"payout_method_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.foldd.com/payouts/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 1,\n \"routing\": {\n \"type\": \"single\",\n \"data\": {\n \"merchant_connector_id\": \"<string>\"\n }\n },\n \"connector\": [\n \"wise\",\n \"adyen\"\n ],\n \"confirm\": true,\n \"payout_method_data\": {\n \"card\": {\n \"card_number\": \"4242424242424242\",\n \"expiry_month\": \"<string>\",\n \"expiry_year\": \"<string>\",\n \"card_holder_name\": \"John Doe\"\n }\n },\n \"billing\": {\n \"address\": {\n \"city\": \"New York\",\n \"line1\": \"123, King Street\",\n \"line2\": \"Powelson Avenue\",\n \"line3\": \"Bridgewater\",\n \"zip\": \"08807\",\n \"state\": \"New York\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\"\n },\n \"phone\": {\n \"number\": \"9123456789\",\n \"country_code\": \"+1\"\n },\n \"email\": \"<string>\"\n },\n \"auto_fulfill\": true,\n \"customer_id\": \"cus_y3oqhf46pyzuxjbcn2giaqnb44\",\n \"customer\": {\n \"id\": \"cus_y3oqhf46pyzuxjbcn2giaqnb44\",\n \"name\": \"John Doe\",\n \"email\": \"johntest@test.com\",\n \"phone\": \"9123456789\",\n \"phone_country_code\": \"+1\"\n },\n \"return_url\": \"https://foldd.com\",\n \"business_label\": \"food\",\n \"description\": \"It's my first payout request\",\n \"recurring\": false,\n \"metadata\": {},\n \"payout_token\": \"187282ab-40ef-47a9-9206-5099ba31e432\",\n \"profile_id\": \"<string>\",\n \"payout_link\": true,\n \"payout_link_config\": {\n \"logo\": \"https://foldd.com/favicon.ico\",\n \"merchant_name\": \"Foldd\",\n \"theme\": \"#4285F4\",\n \"payout_link_id\": \"pm_collect_link_2bdacf398vwzq5n422S1\",\n \"enabled_payment_methods\": \"[{\\\"payment_method\\\": \\\"bank_transfer\\\", \\\"payment_method_types\\\": [\\\"ach\\\", \\\"bacs\\\"]}]\",\n \"test_mode\": false\n },\n \"session_expiry\": 900,\n \"email\": \"johntest@test.com\",\n \"name\": \"John Test\",\n \"phone\": \"9123456789\",\n \"phone_country_code\": \"+1\",\n \"payout_method_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"payout_id": "187282ab-40ef-47a9-9206-5099ba31e432",
"merchant_id": "merchant_1668273825",
"amount": 1000,
"currency": "AED",
"auto_fulfill": true,
"customer_id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"client_secret": "pay_U42c409qyHwOkWo3vK60_secret_el9ksDkiB8hi6j9N78yo",
"return_url": "https://foldd.com",
"business_country": "AF",
"entity_type": "Individual",
"recurring": false,
"status": "success",
"profile_id": "<string>",
"connector": "wise",
"payout_type": "card",
"payout_method_data": {
"card": {
"card_exp_month": "01",
"card_exp_year": "2026",
"card_holder_name": "John Doe",
"card_issuer": "<string>",
"card_network": "Visa",
"card_type": "<string>",
"card_issuing_country": "<string>",
"bank_code": "<string>",
"last4": "<string>",
"card_isin": "<string>",
"card_extended_bin": "<string>"
}
},
"billing": {
"address": {
"city": "New York",
"country": "AF",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
},
"email": "<string>"
},
"customer": {
"id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"name": "John Doe",
"email": "johntest@test.com",
"phone": "9123456789",
"phone_country_code": "+1"
},
"business_label": "food",
"description": "It's my first payout request",
"metadata": {},
"merchant_connector_id": "mca_sAD3OZLATetvjLOYhUSy",
"error_message": "Failed while verifying the card",
"error_code": "E0001",
"created": "2022-09-10T10:11:12Z",
"connector_transaction_id": "S3FC9G9M2MVFDXT5",
"priority": "instant",
"attempts": [
{
"attempt_id": "<string>",
"status": "success",
"amount": 6583,
"currency": "AED",
"connector": "<string>",
"error_code": "<string>",
"error_message": "<string>",
"payment_method": "card",
"payout_method_type": "ach",
"connector_transaction_id": "<string>",
"cancellation_reason": "<string>",
"unified_code": "UE_000",
"unified_message": "Invalid card details"
}
],
"payout_link": {
"payout_link_id": "<string>",
"link": "<string>"
},
"email": "johntest@test.com",
"name": "John Test",
"phone": "9123456789",
"phone_country_code": "+1",
"unified_code": "UE_000",
"unified_message": "Invalid card details",
"payout_method_id": "<string>"
}Payouts
Payouts - Create
POST
/
payouts
/
create
Payouts - Create
curl --request POST \
--url https://sandbox.foldd.com/payouts/create \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data @- <<EOF
{
"amount": 1,
"routing": {
"type": "single",
"data": {
"merchant_connector_id": "<string>"
}
},
"connector": [
"wise",
"adyen"
],
"confirm": true,
"payout_method_data": {
"card": {
"card_number": "4242424242424242",
"expiry_month": "<string>",
"expiry_year": "<string>",
"card_holder_name": "John Doe"
}
},
"billing": {
"address": {
"city": "New York",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
},
"email": "<string>"
},
"auto_fulfill": true,
"customer_id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"customer": {
"id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"name": "John Doe",
"email": "johntest@test.com",
"phone": "9123456789",
"phone_country_code": "+1"
},
"return_url": "https://foldd.com",
"business_label": "food",
"description": "It's my first payout request",
"recurring": false,
"metadata": {},
"payout_token": "187282ab-40ef-47a9-9206-5099ba31e432",
"profile_id": "<string>",
"payout_link": true,
"payout_link_config": {
"logo": "https://foldd.com/favicon.ico",
"merchant_name": "Foldd",
"theme": "#4285F4",
"payout_link_id": "pm_collect_link_2bdacf398vwzq5n422S1",
"enabled_payment_methods": "[{\"payment_method\": \"bank_transfer\", \"payment_method_types\": [\"ach\", \"bacs\"]}]",
"test_mode": false
},
"session_expiry": 900,
"email": "johntest@test.com",
"name": "John Test",
"phone": "9123456789",
"phone_country_code": "+1",
"payout_method_id": "<string>"
}
EOFimport requests
url = "https://sandbox.foldd.com/payouts/create"
payload = {
"amount": 1,
"routing": {
"type": "single",
"data": { "merchant_connector_id": "<string>" }
},
"connector": ["wise", "adyen"],
"confirm": True,
"payout_method_data": { "card": {
"card_number": "4242424242424242",
"expiry_month": "<string>",
"expiry_year": "<string>",
"card_holder_name": "John Doe"
} },
"billing": {
"address": {
"city": "New York",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
},
"email": "<string>"
},
"auto_fulfill": True,
"customer_id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"customer": {
"id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"name": "John Doe",
"email": "johntest@test.com",
"phone": "9123456789",
"phone_country_code": "+1"
},
"return_url": "https://foldd.com",
"business_label": "food",
"description": "It's my first payout request",
"recurring": False,
"metadata": {},
"payout_token": "187282ab-40ef-47a9-9206-5099ba31e432",
"profile_id": "<string>",
"payout_link": True,
"payout_link_config": {
"logo": "https://foldd.com/favicon.ico",
"merchant_name": "Foldd",
"theme": "#4285F4",
"payout_link_id": "pm_collect_link_2bdacf398vwzq5n422S1",
"enabled_payment_methods": "[{\"payment_method\": \"bank_transfer\", \"payment_method_types\": [\"ach\", \"bacs\"]}]",
"test_mode": False
},
"session_expiry": 900,
"email": "johntest@test.com",
"name": "John Test",
"phone": "9123456789",
"phone_country_code": "+1",
"payout_method_id": "<string>"
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 1,
routing: {type: 'single', data: {merchant_connector_id: '<string>'}},
connector: ['wise', 'adyen'],
confirm: true,
payout_method_data: {
card: {
card_number: '4242424242424242',
expiry_month: '<string>',
expiry_year: '<string>',
card_holder_name: 'John Doe'
}
},
billing: {
address: {
city: 'New York',
line1: '123, King Street',
line2: 'Powelson Avenue',
line3: 'Bridgewater',
zip: '08807',
state: 'New York',
first_name: 'John',
last_name: 'Doe'
},
phone: {number: '9123456789', country_code: '+1'},
email: '<string>'
},
auto_fulfill: true,
customer_id: 'cus_y3oqhf46pyzuxjbcn2giaqnb44',
customer: {
id: 'cus_y3oqhf46pyzuxjbcn2giaqnb44',
name: 'John Doe',
email: 'johntest@test.com',
phone: '9123456789',
phone_country_code: '+1'
},
return_url: 'https://foldd.com',
business_label: 'food',
description: 'It\'s my first payout request',
recurring: false,
metadata: {},
payout_token: '187282ab-40ef-47a9-9206-5099ba31e432',
profile_id: '<string>',
payout_link: true,
payout_link_config: {
logo: 'https://foldd.com/favicon.ico',
merchant_name: 'Foldd',
theme: '#4285F4',
payout_link_id: 'pm_collect_link_2bdacf398vwzq5n422S1',
enabled_payment_methods: '[{"payment_method": "bank_transfer", "payment_method_types": ["ach", "bacs"]}]',
test_mode: false
},
session_expiry: 900,
email: 'johntest@test.com',
name: 'John Test',
phone: '9123456789',
phone_country_code: '+1',
payout_method_id: '<string>'
})
};
fetch('https://sandbox.foldd.com/payouts/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.foldd.com/payouts/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 1,
'routing' => [
'type' => 'single',
'data' => [
'merchant_connector_id' => '<string>'
]
],
'connector' => [
'wise',
'adyen'
],
'confirm' => true,
'payout_method_data' => [
'card' => [
'card_number' => '4242424242424242',
'expiry_month' => '<string>',
'expiry_year' => '<string>',
'card_holder_name' => 'John Doe'
]
],
'billing' => [
'address' => [
'city' => 'New York',
'line1' => '123, King Street',
'line2' => 'Powelson Avenue',
'line3' => 'Bridgewater',
'zip' => '08807',
'state' => 'New York',
'first_name' => 'John',
'last_name' => 'Doe'
],
'phone' => [
'number' => '9123456789',
'country_code' => '+1'
],
'email' => '<string>'
],
'auto_fulfill' => true,
'customer_id' => 'cus_y3oqhf46pyzuxjbcn2giaqnb44',
'customer' => [
'id' => 'cus_y3oqhf46pyzuxjbcn2giaqnb44',
'name' => 'John Doe',
'email' => 'johntest@test.com',
'phone' => '9123456789',
'phone_country_code' => '+1'
],
'return_url' => 'https://foldd.com',
'business_label' => 'food',
'description' => 'It\'s my first payout request',
'recurring' => false,
'metadata' => [
],
'payout_token' => '187282ab-40ef-47a9-9206-5099ba31e432',
'profile_id' => '<string>',
'payout_link' => true,
'payout_link_config' => [
'logo' => 'https://foldd.com/favicon.ico',
'merchant_name' => 'Foldd',
'theme' => '#4285F4',
'payout_link_id' => 'pm_collect_link_2bdacf398vwzq5n422S1',
'enabled_payment_methods' => '[{"payment_method": "bank_transfer", "payment_method_types": ["ach", "bacs"]}]',
'test_mode' => false
],
'session_expiry' => 900,
'email' => 'johntest@test.com',
'name' => 'John Test',
'phone' => '9123456789',
'phone_country_code' => '+1',
'payout_method_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.foldd.com/payouts/create"
payload := strings.NewReader("{\n \"amount\": 1,\n \"routing\": {\n \"type\": \"single\",\n \"data\": {\n \"merchant_connector_id\": \"<string>\"\n }\n },\n \"connector\": [\n \"wise\",\n \"adyen\"\n ],\n \"confirm\": true,\n \"payout_method_data\": {\n \"card\": {\n \"card_number\": \"4242424242424242\",\n \"expiry_month\": \"<string>\",\n \"expiry_year\": \"<string>\",\n \"card_holder_name\": \"John Doe\"\n }\n },\n \"billing\": {\n \"address\": {\n \"city\": \"New York\",\n \"line1\": \"123, King Street\",\n \"line2\": \"Powelson Avenue\",\n \"line3\": \"Bridgewater\",\n \"zip\": \"08807\",\n \"state\": \"New York\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\"\n },\n \"phone\": {\n \"number\": \"9123456789\",\n \"country_code\": \"+1\"\n },\n \"email\": \"<string>\"\n },\n \"auto_fulfill\": true,\n \"customer_id\": \"cus_y3oqhf46pyzuxjbcn2giaqnb44\",\n \"customer\": {\n \"id\": \"cus_y3oqhf46pyzuxjbcn2giaqnb44\",\n \"name\": \"John Doe\",\n \"email\": \"johntest@test.com\",\n \"phone\": \"9123456789\",\n \"phone_country_code\": \"+1\"\n },\n \"return_url\": \"https://foldd.com\",\n \"business_label\": \"food\",\n \"description\": \"It's my first payout request\",\n \"recurring\": false,\n \"metadata\": {},\n \"payout_token\": \"187282ab-40ef-47a9-9206-5099ba31e432\",\n \"profile_id\": \"<string>\",\n \"payout_link\": true,\n \"payout_link_config\": {\n \"logo\": \"https://foldd.com/favicon.ico\",\n \"merchant_name\": \"Foldd\",\n \"theme\": \"#4285F4\",\n \"payout_link_id\": \"pm_collect_link_2bdacf398vwzq5n422S1\",\n \"enabled_payment_methods\": \"[{\\\"payment_method\\\": \\\"bank_transfer\\\", \\\"payment_method_types\\\": [\\\"ach\\\", \\\"bacs\\\"]}]\",\n \"test_mode\": false\n },\n \"session_expiry\": 900,\n \"email\": \"johntest@test.com\",\n \"name\": \"John Test\",\n \"phone\": \"9123456789\",\n \"phone_country_code\": \"+1\",\n \"payout_method_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.foldd.com/payouts/create")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 1,\n \"routing\": {\n \"type\": \"single\",\n \"data\": {\n \"merchant_connector_id\": \"<string>\"\n }\n },\n \"connector\": [\n \"wise\",\n \"adyen\"\n ],\n \"confirm\": true,\n \"payout_method_data\": {\n \"card\": {\n \"card_number\": \"4242424242424242\",\n \"expiry_month\": \"<string>\",\n \"expiry_year\": \"<string>\",\n \"card_holder_name\": \"John Doe\"\n }\n },\n \"billing\": {\n \"address\": {\n \"city\": \"New York\",\n \"line1\": \"123, King Street\",\n \"line2\": \"Powelson Avenue\",\n \"line3\": \"Bridgewater\",\n \"zip\": \"08807\",\n \"state\": \"New York\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\"\n },\n \"phone\": {\n \"number\": \"9123456789\",\n \"country_code\": \"+1\"\n },\n \"email\": \"<string>\"\n },\n \"auto_fulfill\": true,\n \"customer_id\": \"cus_y3oqhf46pyzuxjbcn2giaqnb44\",\n \"customer\": {\n \"id\": \"cus_y3oqhf46pyzuxjbcn2giaqnb44\",\n \"name\": \"John Doe\",\n \"email\": \"johntest@test.com\",\n \"phone\": \"9123456789\",\n \"phone_country_code\": \"+1\"\n },\n \"return_url\": \"https://foldd.com\",\n \"business_label\": \"food\",\n \"description\": \"It's my first payout request\",\n \"recurring\": false,\n \"metadata\": {},\n \"payout_token\": \"187282ab-40ef-47a9-9206-5099ba31e432\",\n \"profile_id\": \"<string>\",\n \"payout_link\": true,\n \"payout_link_config\": {\n \"logo\": \"https://foldd.com/favicon.ico\",\n \"merchant_name\": \"Foldd\",\n \"theme\": \"#4285F4\",\n \"payout_link_id\": \"pm_collect_link_2bdacf398vwzq5n422S1\",\n \"enabled_payment_methods\": \"[{\\\"payment_method\\\": \\\"bank_transfer\\\", \\\"payment_method_types\\\": [\\\"ach\\\", \\\"bacs\\\"]}]\",\n \"test_mode\": false\n },\n \"session_expiry\": 900,\n \"email\": \"johntest@test.com\",\n \"name\": \"John Test\",\n \"phone\": \"9123456789\",\n \"phone_country_code\": \"+1\",\n \"payout_method_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.foldd.com/payouts/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 1,\n \"routing\": {\n \"type\": \"single\",\n \"data\": {\n \"merchant_connector_id\": \"<string>\"\n }\n },\n \"connector\": [\n \"wise\",\n \"adyen\"\n ],\n \"confirm\": true,\n \"payout_method_data\": {\n \"card\": {\n \"card_number\": \"4242424242424242\",\n \"expiry_month\": \"<string>\",\n \"expiry_year\": \"<string>\",\n \"card_holder_name\": \"John Doe\"\n }\n },\n \"billing\": {\n \"address\": {\n \"city\": \"New York\",\n \"line1\": \"123, King Street\",\n \"line2\": \"Powelson Avenue\",\n \"line3\": \"Bridgewater\",\n \"zip\": \"08807\",\n \"state\": \"New York\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\"\n },\n \"phone\": {\n \"number\": \"9123456789\",\n \"country_code\": \"+1\"\n },\n \"email\": \"<string>\"\n },\n \"auto_fulfill\": true,\n \"customer_id\": \"cus_y3oqhf46pyzuxjbcn2giaqnb44\",\n \"customer\": {\n \"id\": \"cus_y3oqhf46pyzuxjbcn2giaqnb44\",\n \"name\": \"John Doe\",\n \"email\": \"johntest@test.com\",\n \"phone\": \"9123456789\",\n \"phone_country_code\": \"+1\"\n },\n \"return_url\": \"https://foldd.com\",\n \"business_label\": \"food\",\n \"description\": \"It's my first payout request\",\n \"recurring\": false,\n \"metadata\": {},\n \"payout_token\": \"187282ab-40ef-47a9-9206-5099ba31e432\",\n \"profile_id\": \"<string>\",\n \"payout_link\": true,\n \"payout_link_config\": {\n \"logo\": \"https://foldd.com/favicon.ico\",\n \"merchant_name\": \"Foldd\",\n \"theme\": \"#4285F4\",\n \"payout_link_id\": \"pm_collect_link_2bdacf398vwzq5n422S1\",\n \"enabled_payment_methods\": \"[{\\\"payment_method\\\": \\\"bank_transfer\\\", \\\"payment_method_types\\\": [\\\"ach\\\", \\\"bacs\\\"]}]\",\n \"test_mode\": false\n },\n \"session_expiry\": 900,\n \"email\": \"johntest@test.com\",\n \"name\": \"John Test\",\n \"phone\": \"9123456789\",\n \"phone_country_code\": \"+1\",\n \"payout_method_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"payout_id": "187282ab-40ef-47a9-9206-5099ba31e432",
"merchant_id": "merchant_1668273825",
"amount": 1000,
"currency": "AED",
"auto_fulfill": true,
"customer_id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"client_secret": "pay_U42c409qyHwOkWo3vK60_secret_el9ksDkiB8hi6j9N78yo",
"return_url": "https://foldd.com",
"business_country": "AF",
"entity_type": "Individual",
"recurring": false,
"status": "success",
"profile_id": "<string>",
"connector": "wise",
"payout_type": "card",
"payout_method_data": {
"card": {
"card_exp_month": "01",
"card_exp_year": "2026",
"card_holder_name": "John Doe",
"card_issuer": "<string>",
"card_network": "Visa",
"card_type": "<string>",
"card_issuing_country": "<string>",
"bank_code": "<string>",
"last4": "<string>",
"card_isin": "<string>",
"card_extended_bin": "<string>"
}
},
"billing": {
"address": {
"city": "New York",
"country": "AF",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
},
"email": "<string>"
},
"customer": {
"id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"name": "John Doe",
"email": "johntest@test.com",
"phone": "9123456789",
"phone_country_code": "+1"
},
"business_label": "food",
"description": "It's my first payout request",
"metadata": {},
"merchant_connector_id": "mca_sAD3OZLATetvjLOYhUSy",
"error_message": "Failed while verifying the card",
"error_code": "E0001",
"created": "2022-09-10T10:11:12Z",
"connector_transaction_id": "S3FC9G9M2MVFDXT5",
"priority": "instant",
"attempts": [
{
"attempt_id": "<string>",
"status": "success",
"amount": 6583,
"currency": "AED",
"connector": "<string>",
"error_code": "<string>",
"error_message": "<string>",
"payment_method": "card",
"payout_method_type": "ach",
"connector_transaction_id": "<string>",
"cancellation_reason": "<string>",
"unified_code": "UE_000",
"unified_message": "Invalid card details"
}
],
"payout_link": {
"payout_link_id": "<string>",
"link": "<string>"
},
"email": "johntest@test.com",
"name": "John Test",
"phone": "9123456789",
"phone_country_code": "+1",
"unified_code": "UE_000",
"unified_message": "Invalid card details",
"payout_method_id": "<string>"
}Authorizations
Body
application/json
The three letter ISO currency code in uppercase. Eg: 'USD' for the United States Dollar.
Available options:
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLE, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VES, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW, ZWL Available options:
AF, AX, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BQ, BA, BW, BV, BR, IO, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CD, CK, CR, CI, HR, CU, CW, CY, CZ, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, VA, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JE, JO, KZ, KE, KI, KP, KR, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, NC, NZ, NI, NE, NG, NU, NF, MP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SX, SK, SI, SB, SO, ZA, GS, SS, ES, LK, SD, SR, SJ, SZ, SE, CH, SY, TW, TJ, TZ, TH, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, UM, UY, UZ, VU, VE, VN, VG, VI, WF, EH, YE, ZM, ZW, US Response
Payout created
The three letter ISO currency code in uppercase. Eg: 'USD' for the United States Dollar.
Available options:
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLE, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VES, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW, ZWL Available options:
AF, AX, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BQ, BA, BW, BV, BR, IO, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CD, CK, CR, CI, HR, CU, CW, CY, CZ, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GG, GN, GW, GY, HT, HM, VA, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, JM, JP, JE, JO, KZ, KE, KI, KP, KR, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, NC, NZ, NI, NE, NG, NU, NF, MP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SX, SK, SI, SB, SO, ZA, GS, SS, ES, LK, SD, SR, SJ, SZ, SE, CH, SY, TW, TJ, TZ, TH, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, UM, UY, UZ, VU, VE, VN, VG, VI, WF, EH, YE, ZM, ZW, US