Get a charge by id.
client.charges.unmask(stringid, ChargeUnmaskParams { correlationID, requestID, straddleAccountID } params?, RequestOptionsoptions?): ChargeUnmaskResponse { data, meta, response_type }
/v1/charges/{id}/unmask
Get a charge by id.
Parameters
id: string
Returns
Get a charge by id.
import Straddle from '@straddlecom/straddle';
const client = new Straddle({
apiKey: 'My API Key',
});
const response = await client.charges.unmask('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(response.data);
{
"data": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"amount": 0,
"config": {
"balance_check": "required",
"sandbox_outcome": "standard"
},
"consent_type": "internet",
"created_at": "2019-12-27T18:11:19.117Z",
"currency": "currency",
"description": "description",
"device": {
"ip_address": "ip_address"
},
"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": 0,
"config": {
"balance_check": "required",
"sandbox_outcome": "standard"
},
"consent_type": "internet",
"created_at": "2019-12-27T18:11:19.117Z",
"currency": "currency",
"description": "description",
"device": {
"ip_address": "ip_address"
},
"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"
}