Create a customer

POST/v0.1/customers

Creates a customer using the customer_id you supply. Choose an identifier that maps to the payer in your own system and reuse it when retrieving the customer or associating checkouts and saved payment instruments with them.

OAuth scopes: Requires one of: payment_instruments, customers.write.

Authorization

Use one of the following alternatives:

  • apiKey
  • oauth2 with scopes payment_instrumentscustomers.write
Authorization guide

Body parameters

application/jsonrequired

Details of the customer.

  • customer_idstringrequired

    Identifier you supply when creating the customer. Use an ID from your own system and retain it for subsequent customer, checkout, and saved-payment-instrument requests.

    Example: "831ff8d4cd5958ab5670"

  • Personal details for the customer.

    Show 7 properties
    • First name of the customer.

      Example: "John"

    • last_namestring

      Last name of the customer.

      Example: "Doe"

    • emailstring

      Email address of the customer.

      Example: "user@example.com"

    • phonestring

      Phone number of the customer.

      Example: "+491635559723"

    • format: date

      Date of birth of the customer in YYYY-MM-DD format, without a time or timezone.

      Example: "1993-12-31"

    • tax_idstring
      maxLength: 255

      Identification number used for tax purposes, such as a CPF in Brazil.

      Example: "423.378.593-47"

    • addressobject

      Profile's personal address information.

      Show 6 properties
      • citystring

        City name from the address.

        Example: "Berlin"

      • countrystring

        Two letter country code formatted according to ISO3166-1 alpha-2.

        Example: "DE"

      • line_1string

        First line of the address with details of the street name and number.

        Example: "Sample street"

      • line_2string

        Second line of the address with details of the building, unit, apartment, and floor numbers.

        Example: "ap. 5"

      • Postal code from the address.

        Example: "10115"

      • statestring

        State name or abbreviation from the address.

        Example: "Berlin"

Responses

201application/json

Returns the customer resource.

  • customer_idstringrequired

    Identifier you supply when creating the customer. Use an ID from your own system and retain it for subsequent customer, checkout, and saved-payment-instrument requests.

    Example: "831ff8d4cd5958ab5670"

  • Personal details for the customer.

    Show 7 properties
    • First name of the customer.

      Example: "John"

    • last_namestring

      Last name of the customer.

      Example: "Doe"

    • emailstring

      Email address of the customer.

      Example: "user@example.com"

    • phonestring

      Phone number of the customer.

      Example: "+491635559723"

    • format: date

      Date of birth of the customer in YYYY-MM-DD format, without a time or timezone.

      Example: "1993-12-31"

    • tax_idstring
      maxLength: 255

      Identification number used for tax purposes, such as a CPF in Brazil.

      Example: "423.378.593-47"

    • addressobject

      Profile's personal address information.

      Show 6 properties
      • citystring

        City name from the address.

        Example: "Berlin"

      • countrystring

        Two letter country code formatted according to ISO3166-1 alpha-2.

        Example: "DE"

      • line_1string

        First line of the address with details of the street name and number.

        Example: "Sample street"

      • line_2string

        Second line of the address with details of the building, unit, apartment, and floor numbers.

        Example: "ap. 5"

      • Postal code from the address.

        Example: "10115"

      • statestring

        State name or abbreviation from the address.

        Example: "Berlin"

400application/json

The request body is invalid.

Exactly one of the following variants.

ErrorExtended
View ErrorExtended schema
  • messagestring

    Short description of the error.

    Example: "Resource not found"

  • Platform code for the error.

    Example: "NOT_FOUND"

  • paramstring

    Parameter name (with relative location) to which the error applies. Parameters from embedded resources are displayed using dot notation. For example, card.name refers to the name parameter embedded in the card object.

    Example: "card.name"

CustomerValidationError
View CustomerValidationError schema
  • instancestringrequired

    Unique identifier of this error occurrence.

    Example: "32a44c6c-85d3-49e8-86bf-a5bba98c4621"

  • error_codestringrequired

    Platform code for the error.

    Example: "INVALID"

  • error_messagestringrequired

    Short description of the error.

    Example: "customer_id"

401application/json

The request is not authorized.

  • typestringrequired
    format: uri

    A URI reference that identifies the problem type.

    Example: "https://developer.sumup.com/problem/not-found"

  • titlestring

    A short, human-readable summary of the problem type.

    Example: "Requested resource couldn't be found."

  • statusinteger

    The HTTP status code generated by the origin server for this occurrence of the problem.

    Example: 404

  • detailstring

    A human-readable explanation specific to this occurrence of the problem.

    Example: "The requested resource doesn't exist or does not belong to you."

  • instancestring
    format: uri

    A URI reference that identifies the specific occurrence of the problem.

    Example: "https://api.sumup.com/v0.1/checkouts/4e425463-3e1b-431d-83fa-1e51c2925e99"

403application/json

The request is authenticated but not permitted for this operation.

  • Short description of the error.

    Example: "request_not_allowed"

  • Platform code for the error.

    Example: "FORBIDDEN"

  • HTTP status code for the error.

    Example: "403"

409application/json

A customer with the provided identifier already exists.

  • messagestring

    Short description of the error.

    Example: "Resource not found"

  • Platform code for the error.

    Example: "NOT_FOUND"

Type to search…