Hold a charge
/v1/charges/{id}/hold
Place a charge on hold to prevent it from being originated for processing. The status of the charge must be created or scheduled.
Path Parameters
id: string
Header Parameters
"Correlation-Id": optional string
"Idempotency-Key": optional string
"Request-Id": optional string
"Straddle-Account-Id": optional string
Body Parameters
Returns
Hold a charge
curl https://sandbox.straddle.com/v1/charges/$ID/hold \
-X PUT \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $STRADDLE_API_KEY"
{
"data": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"amount": 10000,
"config": {
"balance_check": "required",
"sandbox_outcome": "standard"
},
"consent_type": "internet",
"created_at": "2019-12-27T18:11:19.117Z",
"currency": "currency",
"description": "Monthly subscription fee",
"device": {
"ip_address": "192.168.1.1"
},
"external_id": "external_id",
"funding_ids": [
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
],
"paykey": "paykey",
"payment_date": "2019-12-27",
"status": "created",
"status_details": {
"changed_at": "2019-12-27T18:11:19.117Z",
"message": "Payment successfully created and awaiting validation.",
"reason": "insufficient_funds",
"source": "system",
"code": null
},
"status_history": [
{
"changed_at": "2019-12-27T18:11:19.117Z",
"message": "Payment successfully created and awaiting validation.",
"reason": "insufficient_funds",
"source": "watchtower",
"status": "created",
"code": null
}
],
"updated_at": "2019-12-27T18:11:19.117Z",
"customer_details": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"customer_type": "individual",
"email": "ron@swanson.com",
"name": "Ron Swanson",
"phone": "+1234567890"
},
"effective_at": "2019-12-27T18:11:19.117Z",
"metadata": {
"foo": "string"
},
"paykey_details": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"label": "Bank of America ****1234",
"balance": 0
},
"payment_rail": "ach",
"processed_at": "2019-12-27T18:11:19.117Z"
},
"meta": {
"api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"api_request_timestamp": "2019-12-27T18:11:19.117Z"
},
"response_type": "object"
}Returns Examples
{
"data": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"amount": 10000,
"config": {
"balance_check": "required",
"sandbox_outcome": "standard"
},
"consent_type": "internet",
"created_at": "2019-12-27T18:11:19.117Z",
"currency": "currency",
"description": "Monthly subscription fee",
"device": {
"ip_address": "192.168.1.1"
},
"external_id": "external_id",
"funding_ids": [
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
],
"paykey": "paykey",
"payment_date": "2019-12-27",
"status": "created",
"status_details": {
"changed_at": "2019-12-27T18:11:19.117Z",
"message": "Payment successfully created and awaiting validation.",
"reason": "insufficient_funds",
"source": "system",
"code": null
},
"status_history": [
{
"changed_at": "2019-12-27T18:11:19.117Z",
"message": "Payment successfully created and awaiting validation.",
"reason": "insufficient_funds",
"source": "watchtower",
"status": "created",
"code": null
}
],
"updated_at": "2019-12-27T18:11:19.117Z",
"customer_details": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"customer_type": "individual",
"email": "ron@swanson.com",
"name": "Ron Swanson",
"phone": "+1234567890"
},
"effective_at": "2019-12-27T18:11:19.117Z",
"metadata": {
"foo": "string"
},
"paykey_details": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"label": "Bank of America ****1234",
"balance": 0
},
"payment_rail": "ach",
"processed_at": "2019-12-27T18:11:19.117Z"
},
"meta": {
"api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"api_request_timestamp": "2019-12-27T18:11:19.117Z"
},
"response_type": "object"
}