Update Customer
curl --request PUT \
--url https://service-sandbox.tazapay.com/v3/customer/ \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": {
"calling_code": "1",
"number": "9876543210"
},
"billing": [
{
"name": "Andrew Robin",
"address": {
"line1": "9th West",
"line2": "57th Street",
"city": "New York",
"state": "New York",
"country": "US",
"postal_code": "10019"
},
"phone": {
"calling_code": "1",
"number": "9876543210"
}
}
],
"shipping": [
{
"name": "Andrew Robin",
"address": {
"line1": "9th West",
"line2": "57th Street",
"city": "New York",
"state": "New York",
"country": "US",
"postal_code": "10019"
},
"phone": {
"calling_code": "1",
"number": "9876543210"
}
}
],
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
'import requests
url = "https://service-sandbox.tazapay.com/v3/customer/"
payload = {
"phone": {
"calling_code": "1",
"number": "9876543210"
},
"billing": [
{
"name": "Andrew Robin",
"address": {
"line1": "9th West",
"line2": "57th Street",
"city": "New York",
"state": "New York",
"country": "US",
"postal_code": "10019"
},
"phone": {
"calling_code": "1",
"number": "9876543210"
}
}
],
"shipping": [
{
"name": "Andrew Robin",
"address": {
"line1": "9th West",
"line2": "57th Street",
"city": "New York",
"state": "New York",
"country": "US",
"postal_code": "10019"
},
"phone": {
"calling_code": "1",
"number": "9876543210"
}
}
],
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phone: {calling_code: '1', number: '9876543210'},
billing: [
{
name: 'Andrew Robin',
address: {
line1: '9th West',
line2: '57th Street',
city: 'New York',
state: 'New York',
country: 'US',
postal_code: '10019'
},
phone: {calling_code: '1', number: '9876543210'}
}
],
shipping: [
{
name: 'Andrew Robin',
address: {
line1: '9th West',
line2: '57th Street',
city: 'New York',
state: 'New York',
country: 'US',
postal_code: '10019'
},
phone: {calling_code: '1', number: '9876543210'}
}
],
metadata: {key1: 'value1', key2: 'value2'}
})
};
fetch('https://service-sandbox.tazapay.com/v3/customer/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://service-sandbox.tazapay.com/v3/customer/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'phone' => [
'calling_code' => '1',
'number' => '9876543210'
],
'billing' => [
[
'name' => 'Andrew Robin',
'address' => [
'line1' => '9th West',
'line2' => '57th Street',
'city' => 'New York',
'state' => 'New York',
'country' => 'US',
'postal_code' => '10019'
],
'phone' => [
'calling_code' => '1',
'number' => '9876543210'
]
]
],
'shipping' => [
[
'name' => 'Andrew Robin',
'address' => [
'line1' => '9th West',
'line2' => '57th Street',
'city' => 'New York',
'state' => 'New York',
'country' => 'US',
'postal_code' => '10019'
],
'phone' => [
'calling_code' => '1',
'number' => '9876543210'
]
]
],
'metadata' => [
'key1' => 'value1',
'key2' => 'value2'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://service-sandbox.tazapay.com/v3/customer/"
payload := strings.NewReader("{\n \"phone\": {\n \"calling_code\": \"1\",\n \"number\": \"9876543210\"\n },\n \"billing\": [\n {\n \"name\": \"Andrew Robin\",\n \"address\": {\n \"line1\": \"9th West\",\n \"line2\": \"57th Street\",\n \"city\": \"New York\",\n \"state\": \"New York\",\n \"country\": \"US\",\n \"postal_code\": \"10019\"\n },\n \"phone\": {\n \"calling_code\": \"1\",\n \"number\": \"9876543210\"\n }\n }\n ],\n \"shipping\": [\n {\n \"name\": \"Andrew Robin\",\n \"address\": {\n \"line1\": \"9th West\",\n \"line2\": \"57th Street\",\n \"city\": \"New York\",\n \"state\": \"New York\",\n \"country\": \"US\",\n \"postal_code\": \"10019\"\n },\n \"phone\": {\n \"calling_code\": \"1\",\n \"number\": \"9876543210\"\n }\n }\n ],\n \"metadata\": {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://service-sandbox.tazapay.com/v3/customer/")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"phone\": {\n \"calling_code\": \"1\",\n \"number\": \"9876543210\"\n },\n \"billing\": [\n {\n \"name\": \"Andrew Robin\",\n \"address\": {\n \"line1\": \"9th West\",\n \"line2\": \"57th Street\",\n \"city\": \"New York\",\n \"state\": \"New York\",\n \"country\": \"US\",\n \"postal_code\": \"10019\"\n },\n \"phone\": {\n \"calling_code\": \"1\",\n \"number\": \"9876543210\"\n }\n }\n ],\n \"shipping\": [\n {\n \"name\": \"Andrew Robin\",\n \"address\": {\n \"line1\": \"9th West\",\n \"line2\": \"57th Street\",\n \"city\": \"New York\",\n \"state\": \"New York\",\n \"country\": \"US\",\n \"postal_code\": \"10019\"\n },\n \"phone\": {\n \"calling_code\": \"1\",\n \"number\": \"9876543210\"\n }\n }\n ],\n \"metadata\": {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://service-sandbox.tazapay.com/v3/customer/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone\": {\n \"calling_code\": \"1\",\n \"number\": \"9876543210\"\n },\n \"billing\": [\n {\n \"name\": \"Andrew Robin\",\n \"address\": {\n \"line1\": \"9th West\",\n \"line2\": \"57th Street\",\n \"city\": \"New York\",\n \"state\": \"New York\",\n \"country\": \"US\",\n \"postal_code\": \"10019\"\n },\n \"phone\": {\n \"calling_code\": \"1\",\n \"number\": \"9876543210\"\n }\n }\n ],\n \"shipping\": [\n {\n \"name\": \"Andrew Robin\",\n \"address\": {\n \"line1\": \"9th West\",\n \"line2\": \"57th Street\",\n \"city\": \"New York\",\n \"state\": \"New York\",\n \"country\": \"US\",\n \"postal_code\": \"10019\"\n },\n \"phone\": {\n \"calling_code\": \"1\",\n \"number\": \"9876543210\"\n }\n }\n ],\n \"metadata\": {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "",
"data": {
"message": "Successfully updated the customer"
}
}Customer
Update Customer
This endpoint updates an already existing customer object
PUT
/
v3
/
customer
/
Update Customer
curl --request PUT \
--url https://service-sandbox.tazapay.com/v3/customer/ \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": {
"calling_code": "1",
"number": "9876543210"
},
"billing": [
{
"name": "Andrew Robin",
"address": {
"line1": "9th West",
"line2": "57th Street",
"city": "New York",
"state": "New York",
"country": "US",
"postal_code": "10019"
},
"phone": {
"calling_code": "1",
"number": "9876543210"
}
}
],
"shipping": [
{
"name": "Andrew Robin",
"address": {
"line1": "9th West",
"line2": "57th Street",
"city": "New York",
"state": "New York",
"country": "US",
"postal_code": "10019"
},
"phone": {
"calling_code": "1",
"number": "9876543210"
}
}
],
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
'import requests
url = "https://service-sandbox.tazapay.com/v3/customer/"
payload = {
"phone": {
"calling_code": "1",
"number": "9876543210"
},
"billing": [
{
"name": "Andrew Robin",
"address": {
"line1": "9th West",
"line2": "57th Street",
"city": "New York",
"state": "New York",
"country": "US",
"postal_code": "10019"
},
"phone": {
"calling_code": "1",
"number": "9876543210"
}
}
],
"shipping": [
{
"name": "Andrew Robin",
"address": {
"line1": "9th West",
"line2": "57th Street",
"city": "New York",
"state": "New York",
"country": "US",
"postal_code": "10019"
},
"phone": {
"calling_code": "1",
"number": "9876543210"
}
}
],
"metadata": {
"key1": "value1",
"key2": "value2"
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phone: {calling_code: '1', number: '9876543210'},
billing: [
{
name: 'Andrew Robin',
address: {
line1: '9th West',
line2: '57th Street',
city: 'New York',
state: 'New York',
country: 'US',
postal_code: '10019'
},
phone: {calling_code: '1', number: '9876543210'}
}
],
shipping: [
{
name: 'Andrew Robin',
address: {
line1: '9th West',
line2: '57th Street',
city: 'New York',
state: 'New York',
country: 'US',
postal_code: '10019'
},
phone: {calling_code: '1', number: '9876543210'}
}
],
metadata: {key1: 'value1', key2: 'value2'}
})
};
fetch('https://service-sandbox.tazapay.com/v3/customer/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://service-sandbox.tazapay.com/v3/customer/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'phone' => [
'calling_code' => '1',
'number' => '9876543210'
],
'billing' => [
[
'name' => 'Andrew Robin',
'address' => [
'line1' => '9th West',
'line2' => '57th Street',
'city' => 'New York',
'state' => 'New York',
'country' => 'US',
'postal_code' => '10019'
],
'phone' => [
'calling_code' => '1',
'number' => '9876543210'
]
]
],
'shipping' => [
[
'name' => 'Andrew Robin',
'address' => [
'line1' => '9th West',
'line2' => '57th Street',
'city' => 'New York',
'state' => 'New York',
'country' => 'US',
'postal_code' => '10019'
],
'phone' => [
'calling_code' => '1',
'number' => '9876543210'
]
]
],
'metadata' => [
'key1' => 'value1',
'key2' => 'value2'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://service-sandbox.tazapay.com/v3/customer/"
payload := strings.NewReader("{\n \"phone\": {\n \"calling_code\": \"1\",\n \"number\": \"9876543210\"\n },\n \"billing\": [\n {\n \"name\": \"Andrew Robin\",\n \"address\": {\n \"line1\": \"9th West\",\n \"line2\": \"57th Street\",\n \"city\": \"New York\",\n \"state\": \"New York\",\n \"country\": \"US\",\n \"postal_code\": \"10019\"\n },\n \"phone\": {\n \"calling_code\": \"1\",\n \"number\": \"9876543210\"\n }\n }\n ],\n \"shipping\": [\n {\n \"name\": \"Andrew Robin\",\n \"address\": {\n \"line1\": \"9th West\",\n \"line2\": \"57th Street\",\n \"city\": \"New York\",\n \"state\": \"New York\",\n \"country\": \"US\",\n \"postal_code\": \"10019\"\n },\n \"phone\": {\n \"calling_code\": \"1\",\n \"number\": \"9876543210\"\n }\n }\n ],\n \"metadata\": {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://service-sandbox.tazapay.com/v3/customer/")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"phone\": {\n \"calling_code\": \"1\",\n \"number\": \"9876543210\"\n },\n \"billing\": [\n {\n \"name\": \"Andrew Robin\",\n \"address\": {\n \"line1\": \"9th West\",\n \"line2\": \"57th Street\",\n \"city\": \"New York\",\n \"state\": \"New York\",\n \"country\": \"US\",\n \"postal_code\": \"10019\"\n },\n \"phone\": {\n \"calling_code\": \"1\",\n \"number\": \"9876543210\"\n }\n }\n ],\n \"shipping\": [\n {\n \"name\": \"Andrew Robin\",\n \"address\": {\n \"line1\": \"9th West\",\n \"line2\": \"57th Street\",\n \"city\": \"New York\",\n \"state\": \"New York\",\n \"country\": \"US\",\n \"postal_code\": \"10019\"\n },\n \"phone\": {\n \"calling_code\": \"1\",\n \"number\": \"9876543210\"\n }\n }\n ],\n \"metadata\": {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://service-sandbox.tazapay.com/v3/customer/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone\": {\n \"calling_code\": \"1\",\n \"number\": \"9876543210\"\n },\n \"billing\": [\n {\n \"name\": \"Andrew Robin\",\n \"address\": {\n \"line1\": \"9th West\",\n \"line2\": \"57th Street\",\n \"city\": \"New York\",\n \"state\": \"New York\",\n \"country\": \"US\",\n \"postal_code\": \"10019\"\n },\n \"phone\": {\n \"calling_code\": \"1\",\n \"number\": \"9876543210\"\n }\n }\n ],\n \"shipping\": [\n {\n \"name\": \"Andrew Robin\",\n \"address\": {\n \"line1\": \"9th West\",\n \"line2\": \"57th Street\",\n \"city\": \"New York\",\n \"state\": \"New York\",\n \"country\": \"US\",\n \"postal_code\": \"10019\"\n },\n \"phone\": {\n \"calling_code\": \"1\",\n \"number\": \"9876543210\"\n }\n }\n ],\n \"metadata\": {\n \"key1\": \"value1\",\n \"key2\": \"value2\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "",
"data": {
"message": "Successfully updated the customer"
}
}Allows you to look up details of existing users on Tazapay’s database with their Tazapay account UUID.
Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
application/json
Phone contact details
Show child attributes
Show child attributes
Billing Details of the customer
Show child attributes
Show child attributes
Shipping Details of the customer
Show child attributes
Show child attributes
Set of key-value pairs that can be attached to the object (JSON string format)
Example:
"{\"key1\": \"value1\", \"key2\": \"value2\"}"
Customer id for which details need to be updated.
Was this page helpful?
⌘I