---
title: "Save the billing details of a charge"
description: "The name and address billed, kept for later charges too."
url: "https://openemail.uk/docs/api/billing/invoice-details"
area: "API"
category: "Mailbox"
---

# Save the billing details of a charge

The name and address billed, kept for later charges too.

`PUT /billing/invoices/{orderId}/details`

**Also documents:** `GET /billing/countries`

## PUT /billing/invoices/{orderId}/details

The name and address billed, kept for later charges too.

## Example

Needs `billing:write`. It is the Billing address dialog. `country` is a two-letter code, one of those `GET /billing/countries` lists, and in the US and Canada `state` is its two-letter code. `invoice` is `ready` when the charge already had one, `started` when it is being written, and `refused` with the reason in `message`.

**curl**

```
curl -X PUT "$OE/billing/invoices/8c51f0d2-3b7e-4a19-b6c4-0e9d2f7a1c38/details" -H "$AUTH" \
  -H 'content-type: application/json' \
  -d '{ "name": "Acme Ltd", "line1": "1 Market Street", "city": "London", "postalCode": "EC1A 1AA", "country": "GB" }'
```

**Response**

```
{
  "object": "invoice_details",
  "orderId": "8c51f0d2-3b7e-4a19-b6c4-0e9d2f7a1c38",
  "invoice": "started",
  "message": null
}
```

> An address the billing provider refuses is a 422 `billing_address_rejected`.

> An OAuth access token needs a verification code for this call. Until the app has verified one in the last 60 minutes, the call answers `403` `step_up_required` and changes nothing. An API key is never asked. The Authentication page shows how to ask for a code and verify it.

## Reference

- [`PUT /billing/invoices/{orderId}/details`](https://openemail.uk/docs/api/reference/billing#put-billing-invoices-orderid-details): full reference
- [`GET /billing/countries`](https://openemail.uk/docs/api/reference/billing#get-billing-countries): full reference
