curl --request POST \
--url https://sandbox.hyperswitch.io/payouts/{payout_id}/confirm \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data @- <<EOF
{
"client_secret": "<string>",
"merchant_order_reference_id": "merchant_order_ref_123",
"amount": 1000,
"routing": {
"type": "single",
"data": {
"merchant_connector_id": "<string>"
}
},
"connector": [
"wise",
"adyen"
],
"payout_method_data": {
"card": {
"card_number": "4242424242424242",
"expiry_month": "<string>",
"expiry_year": "<string>",
"card_holder_name": "John Doe"
}
},
"source_bank_data": {
"bank_account_number": "000123456",
"bank_routing_number": "110000000",
"payout_method_type": "ach",
"bank_name": "Deutsche Bank",
"bank_city": "California",
"account_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",
"origin_zip": "08807"
},
"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",
"tax_registration_id": "<string>",
"document_details": {
"document_number": "12345678911"
},
"date_of_birth": "1990-01-31"
},
"return_url": "https://hyperswitch.io",
"business_label": "food",
"description": "It's my first payout request",
"billing_descriptor": {
"reference": "<string>",
"statement_descriptor": "<string>"
},
"recurring": false,
"metadata": {},
"payout_token": "187282ab-40ef-47a9-9206-5099ba31e432",
"profile_id": "<string>",
"payout_link": true,
"payout_link_config": {
"logo": "https://hyperswitch.io/favicon.ico",
"merchant_name": "Hyperswitch",
"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>",
"browser_info": {
"color_depth": 1,
"java_enabled": true,
"java_script_enabled": true,
"language": "<string>",
"screen_height": 1,
"screen_width": 1,
"time_zone": 123,
"ip_address": "<string>",
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"user_agent": "<string>",
"os_type": "<string>",
"os_version": "<string>",
"device_model": "<string>",
"accept_language": "<string>",
"referer": "<string>"
}
}
EOFimport requests
url = "https://sandbox.hyperswitch.io/payouts/{payout_id}/confirm"
payload = {
"client_secret": "<string>",
"merchant_order_reference_id": "merchant_order_ref_123",
"amount": 1000,
"routing": {
"type": "single",
"data": { "merchant_connector_id": "<string>" }
},
"connector": ["wise", "adyen"],
"payout_method_data": { "card": {
"card_number": "4242424242424242",
"expiry_month": "<string>",
"expiry_year": "<string>",
"card_holder_name": "John Doe"
} },
"source_bank_data": {
"bank_account_number": "000123456",
"bank_routing_number": "110000000",
"payout_method_type": "ach",
"bank_name": "Deutsche Bank",
"bank_city": "California",
"account_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",
"origin_zip": "08807"
},
"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",
"tax_registration_id": "<string>",
"document_details": { "document_number": "12345678911" },
"date_of_birth": "1990-01-31"
},
"return_url": "https://hyperswitch.io",
"business_label": "food",
"description": "It's my first payout request",
"billing_descriptor": {
"reference": "<string>",
"statement_descriptor": "<string>"
},
"recurring": False,
"metadata": {},
"payout_token": "187282ab-40ef-47a9-9206-5099ba31e432",
"profile_id": "<string>",
"payout_link": True,
"payout_link_config": {
"logo": "https://hyperswitch.io/favicon.ico",
"merchant_name": "Hyperswitch",
"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>",
"browser_info": {
"color_depth": 1,
"java_enabled": True,
"java_script_enabled": True,
"language": "<string>",
"screen_height": 1,
"screen_width": 1,
"time_zone": 123,
"ip_address": "<string>",
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"user_agent": "<string>",
"os_type": "<string>",
"os_version": "<string>",
"device_model": "<string>",
"accept_language": "<string>",
"referer": "<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({
client_secret: '<string>',
merchant_order_reference_id: 'merchant_order_ref_123',
amount: 1000,
routing: {type: 'single', data: {merchant_connector_id: '<string>'}},
connector: ['wise', 'adyen'],
payout_method_data: {
card: {
card_number: '4242424242424242',
expiry_month: '<string>',
expiry_year: '<string>',
card_holder_name: 'John Doe'
}
},
source_bank_data: {
bank_account_number: '000123456',
bank_routing_number: '110000000',
payout_method_type: 'ach',
bank_name: 'Deutsche Bank',
bank_city: 'California',
account_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',
origin_zip: '08807'
},
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',
tax_registration_id: '<string>',
document_details: {document_number: '12345678911'},
date_of_birth: '1990-01-31'
},
return_url: 'https://hyperswitch.io',
business_label: 'food',
description: 'It\'s my first payout request',
billing_descriptor: {reference: '<string>', statement_descriptor: '<string>'},
recurring: false,
metadata: {},
payout_token: '187282ab-40ef-47a9-9206-5099ba31e432',
profile_id: '<string>',
payout_link: true,
payout_link_config: {
logo: 'https://hyperswitch.io/favicon.ico',
merchant_name: 'Hyperswitch',
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>',
browser_info: {
color_depth: 1,
java_enabled: true,
java_script_enabled: true,
language: '<string>',
screen_height: 1,
screen_width: 1,
time_zone: 123,
ip_address: '<string>',
accept_header: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
user_agent: '<string>',
os_type: '<string>',
os_version: '<string>',
device_model: '<string>',
accept_language: '<string>',
referer: '<string>'
}
})
};
fetch('https://sandbox.hyperswitch.io/payouts/{payout_id}/confirm', 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.hyperswitch.io/payouts/{payout_id}/confirm",
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([
'client_secret' => '<string>',
'merchant_order_reference_id' => 'merchant_order_ref_123',
'amount' => 1000,
'routing' => [
'type' => 'single',
'data' => [
'merchant_connector_id' => '<string>'
]
],
'connector' => [
'wise',
'adyen'
],
'payout_method_data' => [
'card' => [
'card_number' => '4242424242424242',
'expiry_month' => '<string>',
'expiry_year' => '<string>',
'card_holder_name' => 'John Doe'
]
],
'source_bank_data' => [
'bank_account_number' => '000123456',
'bank_routing_number' => '110000000',
'payout_method_type' => 'ach',
'bank_name' => 'Deutsche Bank',
'bank_city' => 'California',
'account_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',
'origin_zip' => '08807'
],
'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',
'tax_registration_id' => '<string>',
'document_details' => [
'document_number' => '12345678911'
],
'date_of_birth' => '1990-01-31'
],
'return_url' => 'https://hyperswitch.io',
'business_label' => 'food',
'description' => 'It\'s my first payout request',
'billing_descriptor' => [
'reference' => '<string>',
'statement_descriptor' => '<string>'
],
'recurring' => false,
'metadata' => [
],
'payout_token' => '187282ab-40ef-47a9-9206-5099ba31e432',
'profile_id' => '<string>',
'payout_link' => true,
'payout_link_config' => [
'logo' => 'https://hyperswitch.io/favicon.ico',
'merchant_name' => 'Hyperswitch',
'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>',
'browser_info' => [
'color_depth' => 1,
'java_enabled' => true,
'java_script_enabled' => true,
'language' => '<string>',
'screen_height' => 1,
'screen_width' => 1,
'time_zone' => 123,
'ip_address' => '<string>',
'accept_header' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'user_agent' => '<string>',
'os_type' => '<string>',
'os_version' => '<string>',
'device_model' => '<string>',
'accept_language' => '<string>',
'referer' => '<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.hyperswitch.io/payouts/{payout_id}/confirm"
payload := strings.NewReader("{\n \"client_secret\": \"<string>\",\n \"merchant_order_reference_id\": \"merchant_order_ref_123\",\n \"amount\": 1000,\n \"routing\": {\n \"type\": \"single\",\n \"data\": {\n \"merchant_connector_id\": \"<string>\"\n }\n },\n \"connector\": [\n \"wise\",\n \"adyen\"\n ],\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 \"source_bank_data\": {\n \"bank_account_number\": \"000123456\",\n \"bank_routing_number\": \"110000000\",\n \"payout_method_type\": \"ach\",\n \"bank_name\": \"Deutsche Bank\",\n \"bank_city\": \"California\",\n \"account_holder_name\": \"John Doe\"\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 \"origin_zip\": \"08807\"\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 \"tax_registration_id\": \"<string>\",\n \"document_details\": {\n \"document_number\": \"12345678911\"\n },\n \"date_of_birth\": \"1990-01-31\"\n },\n \"return_url\": \"https://hyperswitch.io\",\n \"business_label\": \"food\",\n \"description\": \"It's my first payout request\",\n \"billing_descriptor\": {\n \"reference\": \"<string>\",\n \"statement_descriptor\": \"<string>\"\n },\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://hyperswitch.io/favicon.ico\",\n \"merchant_name\": \"Hyperswitch\",\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 \"browser_info\": {\n \"color_depth\": 1,\n \"java_enabled\": true,\n \"java_script_enabled\": true,\n \"language\": \"<string>\",\n \"screen_height\": 1,\n \"screen_width\": 1,\n \"time_zone\": 123,\n \"ip_address\": \"<string>\",\n \"accept_header\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\",\n \"user_agent\": \"<string>\",\n \"os_type\": \"<string>\",\n \"os_version\": \"<string>\",\n \"device_model\": \"<string>\",\n \"accept_language\": \"<string>\",\n \"referer\": \"<string>\"\n }\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.hyperswitch.io/payouts/{payout_id}/confirm")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"client_secret\": \"<string>\",\n \"merchant_order_reference_id\": \"merchant_order_ref_123\",\n \"amount\": 1000,\n \"routing\": {\n \"type\": \"single\",\n \"data\": {\n \"merchant_connector_id\": \"<string>\"\n }\n },\n \"connector\": [\n \"wise\",\n \"adyen\"\n ],\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 \"source_bank_data\": {\n \"bank_account_number\": \"000123456\",\n \"bank_routing_number\": \"110000000\",\n \"payout_method_type\": \"ach\",\n \"bank_name\": \"Deutsche Bank\",\n \"bank_city\": \"California\",\n \"account_holder_name\": \"John Doe\"\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 \"origin_zip\": \"08807\"\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 \"tax_registration_id\": \"<string>\",\n \"document_details\": {\n \"document_number\": \"12345678911\"\n },\n \"date_of_birth\": \"1990-01-31\"\n },\n \"return_url\": \"https://hyperswitch.io\",\n \"business_label\": \"food\",\n \"description\": \"It's my first payout request\",\n \"billing_descriptor\": {\n \"reference\": \"<string>\",\n \"statement_descriptor\": \"<string>\"\n },\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://hyperswitch.io/favicon.ico\",\n \"merchant_name\": \"Hyperswitch\",\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 \"browser_info\": {\n \"color_depth\": 1,\n \"java_enabled\": true,\n \"java_script_enabled\": true,\n \"language\": \"<string>\",\n \"screen_height\": 1,\n \"screen_width\": 1,\n \"time_zone\": 123,\n \"ip_address\": \"<string>\",\n \"accept_header\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\",\n \"user_agent\": \"<string>\",\n \"os_type\": \"<string>\",\n \"os_version\": \"<string>\",\n \"device_model\": \"<string>\",\n \"accept_language\": \"<string>\",\n \"referer\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hyperswitch.io/payouts/{payout_id}/confirm")
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 \"client_secret\": \"<string>\",\n \"merchant_order_reference_id\": \"merchant_order_ref_123\",\n \"amount\": 1000,\n \"routing\": {\n \"type\": \"single\",\n \"data\": {\n \"merchant_connector_id\": \"<string>\"\n }\n },\n \"connector\": [\n \"wise\",\n \"adyen\"\n ],\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 \"source_bank_data\": {\n \"bank_account_number\": \"000123456\",\n \"bank_routing_number\": \"110000000\",\n \"payout_method_type\": \"ach\",\n \"bank_name\": \"Deutsche Bank\",\n \"bank_city\": \"California\",\n \"account_holder_name\": \"John Doe\"\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 \"origin_zip\": \"08807\"\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 \"tax_registration_id\": \"<string>\",\n \"document_details\": {\n \"document_number\": \"12345678911\"\n },\n \"date_of_birth\": \"1990-01-31\"\n },\n \"return_url\": \"https://hyperswitch.io\",\n \"business_label\": \"food\",\n \"description\": \"It's my first payout request\",\n \"billing_descriptor\": {\n \"reference\": \"<string>\",\n \"statement_descriptor\": \"<string>\"\n },\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://hyperswitch.io/favicon.ico\",\n \"merchant_name\": \"Hyperswitch\",\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 \"browser_info\": {\n \"color_depth\": 1,\n \"java_enabled\": true,\n \"java_script_enabled\": true,\n \"language\": \"<string>\",\n \"screen_height\": 1,\n \"screen_width\": 1,\n \"time_zone\": 123,\n \"ip_address\": \"<string>\",\n \"accept_header\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\",\n \"user_agent\": \"<string>\",\n \"os_type\": \"<string>\",\n \"os_version\": \"<string>\",\n \"device_model\": \"<string>\",\n \"accept_language\": \"<string>\",\n \"referer\": \"<string>\"\n }\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://hyperswitch.io",
"business_country": "AF",
"entity_type": "Individual",
"recurring": false,
"status": "success",
"profile_id": "<string>",
"merchant_order_reference_id": "merchant_order_ref_123",
"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>"
}
},
"source_bank_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",
"origin_zip": "08807"
},
"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",
"customer_document_details": {
"document_type": "cpf",
"document_number": "12345678911"
}
},
"business_label": "food",
"description": "It's my first payout request",
"billing_descriptor": {
"reference": "<string>",
"statement_descriptor": "<string>"
},
"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",
"connector_eligibility_reference_id": "8ad8bf30-5789-52be-a80a-72908abf5f9d",
"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 - Confirm
curl --request POST \
--url https://sandbox.hyperswitch.io/payouts/{payout_id}/confirm \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data @- <<EOF
{
"client_secret": "<string>",
"merchant_order_reference_id": "merchant_order_ref_123",
"amount": 1000,
"routing": {
"type": "single",
"data": {
"merchant_connector_id": "<string>"
}
},
"connector": [
"wise",
"adyen"
],
"payout_method_data": {
"card": {
"card_number": "4242424242424242",
"expiry_month": "<string>",
"expiry_year": "<string>",
"card_holder_name": "John Doe"
}
},
"source_bank_data": {
"bank_account_number": "000123456",
"bank_routing_number": "110000000",
"payout_method_type": "ach",
"bank_name": "Deutsche Bank",
"bank_city": "California",
"account_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",
"origin_zip": "08807"
},
"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",
"tax_registration_id": "<string>",
"document_details": {
"document_number": "12345678911"
},
"date_of_birth": "1990-01-31"
},
"return_url": "https://hyperswitch.io",
"business_label": "food",
"description": "It's my first payout request",
"billing_descriptor": {
"reference": "<string>",
"statement_descriptor": "<string>"
},
"recurring": false,
"metadata": {},
"payout_token": "187282ab-40ef-47a9-9206-5099ba31e432",
"profile_id": "<string>",
"payout_link": true,
"payout_link_config": {
"logo": "https://hyperswitch.io/favicon.ico",
"merchant_name": "Hyperswitch",
"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>",
"browser_info": {
"color_depth": 1,
"java_enabled": true,
"java_script_enabled": true,
"language": "<string>",
"screen_height": 1,
"screen_width": 1,
"time_zone": 123,
"ip_address": "<string>",
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"user_agent": "<string>",
"os_type": "<string>",
"os_version": "<string>",
"device_model": "<string>",
"accept_language": "<string>",
"referer": "<string>"
}
}
EOFimport requests
url = "https://sandbox.hyperswitch.io/payouts/{payout_id}/confirm"
payload = {
"client_secret": "<string>",
"merchant_order_reference_id": "merchant_order_ref_123",
"amount": 1000,
"routing": {
"type": "single",
"data": { "merchant_connector_id": "<string>" }
},
"connector": ["wise", "adyen"],
"payout_method_data": { "card": {
"card_number": "4242424242424242",
"expiry_month": "<string>",
"expiry_year": "<string>",
"card_holder_name": "John Doe"
} },
"source_bank_data": {
"bank_account_number": "000123456",
"bank_routing_number": "110000000",
"payout_method_type": "ach",
"bank_name": "Deutsche Bank",
"bank_city": "California",
"account_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",
"origin_zip": "08807"
},
"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",
"tax_registration_id": "<string>",
"document_details": { "document_number": "12345678911" },
"date_of_birth": "1990-01-31"
},
"return_url": "https://hyperswitch.io",
"business_label": "food",
"description": "It's my first payout request",
"billing_descriptor": {
"reference": "<string>",
"statement_descriptor": "<string>"
},
"recurring": False,
"metadata": {},
"payout_token": "187282ab-40ef-47a9-9206-5099ba31e432",
"profile_id": "<string>",
"payout_link": True,
"payout_link_config": {
"logo": "https://hyperswitch.io/favicon.ico",
"merchant_name": "Hyperswitch",
"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>",
"browser_info": {
"color_depth": 1,
"java_enabled": True,
"java_script_enabled": True,
"language": "<string>",
"screen_height": 1,
"screen_width": 1,
"time_zone": 123,
"ip_address": "<string>",
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"user_agent": "<string>",
"os_type": "<string>",
"os_version": "<string>",
"device_model": "<string>",
"accept_language": "<string>",
"referer": "<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({
client_secret: '<string>',
merchant_order_reference_id: 'merchant_order_ref_123',
amount: 1000,
routing: {type: 'single', data: {merchant_connector_id: '<string>'}},
connector: ['wise', 'adyen'],
payout_method_data: {
card: {
card_number: '4242424242424242',
expiry_month: '<string>',
expiry_year: '<string>',
card_holder_name: 'John Doe'
}
},
source_bank_data: {
bank_account_number: '000123456',
bank_routing_number: '110000000',
payout_method_type: 'ach',
bank_name: 'Deutsche Bank',
bank_city: 'California',
account_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',
origin_zip: '08807'
},
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',
tax_registration_id: '<string>',
document_details: {document_number: '12345678911'},
date_of_birth: '1990-01-31'
},
return_url: 'https://hyperswitch.io',
business_label: 'food',
description: 'It\'s my first payout request',
billing_descriptor: {reference: '<string>', statement_descriptor: '<string>'},
recurring: false,
metadata: {},
payout_token: '187282ab-40ef-47a9-9206-5099ba31e432',
profile_id: '<string>',
payout_link: true,
payout_link_config: {
logo: 'https://hyperswitch.io/favicon.ico',
merchant_name: 'Hyperswitch',
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>',
browser_info: {
color_depth: 1,
java_enabled: true,
java_script_enabled: true,
language: '<string>',
screen_height: 1,
screen_width: 1,
time_zone: 123,
ip_address: '<string>',
accept_header: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
user_agent: '<string>',
os_type: '<string>',
os_version: '<string>',
device_model: '<string>',
accept_language: '<string>',
referer: '<string>'
}
})
};
fetch('https://sandbox.hyperswitch.io/payouts/{payout_id}/confirm', 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.hyperswitch.io/payouts/{payout_id}/confirm",
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([
'client_secret' => '<string>',
'merchant_order_reference_id' => 'merchant_order_ref_123',
'amount' => 1000,
'routing' => [
'type' => 'single',
'data' => [
'merchant_connector_id' => '<string>'
]
],
'connector' => [
'wise',
'adyen'
],
'payout_method_data' => [
'card' => [
'card_number' => '4242424242424242',
'expiry_month' => '<string>',
'expiry_year' => '<string>',
'card_holder_name' => 'John Doe'
]
],
'source_bank_data' => [
'bank_account_number' => '000123456',
'bank_routing_number' => '110000000',
'payout_method_type' => 'ach',
'bank_name' => 'Deutsche Bank',
'bank_city' => 'California',
'account_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',
'origin_zip' => '08807'
],
'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',
'tax_registration_id' => '<string>',
'document_details' => [
'document_number' => '12345678911'
],
'date_of_birth' => '1990-01-31'
],
'return_url' => 'https://hyperswitch.io',
'business_label' => 'food',
'description' => 'It\'s my first payout request',
'billing_descriptor' => [
'reference' => '<string>',
'statement_descriptor' => '<string>'
],
'recurring' => false,
'metadata' => [
],
'payout_token' => '187282ab-40ef-47a9-9206-5099ba31e432',
'profile_id' => '<string>',
'payout_link' => true,
'payout_link_config' => [
'logo' => 'https://hyperswitch.io/favicon.ico',
'merchant_name' => 'Hyperswitch',
'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>',
'browser_info' => [
'color_depth' => 1,
'java_enabled' => true,
'java_script_enabled' => true,
'language' => '<string>',
'screen_height' => 1,
'screen_width' => 1,
'time_zone' => 123,
'ip_address' => '<string>',
'accept_header' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'user_agent' => '<string>',
'os_type' => '<string>',
'os_version' => '<string>',
'device_model' => '<string>',
'accept_language' => '<string>',
'referer' => '<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.hyperswitch.io/payouts/{payout_id}/confirm"
payload := strings.NewReader("{\n \"client_secret\": \"<string>\",\n \"merchant_order_reference_id\": \"merchant_order_ref_123\",\n \"amount\": 1000,\n \"routing\": {\n \"type\": \"single\",\n \"data\": {\n \"merchant_connector_id\": \"<string>\"\n }\n },\n \"connector\": [\n \"wise\",\n \"adyen\"\n ],\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 \"source_bank_data\": {\n \"bank_account_number\": \"000123456\",\n \"bank_routing_number\": \"110000000\",\n \"payout_method_type\": \"ach\",\n \"bank_name\": \"Deutsche Bank\",\n \"bank_city\": \"California\",\n \"account_holder_name\": \"John Doe\"\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 \"origin_zip\": \"08807\"\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 \"tax_registration_id\": \"<string>\",\n \"document_details\": {\n \"document_number\": \"12345678911\"\n },\n \"date_of_birth\": \"1990-01-31\"\n },\n \"return_url\": \"https://hyperswitch.io\",\n \"business_label\": \"food\",\n \"description\": \"It's my first payout request\",\n \"billing_descriptor\": {\n \"reference\": \"<string>\",\n \"statement_descriptor\": \"<string>\"\n },\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://hyperswitch.io/favicon.ico\",\n \"merchant_name\": \"Hyperswitch\",\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 \"browser_info\": {\n \"color_depth\": 1,\n \"java_enabled\": true,\n \"java_script_enabled\": true,\n \"language\": \"<string>\",\n \"screen_height\": 1,\n \"screen_width\": 1,\n \"time_zone\": 123,\n \"ip_address\": \"<string>\",\n \"accept_header\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\",\n \"user_agent\": \"<string>\",\n \"os_type\": \"<string>\",\n \"os_version\": \"<string>\",\n \"device_model\": \"<string>\",\n \"accept_language\": \"<string>\",\n \"referer\": \"<string>\"\n }\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.hyperswitch.io/payouts/{payout_id}/confirm")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"client_secret\": \"<string>\",\n \"merchant_order_reference_id\": \"merchant_order_ref_123\",\n \"amount\": 1000,\n \"routing\": {\n \"type\": \"single\",\n \"data\": {\n \"merchant_connector_id\": \"<string>\"\n }\n },\n \"connector\": [\n \"wise\",\n \"adyen\"\n ],\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 \"source_bank_data\": {\n \"bank_account_number\": \"000123456\",\n \"bank_routing_number\": \"110000000\",\n \"payout_method_type\": \"ach\",\n \"bank_name\": \"Deutsche Bank\",\n \"bank_city\": \"California\",\n \"account_holder_name\": \"John Doe\"\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 \"origin_zip\": \"08807\"\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 \"tax_registration_id\": \"<string>\",\n \"document_details\": {\n \"document_number\": \"12345678911\"\n },\n \"date_of_birth\": \"1990-01-31\"\n },\n \"return_url\": \"https://hyperswitch.io\",\n \"business_label\": \"food\",\n \"description\": \"It's my first payout request\",\n \"billing_descriptor\": {\n \"reference\": \"<string>\",\n \"statement_descriptor\": \"<string>\"\n },\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://hyperswitch.io/favicon.ico\",\n \"merchant_name\": \"Hyperswitch\",\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 \"browser_info\": {\n \"color_depth\": 1,\n \"java_enabled\": true,\n \"java_script_enabled\": true,\n \"language\": \"<string>\",\n \"screen_height\": 1,\n \"screen_width\": 1,\n \"time_zone\": 123,\n \"ip_address\": \"<string>\",\n \"accept_header\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\",\n \"user_agent\": \"<string>\",\n \"os_type\": \"<string>\",\n \"os_version\": \"<string>\",\n \"device_model\": \"<string>\",\n \"accept_language\": \"<string>\",\n \"referer\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hyperswitch.io/payouts/{payout_id}/confirm")
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 \"client_secret\": \"<string>\",\n \"merchant_order_reference_id\": \"merchant_order_ref_123\",\n \"amount\": 1000,\n \"routing\": {\n \"type\": \"single\",\n \"data\": {\n \"merchant_connector_id\": \"<string>\"\n }\n },\n \"connector\": [\n \"wise\",\n \"adyen\"\n ],\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 \"source_bank_data\": {\n \"bank_account_number\": \"000123456\",\n \"bank_routing_number\": \"110000000\",\n \"payout_method_type\": \"ach\",\n \"bank_name\": \"Deutsche Bank\",\n \"bank_city\": \"California\",\n \"account_holder_name\": \"John Doe\"\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 \"origin_zip\": \"08807\"\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 \"tax_registration_id\": \"<string>\",\n \"document_details\": {\n \"document_number\": \"12345678911\"\n },\n \"date_of_birth\": \"1990-01-31\"\n },\n \"return_url\": \"https://hyperswitch.io\",\n \"business_label\": \"food\",\n \"description\": \"It's my first payout request\",\n \"billing_descriptor\": {\n \"reference\": \"<string>\",\n \"statement_descriptor\": \"<string>\"\n },\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://hyperswitch.io/favicon.ico\",\n \"merchant_name\": \"Hyperswitch\",\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 \"browser_info\": {\n \"color_depth\": 1,\n \"java_enabled\": true,\n \"java_script_enabled\": true,\n \"language\": \"<string>\",\n \"screen_height\": 1,\n \"screen_width\": 1,\n \"time_zone\": 123,\n \"ip_address\": \"<string>\",\n \"accept_header\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\",\n \"user_agent\": \"<string>\",\n \"os_type\": \"<string>\",\n \"os_version\": \"<string>\",\n \"device_model\": \"<string>\",\n \"accept_language\": \"<string>\",\n \"referer\": \"<string>\"\n }\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://hyperswitch.io",
"business_country": "AF",
"entity_type": "Individual",
"recurring": false,
"status": "success",
"profile_id": "<string>",
"merchant_order_reference_id": "merchant_order_ref_123",
"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>"
}
},
"source_bank_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",
"origin_zip": "08807"
},
"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",
"customer_document_details": {
"document_type": "cpf",
"document_number": "12345678911"
}
},
"business_label": "food",
"description": "It's my first payout request",
"billing_descriptor": {
"reference": "<string>",
"statement_descriptor": "<string>"
},
"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",
"connector_eligibility_reference_id": "8ad8bf30-5789-52be-a80a-72908abf5f9d",
"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
Use the API key created under your merchant account from the HyperSwitch dashboard. API key is used to authenticate API requests from your merchant server only. Don't expose this key on a website or embed it in a mobile application.
Path Parameters
The identifier for payout
Body
It's a token used for client side verification.
Your unique identifier for this payout or order. This ID helps you reconcile payouts on your system. If provided, it is passed to the connector if supported.
255"merchant_order_ref_123"
The payout amount. Amount for the payout in lowest denomination of the currency. (i.e) in cents for USD denomination, in paisa for INR denomination etc.,
x >= 01000
The three-letter ISO 4217 currency code (e.g., "USD", "EUR") for the payment amount. This field is mandatory for creating a payment.
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 - Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Show child attributes
Show child attributes
This field allows the merchant to manually select a connector with which the payout can go through.
adyen, adyenplatform, cybersource, deutschebank, ebanx, gigadat, gotyme_sanlam, loonio, nomupay, nuvei, payone, paypal, stripe, truelayer, trustly, wise, worldpay, worldpayxml, envoy, itaubank, santander ["wise", "adyen"]
The payout_type of the payout request is a mandatory field for confirming the payouts. It should be specified in the Create request. If not provided, it must be updated in the Payout Update request before it can be confirmed.
card, bank, wallet, bank_redirect The payout method information required for carrying out a payout
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
Show child attributes
Show child attributes
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Set to true to confirm the payout without review, no further action required
true
The identifier for the customer object. If not provided the customer ID will be autogenerated. Deprecated: Use customer_id instead.
255"cus_y3oqhf46pyzuxjbcn2giaqnb44"
Passing this object creates a new customer or attaches an existing customer to the payment
Show child attributes
Show child attributes
The URL to redirect after the completion of the operation
"https://hyperswitch.io"
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 Business label of the merchant for this payout. Deprecated: Use profile_id instead.
"food"
A description of the payout
"It's my first payout request"
Billing descriptor information for a payout.
Show child attributes
Show child attributes
Type of entity to whom the payout is being carried out to, select from the given list of options
Individual, Company, NonProfit, PublicSector, NaturalPerson, lowercase, Personal Specifies whether or not the payout request is recurring
You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.
Provide a reference to a stored payout method, used to process the payout.
"187282ab-40ef-47a9-9206-5099ba31e432"
The business profile to use for this payout, especially if there are multiple business profiles associated with the account, otherwise default business profile associated with the merchant account will be used.
The send method which will be required for processing payouts, check options for better understanding.
instant, fast, regular, wire, cross_border, internal Whether to get the payout link (if applicable). Merchant need to specify this during the Payout Create, this field can not be updated during Payout Update.
true
Custom payout link config for the particular payout, if payout link is to be generated.
Show child attributes
Show child attributes
Will be used to expire client secret after certain amount of time to be supplied in seconds (900) for 15 mins
x >= 0900
Customer's email. Deprecated: Use customer object instead.
255"johntest@test.com"
Customer's name. Deprecated: Use customer object instead.
255"John Test"
Customer's phone. Deprecated: Use customer object instead.
255"9123456789"
Customer's phone country code. Deprecated: Use customer object instead.
255"+1"
Identifier for payout method
Browser information to be used for 3DS 2.0
Show child attributes
Show child attributes
Response
Payout updated
Unique identifier for the payout. This ensures idempotency for multiple payouts that have been done by a single merchant. This field is auto generated and is returned in the API response.
30"187282ab-40ef-47a9-9206-5099ba31e432"
This is an identifier for the merchant account. This is inferred from the API key provided during the request
255"merchant_1668273825"
The payout amount. Amount for the payout in lowest denomination of the currency. (i.e) in cents for USD denomination, in paisa for INR denomination etc.,
1000
The three-letter ISO 4217 currency code (e.g., "USD", "EUR") for the payment amount. This field is mandatory for creating a payment.
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 Set to true to confirm the payout without review, no further action required
true
The identifier for the customer object. If not provided the customer ID will be autogenerated. Deprecated: Use the customer object instead.
255"cus_y3oqhf46pyzuxjbcn2giaqnb44"
It's a token used for client side verification.
"pay_U42c409qyHwOkWo3vK60_secret_el9ksDkiB8hi6j9N78yo"
The URL to redirect after the completion of the operation
"https://hyperswitch.io"
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 Type of entity to whom the payout is being carried out to, select from the given list of options
Individual, Company, NonProfit, PublicSector, NaturalPerson, lowercase, Personal Specifies whether or not the payout request is recurring
success, failed, cancelled, initiated, expired, reversed, pending, ineligible, not_permitted, requires_creation, requires_confirmation, requires_payout_method_data, requires_fulfillment, requires_vendor_account_creation The business profile that is associated with this payout
Your unique identifier for this payout or order. This ID helps you reconcile payouts on your system. If provided, it is passed to the connector if supported.
255"merchant_order_ref_123"
The connector used for the payout
"wise"
The payout_type of the payout request is a mandatory field for confirming the payouts. It should be specified in the Create request. If not provided, it must be updated in the Payout Update request before it can be confirmed.
card, bank, wallet, bank_redirect The payout method information for response
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Show child attributes
Show child attributes
The payout method information for response
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Details of customer attached to this payment
Show child attributes
Show child attributes
Business label of the merchant for this payout. Deprecated: Use profile_id instead.
"food"
A description of the payout
"It's my first payout request"
Billing descriptor information for a payout.
Show child attributes
Show child attributes
You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.
Unique identifier of the merchant connector account
"mca_sAD3OZLATetvjLOYhUSy"
If there was an error while calling the connector the error message is received here
"Failed while verifying the card"
If there was an error while calling the connectors the code is received here
"E0001"
Time when the payout was created
"2022-09-10T10:11:12Z"
Underlying processor's payout resource ID
"S3FC9G9M2MVFDXT5"
Underlying processor's reference ID for the payout eligibility check
"8ad8bf30-5789-52be-a80a-72908abf5f9d"
The send method which will be required for processing payouts, check options for better understanding.
instant, fast, regular, wire, cross_border, internal List of attempts
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Customer's email. Deprecated: Use customer object instead.
255"johntest@test.com"
Customer's name. Deprecated: Use customer object instead.
255"John Test"
Customer's phone. Deprecated: Use customer object instead.
255"9123456789"
Customer's phone country code. Deprecated: Use customer object instead.
255"+1"
(This field is not live yet) Error code unified across the connectors is received here in case of errors while calling the underlying connector
255"UE_000"
(This field is not live yet) Error message unified across the connectors is received here in case of errors while calling the underlying connector
1024"Invalid card details"
Identifier for payout method
Was this page helpful?