# Create using API

We strongly recommend creating customers by integrating Customer Registration. However creating a customer can also be done via a call to the customer creation endpoint. When integrating through the endpoint a customer can be initialized with Contact information and a payment method with a tokenized card. Card Input can be used to generate a card token.

# Request

 

































POST /v1/customer

Host: merchant.intergiro.com
Content-Type: application/json
Authentication: Bearer <public.api.key | private.api.key>

{
  "number": "customer-number-001",
  "method": [
    {
      "card": "<single-use.card.token>",
      "type": "token",
      "client": {
        "browser": {
          "color_depth": 24,
          "resolution": [
            2560,
            1440
          ],
          "java": false,
          "javascript": true,
          "locale": "en-GB",
          "timezone": -120,
          "parent": "<origin of current page url>"
        }
      }
    }
  ],
  "contact": {
    "name": "Joe Smith",
    "email": "joe.smith@example.com"
  }
}

# Response

{
  "id": "<Intergiro customer identifier>",
  "number": "<your customer number>",
  "contact": <contact information>,
  "method": [<payment method>],
  "status": "<Customer Status>",
  "total": <Customer Balance>,
  "schedule": "<customer payment schedule>",
  "currency": "<customer currency>"
}
{
  "id": "SMmmIYXgLFTgE8qW",
  "number": "customer-number-001",
  "contact": {
    "name": "Joe Smith",
    "email": "joe.smith@example.com"
  },
  "method": [
    {
      "type": "card",
      "scheme": "<scheme>",
      "iin": "123456",
      "last4": "1234",
      "expires": [
        2,
        22
      ],
      "acquirer": "intergiro",
      "created": "1970-01-01T00:00:00.000Z",
      "token": "<card.token>"
    }
  ],
  "status": "active",
  "total": 0,
  "balance": [],
  "schedule": "monthly",
  "currency": "SEK"
}

# With initial Orders and Subscriptions

To add one or more Orders associated with the Customer, populate the order field with a list or a single Order.Creatable without the fields "payment" and "customer". The items value of the order, or the first order in the list, is used to authorize the Customer Method.

Subscriptions can be added in a similar way, by populating the Customer Creatable with Subscription Creatable or Subscription Creatable[].

The response will be a Customer & { order: tokenized.order | tokenized.order[] } or an Error. If you receive a verification required error, 3D secure needs to be performed.

# Request

 





































POST /v1/customer

Host: merchant.intergiro.com
Content-Type: application/json
Authentication: Bearer <public.api.key | private.api.key>

{
  "number": "customer-number-001",
  "method": [
    {
      "card": "<single-use.card.token>",
      "type": "token",
      "client": {
        "browser": {
          "color_depth": 24,
          "resolution": [
            2560,
            1440
          ],
          "java": false,
          "javascript": true,
          "locale": "en-GB",
          "timezone": -120,
          "parent": "<origin of current page url>"
        }
      }
    }
  ],
  "contact": {
    "name": "Joe Smith",
    "email": "joe.smith@example.com"
  },
  "order": {
	  "items": 42,
	  "currency": "EUR",
  }
}

# Response

{
  "id": "SMmmIYXgLFTgE8qW",
  "number": "customer-number-001",
  "contact": {
    "name": "Joe Smith",
    "email": "joe.smith@example.com"
  },
  "method": [
    {
      "type": "card",
      "scheme": "<scheme>",
      "iin": "123456",
      "last4": "1234",
      "expires": [
        2,
        22
      ],
      "acquirer": "intergiro",
      "created": "1970-01-01T00:00:00.000Z",
      "token": "<card.token>"
    }
  ],
  "status": "active",
  "total": 0,
  "balance": [],
  "schedule": "monthly",
  "currency": "SEK",
  "order": "ZXlKaGJHY2lPaUpTVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SnBjM01pT2lKd1lYbG1kVzVqSWl3aWFXRjBJam94TmpNMk5EWTBOREExTENKaGRXUWlPaUp3Y205a2RXTjBhVzl1SWl3aVkzSmxZWFJsWkNJNklqSXdNakV0TVRFdE1EbFVNVE02TWpZNk5EVXVNekE1V2lJc0ltbDBaVzF6SWpwYmV5SnVkVzFpWlhJaU9pSjBjekF3TVMxaUlpd2libUZ0WlNJNklrSmhjMmxqSUZRdGMyaHBjblFzSUdKc1lXTnJJaXdpY0hKcFkyVWlPakl3TUN3aWRtRjBJam8xTUN3aWNYVmhiblJwZEhraU9qVXNJbk4wWVhSMWN5STZXeUp2Y21SbGNtVmtJaXdpYjNKa1pYSmxaQ0lzSW05eVpHVnlaV1FpTENKdmNtUmxjbVZrSWl3aWIzSmtaWEpsWkNKZGZTeDdJbTUxYldKbGNpSTZJblJ6TURBeExYY2lMQ0p1WVcxbElqb2lRbUZ6YVdNZ1ZDMXphR2x5ZEN3Z2QyaHBkR1VpTENKd2Nt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