Update a paykey's balance
paykeys.update_balance(id, **kwargs) -> PaykeyV1 { data, meta, response_type }
/v1/paykeys/{id}/refresh_balance
Updates the balance of a paykey. This endpoint allows you to refresh the balance of a paykey.
Parameters
id: String
correlation_id: String
idempotency_key: String
request_id: String
straddle_account_id: String
Returns
Update a paykey's balance
require "straddle"
straddle = Straddle::Client.new(
api_key: "My API Key",
environment: "production" # defaults to "sandbox"
)
paykey_v1 = straddle.paykeys.update_balance("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(paykey_v1)
{
"data": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"config": {
"processing_method": "inline",
"sandbox_outcome": "standard"
},
"created_at": "2019-12-27T18:11:19.117Z",
"label": "label",
"paykey": "paykey",
"source": "bank_account",
"status": "pending",
"updated_at": "2019-12-27T18:11:19.117Z",
"balance": {
"status": "pending",
"account_balance": 0,
"updated_at": "2019-12-27T18:11:19.117Z"
},
"bank_data": {
"account_number": "****1234",
"account_type": "checking",
"routing_number": "021000021"
},
"customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"expires_at": "2019-12-27T18:11:19.117Z",
"external_id": "external_id",
"institution_name": "Bank of America",
"metadata": {
"foo": "string"
},
"status_details": {
"changed_at": "2019-12-27T18:11:19.117Z",
"message": "Bank account sucesfully validated",
"reason": "insufficient_funds",
"source": "watchtower",
"code": "code"
}
},
"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",
"config": {
"processing_method": "inline",
"sandbox_outcome": "standard"
},
"created_at": "2019-12-27T18:11:19.117Z",
"label": "label",
"paykey": "paykey",
"source": "bank_account",
"status": "pending",
"updated_at": "2019-12-27T18:11:19.117Z",
"balance": {
"status": "pending",
"account_balance": 0,
"updated_at": "2019-12-27T18:11:19.117Z"
},
"bank_data": {
"account_number": "****1234",
"account_type": "checking",
"routing_number": "021000021"
},
"customer_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"expires_at": "2019-12-27T18:11:19.117Z",
"external_id": "external_id",
"institution_name": "Bank of America",
"metadata": {
"foo": "string"
},
"status_details": {
"changed_at": "2019-12-27T18:11:19.117Z",
"message": "Bank account sucesfully validated",
"reason": "insufficient_funds",
"source": "watchtower",
"code": "code"
}
},
"meta": {
"api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"api_request_timestamp": "2019-12-27T18:11:19.117Z"
},
"response_type": "object"
}