# 請求書カード払い情報削除

`PUT /v1/business_payments/{id}/delete`

- operationId: `deleteBusinessPayment`
- tags: 請求書カード払い

指定したIDの請求書カード払い情報を削除します。


## コードサンプル

### cURL

```bash
curl \
    -X PUT \
    -H "Authorization:Bearer <Secret API Key>" \
    -H "Tenant-Buyer-Id:b_***********" \
    -H "Tenant-Buyer-Id: b_***********" \
'https://api.test.fincode.jp/v1/business_payments/bp_VbZbE8t6RMGIsIfOP3U7ww/delete'
```

### Node.js

```javascript
const API_KEY = "<Secret API Key>";
const BUSINESS_PAYMENT_ID = "bp_VbZbE8t6RMGIsIfOP3U7ww";

(async () => {
    const response = await fetch(`https://api.test.fincode.jp/v1/business_payments/${BUSINESS_PAYMENT_ID}/delete`, {
        method: "PUT",
        headers: {
            Authorization: `Bearer ${API_KEY}`,
            "Tenant-Buyer-Id": "b_***********",
        },
    });

    const data = await response.json();
    console.log(data);
})();
```

### Go

```go
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    req, err := http.NewRequest(http.MethodPut, "https://api.test.fincode.jp/v1/business_payments/bp_VbZbE8t6RMGIsIfOP3U7ww/delete", nil)
    if err != nil {
        panic(err)
    }

    req.Header.Set("Authorization", "Bearer <Secret API Key>")
    req.Header.Set("Tenant-Buyer-Id", "b_***********")

    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, err := io.ReadAll(resp.Body)
    if err != nil {
        panic(err)
    }

    fmt.Println(string(body))
}
```

### PHP

```php
<?php

$ch = curl_init('https://api.test.fincode.jp/v1/business_payments/bp_VbZbE8t6RMGIsIfOP3U7ww/delete');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer <Secret API Key>',
    'Tenant-Buyer-Id: b_***********',
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
```

### Python 3

```python
import requests

api_key = '<Secret API Key>'

url = 'https://api.test.fincode.jp/v1/business_payments/bp_abc123/delete'
headers = {
    'Authorization': f'Bearer {api_key}'
    'Tenant-Buyer-Id': 'b_***********'
}

response = requests.put(url, headers=headers)
print(response.text)
```

### Ruby

```ruby
require "net/http"
require "uri"

uri = URI.parse("https://api.test.fincode.jp/v1/business_payments/bp_VbZbE8t6RMGIsIfOP3U7ww/delete")
request = Net::HTTP::Put.new(uri)
request["Authorization"] = "Bearer <Secret API Key>"
request["Tenant-Buyer-Id"] = "b_***********"

response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
  http.request(request)
end

puts response.body
```

## パラメータ

| 名前 | 位置 | 必須 | 型 | 説明 |
| --- | --- | --- | --- | --- |
| `Tenant-Buyer-Id` | header | ✓ | schema | <span class="smallText color--red-400">※ バイヤープラットフォームのみ指定可</span> |
| `id` | path | ✓ | string | 取引ID |

## レスポンス

### 200 リクエストに成功

| パラメータ | 型 | 必須 | 説明 |
| --- | --- | --- | --- |
| `access_id` | string |  | 取引ID |
| `deleted` | string |  | 論理削除フラグ |

### 400 不正なリクエスト

| パラメータ | 型 | 必須 | 説明 |
| --- | --- | --- | --- |
| `errors` | array<FincodeAPIError> |  |  |

### 404 該当データなし

