cURL
curl --request POST \
--header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
--url https://sandbox.straddle.com/v1/charges/<uuid>/resubmit \
--header 'Content-Type: application/json'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({description: '<string>', payment_date: '2023-12-25', external_id: '<string>'})
};
fetch('https://{environment}.straddle.com/v1/charges/{id}/resubmit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{environment}.straddle.com/v1/charges/{id}/resubmit"
payload = {
"description": "<string>",
"payment_date": "2023-12-25",
"external_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://{environment}.straddle.com/v1/charges/{id}/resubmit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"payment_date\": \"2023-12-25\",\n \"external_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paykey": "<string>",
"description": "Monthly subscription fee",
"amount": "10000",
"currency": "USD",
"payment_date": "2023-12-25",
"device": {
"ip_address": "192.168.1.1"
},
"external_id": "<string>",
"config": {
"balance_check": "enabled",
"auto_hold": true,
"auto_hold_message": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"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": [
{
"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": {},
"has_refund": true,
"is_resubmit": true,
"has_resubmit": true,
"payment_rail": "ach",
"paykey_details": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "Bank of America ****1234",
"balance": "100.00"
},
"customer_details": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Ron Swanson",
"email": "[email protected]",
"phone": "+1234567890"
},
"processed_at": "2023-11-07T05:31:56Z",
"effective_at": "2023-11-07T05:31:56Z",
"metadata": {},
"related_payments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
}{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"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"
},
"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"
},
"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"
},
"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"
},
"error": {
"status": 123,
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"items": [
{
"detail": "<string>",
"reference": "<string>"
}
]
}
}Charges
Resubmit a charge
Recover a failed, reversed, or cancelled ACH debit by creating a new charge linked to the original transaction and retaining payment history.
POST
/
v1
/
charges
/
{id}
/
resubmit
cURL
curl --request POST \
--header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
--url https://sandbox.straddle.com/v1/charges/<uuid>/resubmit \
--header 'Content-Type: application/json'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({description: '<string>', payment_date: '2023-12-25', external_id: '<string>'})
};
fetch('https://{environment}.straddle.com/v1/charges/{id}/resubmit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{environment}.straddle.com/v1/charges/{id}/resubmit"
payload = {
"description": "<string>",
"payment_date": "2023-12-25",
"external_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://{environment}.straddle.com/v1/charges/{id}/resubmit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"payment_date\": \"2023-12-25\",\n \"external_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paykey": "<string>",
"description": "Monthly subscription fee",
"amount": "10000",
"currency": "USD",
"payment_date": "2023-12-25",
"device": {
"ip_address": "192.168.1.1"
},
"external_id": "<string>",
"config": {
"balance_check": "enabled",
"auto_hold": true,
"auto_hold_message": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"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": [
{
"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": {},
"has_refund": true,
"is_resubmit": true,
"has_resubmit": true,
"payment_rail": "ach",
"paykey_details": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "Bank of America ****1234",
"balance": "100.00"
},
"customer_details": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Ron Swanson",
"email": "[email protected]",
"phone": "+1234567890"
},
"processed_at": "2023-11-07T05:31:56Z",
"effective_at": "2023-11-07T05:31:56Z",
"metadata": {},
"related_payments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
}{
"meta": {
"api_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_request_timestamp": "2023-11-07T05:31:56Z"
},
"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"
},
"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"
},
"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"
},
"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"
},
"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.
Required string length:
10 - 40Path Parameters
Body
application/jsontext/jsonapplication/*+json
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.
Available options:
object, array, error, none Show child attributes
Show child attributes
Was this page helpful?
⌘I