👨Retrieve Customer

Create a new user

GET https://api.krezypay.com/v1/sandbox/customer/retrieve_customer

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description

customer_id

string

The customer_id of the customer provided during registration

Response


{
    "status": "success",
    "firstname": "Jhon ",
    "lastname": "Doe",
    "email": "[email protected]",
    "phone": "+18493821569",
    "gender": "M",
    "country": "UNITED STATES",
    "id_type": "ID_CARD",
    "id_number": "333",
    "face_id_image": "https://business.krezypay.com/dashboard",
    "front_id_image": "https://business.krezypay.com/dashboard",
    "back_id_image": "https://business.krezypay.com/dashboard",
    "date_enreg": "2024-10-17 14:51:09",
    "user_status": "Activate",
    "mode": "sandbox"
}

See Examples Below

const customerId = '671511168f13e671511168f13f'; // Replace with the actual customer ID
const url = `https://api.krezypay.com/v1/sandbox/customer/retrieve_customer?customer_id=${customerId}`;
const token = 'YOUR_BEARER_TOKEN'; // Replace with your actual bearer token

fetch(url, {
    method: 'GET',
    headers: {
        'Authorization': `Bearer ${token}`,
        'Content-Type': 'application/json'
    }
})
.then(response => {
    if (!response.ok) {
        throw new Error(`HTTP error! Status: ${response.status}`);
    }
    return response.json();
})
.then(data => {
    console.log('Customer data retrieved:', data);
})
.catch(error => {
    console.error('Error fetching customer data:', error);
});

Last updated