Get settlement by ID
GEThttps://api.publicsquare.com/settlements/:id
Get a settlement by ID in the Account.
Permissions
settlement:read
Request
Path Parameters
id stringrequired
Responses
- 200
- 400
- 401
- 403
- 404
OK
- application/json
- Schema
- Example (auto)
Schema
idstringnullable
Settlement ID
Example:
stl_BGDLZjBLAgNbyqCzJxchSoh5k
account_idstringnullable
Account ID
Example:
acc_B518niGwGYKzig6vtrRVZGGGV
environmentstringnullable
Environment - Can be test
or production
Example:
production
transaction_idstringnullable
Transaction ID
Example:
trx_95rvMJvAVeG68W4NtLdfkN3LG
payment_amountint64
Total payment amount of the settlement in cents. 1000 is $10.00
Example:
1500
payment_countint32
Total number of payments in the settlement
Example:
3
refund_amountint64
Total refund amount of the settlement in cents. 1000 is $10.00
Example:
500
refund_countint32
Total number of refunds in the settlement
Example:
1
total_countint64
Total number of transactions in the settlement
Example:
4
amountint64
Total amount of the settlement in cents. 1000 is $10.00
Example:
1000
currencystringnullable
3 character ISO currency code
Example:
USD
settled_atdate-time
Date of the Settlement
Example:
2024-06-30T00:00:00.000Z
transaction object
created_atdate-timenullable
Date settlement was created
Example:
2024-06-30T01:02:29.212Z
modified_atdate-timenullable
Date settlement was modified
Example:
2024-06-30T01:02:29.212Z
{
"id": "stl_BGDLZjBLAgNbyqCzJxchSoh5k",
"account_id": "acc_B518niGwGYKzig6vtrRVZGGGV",
"environment": "production",
"transaction_id": "trx_95rvMJvAVeG68W4NtLdfkN3LG",
"payment_amount": 1500,
"payment_count": 3,
"refund_amount": 500,
"refund_count": 1,
"total_count": 4,
"amount": 1000,
"currency": "USD",
"settled_at": "2024-06-30T00:00:00.000Z",
"transaction": {
"id": "trx_95rvMJvAVeG68W4NtLdfkN3LG",
"account_id": "acc_B518niGwGYKzig6vtrRVZGGGV",
"environment": "production",
"external_id": "e797ef3c-b586-4333-af90-7168d8427d85",
"status": "successful",
"amount": 10000,
"fee_amount": 360,
"net_amount": 9640,
"currency": "USD",
"type_id": "pmt_2YKewBonG4tgk12MheY3PiHDy",
"type": "payment",
"settlement_id": "stl_BGDLZjBLAgNbyqCzJxchSoh5k",
"processor": "nuvei",
"processor_id": "7110000000010554769",
"acquirer_id": "2630000240513800",
"payment": {
"id": "pmt_2YKewBonG4tgk12MheY3PiHDy",
"account_id": "acc_B518niGwGYKzig6vtrRVZGGGV",
"environment": "production",
"external_id": "e797ef3c-b586-4333-af90-7168d8427d85",
"status": "successful",
"declined_reason": "Card lost/stolen",
"transaction_id": "trx_95rvMJvAVeG68W4NtLdfkN3LG",
"amount": 9500,
"amount_capturable": 10000,
"amount_charged": 10000,
"amount_refunded": 500,
"refunded": false,
"currency": "USD",
"payment_method": {
"card": {
"id": "card_8PajTnDVrviEJ8zYJDALFQm5t",
"cardholder_name": "John Smith",
"last4": "4242",
"exp_month": "12",
"exp_year": "2025",
"fingerprint": "CC2XvyoohnqecEq4r3FtXv6MdCx4TbaW1UUTdCCN5MNL",
"brand": "visa",
"avs_code": "Y",
"cvv2_reply": "M"
},
"bank_account": {
"id": "ba_7Ay5mcUXAxwrN6wQEQUVEHBCJ",
"account_holder_name": "John Doe",
"account_holder_type": "individual",
"account_type": "individual",
"routing_number": "123456789",
"account_number_last4": "1011"
},
"account_balance": {
"account_id": "acc_B518niGwGYKzig6vtrRVZGGGV",
"account_name": "Test Company, LLC"
}
},
"customer": {
"id": "cus_7Ay5mcUXAxwrN6wQEQUVEHBCJ",
"external_id": "e797ef3c-b586-4333-af90-7168d8427d85",
"business_name": "Awesome Company, LLC",
"first_name": "John",
"last_name": "Smith",
"government_identifier_last4": "9642",
"email": "john.smith@email.com",
"phone": "+15554829347"
},
"billing_details": {
"address_line_1": "111 Colorado Ave.",
"address_line_2": "Apt 403",
"city": "Des Moines",
"state": "IA",
"postal_code": "51111",
"country": "US"
},
"shipping_address": {
"address_line_1": "111 Colorado Ave.",
"address_line_2": "Apt 403",
"city": "Des Moines",
"state": "IA",
"postal_code": "51111",
"country": "US"
},
"fraud_details": {
"decision": "accept",
"rules": [
{
"rule_engine": "nuvei",
"rule_id": "1287",
"rule_description": "Stolen card"
}
]
},
"dynamic_descriptor": {
"merchant_name": "Test Corporation",
"merchant_contact": "+15552604982"
},
"transfers": [
{
"id": "trnf_7yFLQWACr3DYDSz1xpoEAVfdq",
"account_id": "acc_B518niGwGYKzig6vtrRVZGGGV",
"environment": "production",
"external_id": "e797ef3c-b586-4333-af90-7168d8427d85",
"type": "payment",
"status": "successful",
"payment_transfer_id": "trnf_7yFLQWACr3DYDSz1xpoEAVfdq",
"payment_id": "pmt_2YKewBonG4tgk12MheY3PiHDy",
"refund_id": "rfd_2YKewBonG4tgk12MheY3PiHDy",
"transaction_id": "trx_95rvMJvAVeG68W4NtLdfkN3LG",
"seller_account_id": "acc_8ooQs32UCdriBvrHnVWbTmJbY",
"amount": 10000,
"transfer_fee": 100,
"currency": "USD",
"created_at": "2024-06-30T01:02:29.212Z",
"modified_at": "2024-06-30T01:02:29.212Z"
}
],
"device_information": {
"browser_family": "Mobile Safari",
"os_family": "iOS",
"device_family": "iPhone",
"ip_address": "192.168.1.1",
"user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3"
},
"created_at": "2024-06-30T01:02:29.212Z",
"modified_at": "2024-06-30T01:02:29.212Z"
},
"payout": {
"id": "pyt_24NFPd3jSZFTxiaH9UwjuqNdP",
"account_id": "acc_B518niGwGYKzig6vtrRVZGGGV",
"environment": "production",
"external_id": "1268ce56-a4b5-43fa-8526-a500fc2140bb",
"status": "successful",
"declined_reason": "Card lost/stolen",
"transaction_id": "trx_6QgmXzQzk3S5K5EsR3DfEiMRj",
"amount": 9500,
"currency": "USD",
"payment_method": {
"card": {
"id": "card_8PajTnDVrviEJ8zYJDALFQm5t",
"cardholder_name": "John Smith",
"last4": "4242",
"exp_month": "12",
"exp_year": "2025",
"fingerprint": "CC2XvyoohnqecEq4r3FtXv6MdCx4TbaW1UUTdCCN5MNL",
"brand": "visa",
"avs_code": "Y",
"cvv2_reply": "M"
},
"bank_account": {
"id": "ba_7Ay5mcUXAxwrN6wQEQUVEHBCJ",
"account_holder_name": "John Doe",
"account_holder_type": "individual",
"account_type": "individual",
"routing_number": "123456789",
"account_number_last4": "1011"
},
"account_balance": {
"account_id": "acc_B518niGwGYKzig6vtrRVZGGGV",
"account_name": "Test Company, LLC"
}
},
"customer": {
"id": "cus_7Ay5mcUXAxwrN6wQEQUVEHBCJ",
"external_id": "e797ef3c-b586-4333-af90-7168d8427d85",
"business_name": "Awesome Company, LLC",
"first_name": "John",
"last_name": "Smith",
"government_identifier_last4": "9642",
"email": "john.smith@email.com",
"phone": "+15554829347"
},
"billing_details": {
"address_line_1": "111 Colorado Ave.",
"address_line_2": "Apt 403",
"city": "Des Moines",
"state": "IA",
"postal_code": "51111",
"country": "US"
},
"dynamic_descriptor": {
"merchant_name": "Test Corporation",
"merchant_contact": "+15552604982"
},
"device_information": {
"browser_family": "Mobile Safari",
"os_family": "iOS",
"device_family": "iPhone",
"ip_address": "192.168.1.1",
"user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3"
},
"created_at": "2024-06-30T01:02:29.212Z",
"modified_at": "2024-06-30T01:02:29.212Z"
},
"refund": {
"id": "rfd_2YKewBonG4tgk12MheY3PiHDy",
"account_id": "acc_B518niGwGYKzig6vtrRVZGGGV",
"environment": "production",
"external_id": "e797ef3c-b586-4333-af90-7168d8427d85",
"status": "successful",
"transaction_id": "trx_95rvMJvAVeG68W4NtLdfkN3LG",
"payment_id": "pmt_2YKewBonG4tgk12MheY3PiHDy",
"amount": 500,
"currency": "USD",
"reason": "Refunding shipping",
"declined_reason": "Suspected fraud",
"transfers": [
{
"id": "trnf_7yFLQWACr3DYDSz1xpoEAVfdq",
"account_id": "acc_B518niGwGYKzig6vtrRVZGGGV",
"environment": "production",
"external_id": "e797ef3c-b586-4333-af90-7168d8427d85",
"type": "payment",
"status": "successful",
"payment_transfer_id": "trnf_7yFLQWACr3DYDSz1xpoEAVfdq",
"payment_id": "pmt_2YKewBonG4tgk12MheY3PiHDy",
"refund_id": "rfd_2YKewBonG4tgk12MheY3PiHDy",
"transaction_id": "trx_95rvMJvAVeG68W4NtLdfkN3LG",
"seller_account_id": "acc_8ooQs32UCdriBvrHnVWbTmJbY",
"amount": 10000,
"transfer_fee": 100,
"currency": "USD",
"created_at": "2024-06-30T01:02:29.212Z",
"modified_at": "2024-06-30T01:02:29.212Z"
}
],
"device_information": {
"browser_family": "Mobile Safari",
"os_family": "iOS",
"device_family": "iPhone",
"ip_address": "192.168.1.1",
"user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3"
},
"created_at": "2024-06-30T01:02:29.212Z",
"modified_at": "2024-06-30T01:02:29.212Z"
},
"transfer": {
"id": "trnf_7yFLQWACr3DYDSz1xpoEAVfdq",
"account_id": "acc_B518niGwGYKzig6vtrRVZGGGV",
"environment": "production",
"external_id": "e797ef3c-b586-4333-af90-7168d8427d85",
"type": "payment",
"status": "successful",
"payment_transfer_id": "trnf_7yFLQWACr3DYDSz1xpoEAVfdq",
"payment_id": "pmt_2YKewBonG4tgk12MheY3PiHDy",
"refund_id": "rfd_2YKewBonG4tgk12MheY3PiHDy",
"transaction_id": "trx_95rvMJvAVeG68W4NtLdfkN3LG",
"seller_account_id": "acc_8ooQs32UCdriBvrHnVWbTmJbY",
"amount": 10000,
"transfer_fee": 100,
"currency": "USD",
"created_at": "2024-06-30T01:02:29.212Z",
"modified_at": "2024-06-30T01:02:29.212Z"
},
"created_at": "2024-06-30T01:02:29.212Z",
"modified_at": "2024-06-30T01:02:29.212Z"
},
"created_at": "2024-06-30T01:02:29.212Z",
"modified_at": "2024-06-30T01:02:29.212Z"
}
Bad Request
- application/json
- Schema
- Example (auto)
Schema
errors objectnullable
typestringnullable
titlestringnullable
statusint32nullable
detailstringnullable
instancestringnullable
property name*any
{
"errors": {},
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}
Unauthorized
- application/json
- Schema
- Example (auto)
Schema
typestringnullable
titlestringnullable
statusint32nullable
detailstringnullable
instancestringnullable
property name*any
{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}
Forbidden
- application/json
- Schema
- Example (auto)
Schema
typestringnullable
titlestringnullable
statusint32nullable
detailstringnullable
instancestringnullable
property name*any
{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}
Not Found
- application/json
- Schema
- Example (auto)
Schema
typestringnullable
titlestringnullable
statusint32nullable
detailstringnullable
instancestringnullable
property name*any
{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}
Authorization: X-API-KEY
name: X-API-KEYtype: apiKeyscopes: settlement:read
description: Authorization by API Key inside request's X-API-KEY headerin: header
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.publicsquare.com/settlements/:id");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("X-API-KEY", "<X-API-KEY>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear