🇬🇧
Yativo Documentation
Spanish
English
English
  • Yativo
  • Introduction to Yativo
    • Financial Infrastructure
    • About Us
  • Dashboard
  • Business Plans
  • Getting Started with Yativo API
  • Yativo API Glossary
  • API reference
    • Misc.
      • Countries
      • States
      • City
  • Security and Authentication
    • Security
    • Authentication
    • Idempotency in API Requests
  • Environment
    • Environments
  • Notifications
    • Webhook
  • Compliance
    • Verification
      • KYC
      • KYB
      • KYC/KYB Update
      • KYC Status
      • Global Business Search
    • Supported Jurisdiction
    • Supported Countries, Currencies and Payment Method
  • User Management
    • Customer
      • Get Customers
      • Retrieve customer
      • Add Customer
  • Payments
    • Currencies
    • Crypto Wallets
      • Generate Wallet Address
      • Fetch Wallet Address
      • Crypto Deposit History
      • Single crypto deposit history
    • Payout
      • Payout
      • Get Payouts
      • Get Payout
      • Beneficiaries
        • Get Beneficiaries
        • Add Beneficiary Payment Details
        • Update Beneficiary
        • Archive Beneficiary
        • Add Beneficiary
    • Payin
    • Virtual Cards
      • Supported Currency, Country
      • Create card
      • Fetch card
      • Top up card
      • Get Transactions
      • Freeze and Unfreeze Card
    • Virtual Accounts
      • Create VIrtual Accounts
        • USD Virtual Account
        • Mexico Virtual Account
        • Brazil PIX QR
      • Virtual Account Management
      • Transaction History
  • Foreign Exchange
    • Exchange Rate
      • Request Quote
  • Transactions
    • Transaction Summary
    • Get Single Transaction
  • Crypto System
    • Yativo Crypto Platform API
Powered by GitBook
On this page
  1. User Management
  2. Customer

Add Customer

The "Add Customer" endpoint is a vital component of our API, designed to facilitate the creation and storage of new customer records within the system.

The POST {{baseUrl}}/customer endpoint is designed to facilitate the creation and storage of new customer records within the system. This endpoint allows applications to efficiently add customer data, ensuring that new customer information is accurately recorded for subsequent use. It supports various use cases, including registering new users, onboarding clients, and integrating customer data from other systems.

Key Features:

  • HTTP Method: POST

  • Endpoint URL: {{baseUrl}}/customer

  • Authentication: Requires Bearer token to ensure secure access.

  • Request Payload: Accepts a JSON object containing detailed customer information, such as name, email, phone number, address, and identification details.

  • Note the customer KYC can be carried out by the user via link sent to the user email or you can send the information via API.

Create a new user

POST /customer

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

{
    "customer_name": "John Doe",
    "customer_email": "john.doe@gmail.com",
    "customer_phone": "+1xxxxxx",
    "customer_country": "USA",
    "customer_type": "individual", // or business, defaults to individual when not passed
}
import requests
import json

url = "{{baseUrl}}/customer"

payload = json.dumps({
    "customer_name": "Emmanuel A Towoju",
    "customer_email": "tbash7676@gmail.com",
    "customer_phone": "+2349039395114",
    "customer_country": "USA",
    "customer_type": "individual", // or business, defaults to individual when not passed
    "send_kyc_mail": true // default to true. email with URL to complete kyc will be sent to custome_email
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "json"
require "net/http"

url = URI("{{baseUrl}}/customer")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9"
request.body = JSON.dump({
    "customer_name": "Emmanuel A Towoju",
    "customer_email": "tbash7676@gmail.com",
    "customer_phone": "+2349039395114",
    "customer_country": "USA",
    "customer_type": "individual", // or business, defaults to individual when not passed
    "send_kyc_mail": true // default to true. email with URL to complete kyc will be sent to custome_email
})

response = http.request(request)
puts response.read_body
// Some codconst axios = require('axios');
let data = JSON.stringify({
    "customer_name": "Emmanuel A Towoju",
    "customer_email": "tbash7676@gmail.com",
    "customer_phone": "+2349039395114",
    "customer_country": "USA",
    "customer_type": "individual", // or business, defaults to individual when not passed
    "send_kyc_mail": true // default to true. email with URL to complete kyc will be sent to custome_email
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: '{{baseUrl}}/customer',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.lo<?php
<?php

$client = new Client();
$headers = [
  'Content-Type' => 'application/json',
  'Authorization' => 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9'
];
$body = '{
    "customer_name": "Emmanuel A Towoju",
    "customer_email": "tbash7676@gmail.com",
    "customer_phone": "+2349039395114",
    "customer_country": "USA",
    "customer_type": "individual", // or business, defaults to individual when not passed
    "send_kyc_mail": true // default to true. email with URL to complete kyc will be sent to custome_email
}';
$request = new Request('POST', '{{baseUrl}}/customer', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
const url = '{{baseUrl}}/customer';

const payload = JSON.stringify({
    "customer_name": "Emmanuel A Towoju",
    "customer_email": "tbash7676@gmail.com",
    "customer_phone": "+2349039395114",
    "customer_country": "USA",
    "customer_type": "individual", // or business, defaults to individual when not passed
    "send_kyc_mail": true // default to true. email with URL to complete kyc will be sent to custome_email
});

const options = {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9'
  },
  body: payload
};

fetch(url, options)
  .then(response => {
    if (!response.ok) {
      throw new Error('Network response was not ok ' + response.statusText);
    }
    return response.json();
  })
  .then(data => console.log('Customer created:', data))
  .catch(error => console.error('Error:', error));

Response

{
  "status": "success",
  "status_code": 200,
  "message": "Customer created successfully",
  "data": {
    "id": "21fe7601-3be3-4d15-94c0-a94b15d8b872",
    "full_name": "Emmanuel A Towoju",
    "email": "perfectwordpre@gmail.com",
    "type": "individual",
    "kyc_link": "https://bridge.withpersona.com/verify?inquiry-template-id=itmpl_NtHYpb9AbEYCPxGo5iRbc9d2&fields[developer_id]=2da859f2-9764-48e6-92e6-dd9f6747801b&fields[iqt_token]=46f7565fe2ba42843b957cec6d783e48f85dff6d6ea56cf5753634b09a3214e8WwzmNl&reference-id=7d5b9315-796e-4d4d-b771-1ee5997e4abf&redirect-uri=https%3A%2F%2Fyativo-web-design-nine.vercel.app%2F&environment-id=env_UWeuo2CnqFQXVeKujbQLBx6u",
    "tos_link": "https://dashboard.bridge.xyz/accept-terms-of-service?customer_id=7d5b9315-796e-4d4d-b771-1ee5997e4abf",
    "kyc_status": "approved",
    "rejection_reasons": [],
    "tos_status": "pending",
    "created_at": "2024-12-01T18:46:15.392Z",
    "customer_id": "7d5b9315-796e-4d4d-b771-1ee5997e4abf",
    "persona_inquiry_type": "gov_id_db"
  }
}
{
  "error": "Invalid request"
}

PreviousRetrieve customerNextCurrencies

Last updated 3 months ago

  • Create a new user
  • POSTAdd customer

Add customer

post
Authorizations
Body
all ofOptional
and
anyOptionalExample: {"customer_name":"Emmanuel A Towoju","customer_email":"tbash7676@gmail.com","customer_phone":"+2349039395114","customer_country":"USA","customer_type":"individual","send_kyc_mail":true}
Responses
200
OK
application/json
Responseall of
and
anyOptionalExample: {"status":"success","status_code":200,"message":"Customer created successfully","data":{"id":"21fe7601-3be3-4d15-94c0-a94b15d8b872","full_name":"Emmanuel A Towoju","email":"perfectwordpre@gmail.com","type":"individual","kyc_link":"https://bridge.withpersona.com/verify?inquiry-template-id=itmpl_NtHYpb9AbEYCPxGo5iRbc9d2&fields[developer_id]=2da859f2-9764-48e6-92e6-dd9f6747801b&fields[iqt_token]=46f7565fe2ba42843b957cec6d783e48f85dff6d6ea56cf5753634b09a3214e8WwzmNl&reference-id=7d5b9315-796e-4d4d-b771-1ee5997e4abf&redirect-uri=https%3A%2F%2Fyativo-web-design-nine.vercel.app%2F&environment-id=env_UWeuo2CnqFQXVeKujbQLBx6u","tos_link":"https://dashboard.bridge.xyz/accept-terms-of-service?customer_id=7d5b9315-796e-4d4d-b771-1ee5997e4abf","kyc_status":"approved","rejection_reasons":[],"tos_status":"pending","created_at":"2024-12-01T18:46:15.392Z","customer_id":"7d5b9315-796e-4d4d-b771-1ee5997e4abf","persona_inquiry_type":"gov_id_db"}}
post
POST /api/v1/customer HTTP/1.1
Host: smtp.yativo.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 185

{
  "customer_name": "Emmanuel A Towoju",
  "customer_email": "tbash7676@gmail.com",
  "customer_phone": "+2349039395114",
  "customer_country": "USA",
  "customer_type": "individual",
  "send_kyc_mail": true
}
200

OK

{
  "status": "success",
  "status_code": 200,
  "message": "Customer created successfully",
  "data": {
    "id": "21fe7601-3be3-4d15-94c0-a94b15d8b872",
    "full_name": "Emmanuel A Towoju",
    "email": "perfectwordpre@gmail.com",
    "type": "individual",
    "kyc_link": "https://bridge.withpersona.com/verify?inquiry-template-id=itmpl_NtHYpb9AbEYCPxGo5iRbc9d2&fields[developer_id]=2da859f2-9764-48e6-92e6-dd9f6747801b&fields[iqt_token]=46f7565fe2ba42843b957cec6d783e48f85dff6d6ea56cf5753634b09a3214e8WwzmNl&reference-id=7d5b9315-796e-4d4d-b771-1ee5997e4abf&redirect-uri=https%3A%2F%2Fyativo-web-design-nine.vercel.app%2F&environment-id=env_UWeuo2CnqFQXVeKujbQLBx6u",
    "tos_link": "https://dashboard.bridge.xyz/accept-terms-of-service?customer_id=7d5b9315-796e-4d4d-b771-1ee5997e4abf",
    "kyc_status": "approved",
    "rejection_reasons": [],
    "tos_status": "pending",
    "created_at": "2024-12-01T18:46:15.392Z",
    "customer_id": "7d5b9315-796e-4d4d-b771-1ee5997e4abf",
    "persona_inquiry_type": "gov_id_db"
  }
}