curl --request POST \
--header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
--url https://sandbox.straddle.com/v1/payouts \
--header 'Content-Type: application/json' \
--data '{
"paykey": "<string>",
"description": "Vendor invoice payment",
"amount": "10000",
"currency": "<string>",
"payment_date": "2019-12-27",
"device": {
"ip_address": "192.168.1.1"
},
"external_id": "<string>"
}'import Straddle from '@straddlecom/straddle';
const client = new Straddle({
apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
});
async function main() {
const payoutV1 = await client.payouts.create({
amount: 0,
currency: 'currency',
description: 'Vendor invoice payment',
device: { ip_address: '192.168.1.1' },
external_id: 'external_id',
paykey: 'paykey',
payment_date: '2019-12-27',
});
console.log(payoutV1.data);
}
main();import os
from straddle import Straddle
from straddle._utils import parse_date
client = Straddle(
api_key=os.environ.get("STRADDLE_API_KEY"), # This is the default and can be omitted
)
payout_v1 = client.payouts.create(
amount=0,
currency="currency",
description="Vendor invoice payment",
device={
"ip_address": "192.168.1.1"
},
external_id="external_id",
paykey="paykey",
payment_date=parse_date("2019-12-27"),
)
print(payout_v1.data)require "straddle"
straddle = Straddle::Client.new(
api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
environment: "production" # defaults to "sandbox"
)
payout_v1 = straddle.payouts.create(
amount: 10000,
currency: "currency",
description: "Vendor invoice payment",
device: {ip_address: "192.168.1.1"},
external_id: "external_id",
paykey: "paykey",
payment_date: "2019-12-27"
)
puts(payout_v1){
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paykey": "<string>",
"description": "<string>",
"amount": "10000",
"currency": "USD",
"payment_date": "2023-12-25",
"device": {
"ip_address": "192.168.1.1"
},
"external_id": "<string>",
"config": {
"sandbox_outcome": "standard",
"auto_hold": true,
"auto_hold_message": "<string>"
},
"status": "created",
"status_details": {
"message": "Payment successfully created and awaiting validation.",
"reason": "OK",
"source": "system",
"changed_at": "2023-11-07T05:31:56Z",
"code": null
},
"status_history": [
{
"reason": "insufficient_funds",
"source": "watchtower",
"message": "Payment successfully created and awaiting validation.",
"changed_at": "2023-11-07T05:31:56Z",
"status": "created",
"code": null
}
],
"funding_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"trace_ids": {},
"is_refund": true,
"is_resubmit": true,
"has_resubmit": true,
"payment_rail": "ach",
"customer_details": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Ron Swanson",
"customer_type": "individual",
"email": "[email protected]",
"phone": "+1234567890"
},
"paykey_details": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "Bank of America ****1234",
"balance": "100.00"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"processed_at": "2023-11-07T05:31:56Z",
"effective_at": "2023-11-07T05:31:56Z",
"metadata": {},
"related_payments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"relationship": "original",
"payment_type": "charge"
}
],
"documents": [
{
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_name": "<string>",
"document_type": "payment_authorization",
"document_size": 123,
"uploaded_at": "2023-11-07T05:31:56Z"
}
]
}
}{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}Create a payout
Use payouts to send money to your customers.
curl --request POST \
--header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
--url https://sandbox.straddle.com/v1/payouts \
--header 'Content-Type: application/json' \
--data '{
"paykey": "<string>",
"description": "Vendor invoice payment",
"amount": "10000",
"currency": "<string>",
"payment_date": "2019-12-27",
"device": {
"ip_address": "192.168.1.1"
},
"external_id": "<string>"
}'import Straddle from '@straddlecom/straddle';
const client = new Straddle({
apiKey: process.env['STRADDLE_API_KEY'], // This is the default and can be omitted
});
async function main() {
const payoutV1 = await client.payouts.create({
amount: 0,
currency: 'currency',
description: 'Vendor invoice payment',
device: { ip_address: '192.168.1.1' },
external_id: 'external_id',
paykey: 'paykey',
payment_date: '2019-12-27',
});
console.log(payoutV1.data);
}
main();import os
from straddle import Straddle
from straddle._utils import parse_date
client = Straddle(
api_key=os.environ.get("STRADDLE_API_KEY"), # This is the default and can be omitted
)
payout_v1 = client.payouts.create(
amount=0,
currency="currency",
description="Vendor invoice payment",
device={
"ip_address": "192.168.1.1"
},
external_id="external_id",
paykey="paykey",
payment_date=parse_date("2019-12-27"),
)
print(payout_v1.data)require "straddle"
straddle = Straddle::Client.new(
api_key: ENV["STRADDLE_API_KEY"], # This is the default and can be omitted
environment: "production" # defaults to "sandbox"
)
payout_v1 = straddle.payouts.create(
amount: 10000,
currency: "currency",
description: "Vendor invoice payment",
device: {ip_address: "192.168.1.1"},
external_id: "external_id",
paykey: "paykey",
payment_date: "2019-12-27"
)
puts(payout_v1){
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paykey": "<string>",
"description": "<string>",
"amount": "10000",
"currency": "USD",
"payment_date": "2023-12-25",
"device": {
"ip_address": "192.168.1.1"
},
"external_id": "<string>",
"config": {
"sandbox_outcome": "standard",
"auto_hold": true,
"auto_hold_message": "<string>"
},
"status": "created",
"status_details": {
"message": "Payment successfully created and awaiting validation.",
"reason": "OK",
"source": "system",
"changed_at": "2023-11-07T05:31:56Z",
"code": null
},
"status_history": [
{
"reason": "insufficient_funds",
"source": "watchtower",
"message": "Payment successfully created and awaiting validation.",
"changed_at": "2023-11-07T05:31:56Z",
"status": "created",
"code": null
}
],
"funding_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"trace_ids": {},
"is_refund": true,
"is_resubmit": true,
"has_resubmit": true,
"payment_rail": "ach",
"customer_details": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Ron Swanson",
"customer_type": "individual",
"email": "[email protected]",
"phone": "+1234567890"
},
"paykey_details": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "Bank of America ****1234",
"balance": "100.00"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"processed_at": "2023-11-07T05:31:56Z",
"effective_at": "2023-11-07T05:31:56Z",
"metadata": {},
"related_payments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"relationship": "original",
"payment_type": "charge"
}
],
"documents": [
{
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_name": "<string>",
"document_type": "payment_authorization",
"document_size": 123,
"uploaded_at": "2023-11-07T05:31:56Z"
}
]
}
}{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"response_type": "object",
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}Authorizations
Use your Straddle API Key in the Authorization header as Bearer to authorize API requests.
Headers
For use by platforms to specify an account id and set scope of a request.
Optional client generated identifier to trace and debug a request.
Optional client generated identifier to trace and debug a series of requests.
Optional client generated value to use for idempotent requests.
10 - 40Body
Value of the paykey used for the payout.
An arbitrary description for the payout.
"Vendor invoice payment"
The amount of the payout in cents.
"10000"
The currency of the payout. Only USD is supported.
The desired date on which the payout should be occur. For payouts, this means the date you want the funds to be sent from your bank account.
Information about the device used when the customer authorized the payout.
Show child attributes
Show child attributes
Unique identifier for the payout in your database. This value must be unique across all payouts.
Show child attributes
Show child attributes
Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the payout in a structured format.
Show child attributes
Show child attributes
Response
Created
Metadata about the API request, including an identifier and timestamp.
Show child attributes
Show child attributes
Indicates the structure of the returned content.
- "object" means the
datafield contains a single JSON object. - "array" means the
datafield contains an array of objects. - "error" means the
datafield contains an error object with details of the issue. - "none" means no data is returned.
object, array, error, none Show child attributes
Show child attributes
Was this page helpful?