Create a Customer

How to create a subscription customer

This API will help you to create and manage your customers with subscription plans.

Customer Fields

FieldDescription
emailCustomer's email address
first_nameCustomer's first name
last_nameCustomer's last name
referenceYour unique reference ID
addressCustomer's address
cityCustomer's city
stateCustomer's state
zipcodeCustomer's Zipcode
countryCustomer's country code e.g KE

Create Customer Request

import requests

url = "https://sandbox.intasend.com/api/v1/subscriptions-customers/"

payload = {
    "email": "[email protected]",
    "first_name": "string",
    "last_name": "string",
    "reference": "string",
    "address": "string",
    "city": "string",
    "state": "string",
    "zipcode": "string",
    "country": "string"
}
headers = {
    "accept": "application/json",
    "content-type": "application/json",
    "Authorization": "Bearer ISSecretKey_test_......"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://sandbox.intasend.com/api/v1/subscriptions-customers/', [
  'body' => '{"email":"[email protected]","first_name":"string","last_name":"string","reference":"string","address":"string","city":"string","state":"string","zipcode":"string","country":"string"}',
  'headers' => [
    'Authorization' => 'Bearer ISSecretKey_test1251...',
    'accept' => 'application/json',
    'content-type' => 'application/json',
  ],
]);

$data = json_decode($response->getBody());

Create Customer Response

{
  "customer_id": "string",
  "email": "[email protected]",
  "first_name": "string",
  "last_name": "string",
  "reference": "string",
  "address": "string",
  "city": "string",
  "state": "string",
  "zipcode": "string",
  "country": "string",
  "created_at": "2023-10-09T06:57:02.018Z",
  "updated_at": "2023-10-09T06:57:02.018Z"
}

What’s Next

Subscribe a customer to a plan