Detach bank account from customer
PUThttps://api.publicsquare.com/payment-methods/bank-accounts/:id/detach
Detach a bank account payment method from a customer in the Account.
Permissions
payment-method:write
Request
Path Parameters
id stringrequired
Responses
- 200
- 400
- 401
- 403
- 404
OK
- application/json
- Schema
- Example (auto)
Schema
idstringnullable
Bank Account ID
Example:
ba_7Ay5mcUXAxwrN6wQEQUVEHBCJ
account_idstringnullable
Account ID
Example:
acc_B518niGwGYKzig6vtrRVZGGGV
environmentstringnullable
Environment - Can be test
or production
Example:
production
customer_idstringnullable
Customer ID
Example:
cus_7Ay5mcUXAxwrN6wQEQUVEHBCJ
billing_details object
created_atdate-timenullable
Date bank account was created
Example:
2024-06-30T01:02:29.212Z
modified_atdate-timenullable
Date bank account was modified
Example:
2024-06-30T01:02:29.212Z
account_holder_namestringnullable
Account Holder Name
Example:
John Doe
account_holder_typestringnullable
AccountHolderType - Can be individual
or company
Example:
individual
account_typestringnullable
AccountType - Can be checking
or savings
Example:
checking
routing_numberstringnullable
Routing number
Example:
110000000
account_number_last4stringnullable
Last 4 digits of the account number
Example:
1011
{
"id": "ba_7Ay5mcUXAxwrN6wQEQUVEHBCJ",
"account_id": "acc_B518niGwGYKzig6vtrRVZGGGV",
"environment": "production",
"customer_id": "cus_7Ay5mcUXAxwrN6wQEQUVEHBCJ",
"billing_details": {
"address_line_1": "111 Colorado Ave.",
"address_line_2": "Apt 403",
"city": "Des Moines",
"state": "IA",
"postal_code": "51111",
"country": "US"
},
"created_at": "2024-06-30T01:02:29.212Z",
"modified_at": "2024-06-30T01:02:29.212Z",
"account_holder_name": "John Doe",
"account_holder_type": "individual",
"account_type": "checking",
"routing_number": "110000000",
"account_number_last4": "1011"
}
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: payment-method:write
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.Put, "https://api.publicsquare.com/payment-methods/bank-accounts/:id/detach");
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