# Update Bill

This API is used to update an existing [..](https://docs.leanx.io/api-docs/cloud-payment/bill "mention").

## Authentication

LeanX uses **Auth Token** to authenticate in each request's header.

{% hint style="info" %}
**Auth Token** can be retrieved in your portal dashboard under **API** page.
{% endhint %}

**Request Header**

```json
{
    "auth-token": "LP-0D7C06DE-MM|7394e58e-edee-4c42-9ca5-bcbc449f1b9f|2141df4a3cb633d5ce8683bb0c55067e5caebfbe07390dde277dc455bcc95c91723a81b5e565c7c02d68fb84e396722563016bf99e576a4b8cdbe4423fbf226b"
}
```

## Update Bill

HTTP Method: <mark style="color:orange;">PUT</mark>

```
https://api.leanx.dev/api/v1/merchant/update-bill
```

**Request Body**

```json
{
    "id": 50,
    "full_name": "JOHN DOE",
    "email": "johndoe2@email.com",
    "phone_number": "0133456789"
}
```

**Attributes**

<table><thead><tr><th width="251">Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>id<mark style="color:red;">*</mark></td><td>Number</td><td>Your <a data-mention href="..">..</a> ID</td></tr><tr><td>full_name</td><td>String</td><td>Payer name</td></tr><tr><td>email</td><td>String</td><td>Payer email</td></tr><tr><td>phone_number</td><td>String</td><td>Payer mobile number</td></tr></tbody></table>

**Response**

```json
{
  "response_code": 2000,
  "description": "SUCCESS",
  "app_version": "/api/v1",
  "talk_to_server_before": "2023-02-01T21:02:03.737752",
  "data": {
    "phone_number": "0133456789",
    "invoice_status_id": 1,
    "collection_id": 2,
    "created_at": "2023-02-01T17:16:07",
    "status": null,
    "bill_transaction_type_id": 1,
    "payment_record_id": 84,
    "updated_at": "2023-02-01T21:02:03",
    "id": 50,
    "total": 120.00,
    "shipping_address_id": null,
    "customer_id": 35,
    "total_amount_with_fee": 120.70,
    "invoice_status": "PENDING",
    "account_id": 2,
    "full_name": "JOHN DOE",
    "transaction_fee": 0.70,
    "api_key": "dbd44a99-2d0f-470d-91fe-c73e8cdd1848",
    "quantity": 1,
    "checking_counter": 1,
    "payment_date": null,
    "email": "johndoe2@email.com",
    "invoice_no": "BP-AUTH-3663A3D98C-LNP",
    "price_per_quantity": 20.00,
    "record_status": 1,
    "transaction_invoice_no": null
  },
  "breakdown_errors": null,
  "token": "dbd44a99-2d0f-470d-91fe-c73e8cdd1848"
}
```
