POST
/
api
/
external
/
v2
/
company_customers
Create a company customer
curl --request POST \
  --url https://app.pennylane.com/api/external/v2/company_customers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "My company",
  "vat_number": "FR12345678901",
  "reg_no": "123456789",
  "ledger_account": {
    "number": "411100344"
  },
  "phone": "+33612345678",
  "billing_address": {
    "address": "8 rue de la paix",
    "postal_code": "75002",
    "city": "Paris",
    "country_alpha2": "FR"
  },
  "delivery_address": {
    "address": "8 rue de la paix",
    "postal_code": "75002",
    "city": "Paris",
    "country_alpha2": "FR"
  },
  "payment_conditions": "upon_receipt",
  "billing_iban": "FR1420041010050500013M02606",
  "recipient": "John Doe",
  "reference": "REF-1234",
  "notes": "Some notes",
  "emails": [
    "[email protected]"
  ],
  "external_reference": "0e67fc3c-c632-4feb-ad34-e18ed5fbf66a",
  "billing_language": "fr_FR"
}'
{
  "id": 42,
  "name": "My Company",
  "billing_iban": "FR1420041010050500013M02606",
  "payment_conditions": "upon_receipt",
  "recipient": "John Doe",
  "phone": "+33612345678",
  "reference": "REF-1234",
  "notes": "Some notes",
  "vat_number": "FR12345678901",
  "reg_no": "123456789",
  "ledger_account": {
    "id": 123
  },
  "emails": [
    "[email protected]"
  ],
  "billing_address": {
    "address": "<string>",
    "postal_code": "<string>",
    "city": "<string>",
    "country_alpha2": "<string>"
  },
  "delivery_address": {
    "address": "<string>",
    "postal_code": "<string>",
    "city": "<string>",
    "country_alpha2": "<string>"
  },
  "created_at": "2023-08-30T10:08:08.146343Z",
  "updated_at": "2023-08-30T10:08:08.146343Z",
  "external_reference": "0e67fc3c-c632-4feb-ad34-e18ed5fbf66a",
  "billing_language": "fr_FR",
  "mandates": {
    "url": "https://app.pennylane.com/api/external/v2/gocardless_mandates?filter=%5B%7B%5C\"field%5C\":%5C\"customer_id%5C\",%5C\"operator%5C\":%5C\"eq%5C\",%5C\"value%5C\":%5C\"42%5C\"%7D%5D"
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
name
string
required
Example:

"My company"

billing_address
object
required
vat_number
string
Example:

"FR12345678901"

reg_no
string
Example:

"123456789"

ledger_account
object | null
phone
string
Example:

"+33612345678"

delivery_address
object
payment_conditions
enum<string>
default:30_days

Note that the custom option is only used on Pennylane's web app to avoid pre-filling the deadline when creating an invoice. On the API it has no effect and you will still have to provide a deadline when creating an invoice.

Available options:
upon_receipt,
custom,
15_days,
30_days,
45_days,
60_days
billing_iban
string | null
Example:

"FR1420041010050500013M02606"

recipient
string

The name of the person to whom the invoice is addressed

Example:

"John Doe"

reference
string | null
Example:

"REF-1234"

notes
string | null
Example:

"Some notes"

emails
string[]
Example:
external_reference
string

You can use your own unique value when creating the customer. If not provided, Pennylane will pick one for you. Value must be unique

Example:

"0e67fc3c-c632-4feb-ad34-e18ed5fbf66a"

billing_language
enum<string>

The language in which the customer will receive invoices. Default is fr_FR

Available options:
fr_FR,
en_GB,
de_DE

Response

Returns the created company customer

id
integer
required
Example:

42

name
string
required
Example:

"My Company"

billing_iban
string | null
required
Example:

"FR1420041010050500013M02606"

payment_conditions
enum<string>
required

Note that the custom option is only used on Pennylane's web app to avoid pre-filling the deadline when creating an invoice. On the API it has no effect and you will still have to provide a deadline when creating an invoice.

Available options:
upon_receipt,
custom,
15_days,
30_days,
45_days,
60_days
recipient
string
required

The name of the person to whom the invoice is addressed

Example:

"John Doe"

phone
string
required
Example:

"+33612345678"

reference
string | null
required
Example:

"REF-1234"

notes
string | null
required
Example:

"Some notes"

vat_number
string
required
Example:

"FR12345678901"

reg_no
string
required
Example:

"123456789"

ledger_account
object | null
required
emails
string[]
required
Example:
billing_address
object
required
delivery_address
object
required
created_at
string<date-time>
required
Example:

"2023-08-30T10:08:08.146343Z"

updated_at
string<date-time>
required
Example:

"2023-08-30T10:08:08.146343Z"

external_reference
string
required

The unique external reference assigned to this customer, assigned on creation either by you or Pennylane. (Same attribute as source_id in the API v1)

Example:

"0e67fc3c-c632-4feb-ad34-e18ed5fbf66a"

billing_language
enum<string>
required

The language in which the customer will receive invoices. Default is fr_FR

Available options:
fr_FR,
en_GB,
de_DE
mandates
object
required

GoCardless mandates associated with this customer