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
Field | Description |
---|---|
Customer's email address | |
first_name | Customer's first name |
last_name | Customer's last name |
reference | Your unique reference ID |
address | Customer's address |
city | Customer's city |
state | Customer's state |
zipcode | Customer's Zipcode |
country | Customer'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"
}
Updated about 1 year ago