Retrieve Customer
Retrieve details of a customer profile.
Code Samples
.NET
using System; namespace RapydApiRequestSample { class Program { static void Main(string[] args) { try { string customerId = "cus_d3ed65d5091a8398cc3651bcedec1201"; string result = RapydApiRequestSample.Utilities.MakeRequest("GET", $"/v1/customers/{customerId}"); Console.WriteLine(result); } catch (Exception e) { Console.WriteLine("Error completing request: " + e.Message); } } } }
JavaScript
const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest; async function main() { try { const result = await makeRequest('GET', '/v1/customers/cus_d3ed65d5091a8398cc3651bcedec1201'); console.log(result); } catch (error) { console.error('Error completing request', error); } }
PHP
<?php $path = $_SERVER['DOCUMENT_ROOT']; $path .= "/<path-to-your-utility-file>/utilities.php"; include($path); try { $object = make_request('get', "/v1/customers/cus_d3ed65d5091a8398cc3651bcedec1201"); var_dump($object); } catch (Exception $e) { echo "Error: $e"; } ?>
Python
from pprint import pprint from utilities import make_request result = make_request(method='get', path='/v1/customers/cus_d3ed65d5091a8398cc3651bcedec1201') pprint(result)
/v1/customers/:customer
Retrieve Customer
curl -X get 'https://sandboxapi.rapyd.net/v1/customers/cus_4e25112ac20e144ad073a614dc46934b' \ -H 'access_key: your-access-key-here' \ -H 'Content-Type: application/json' \ -H 'salt: your-random-string-here' \ -H 'signature: your-calculated-signature-here' \ -H 'timestamp: your-unix-timestamp-here'
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "1a3a7d95-61bc-4b8c-9741-8759fb25234b" }, "data": { "id": "cus_4e25112ac20e144ad073a614dc46934b", "delinquent": false, "discount": null, "name": "John Doe", "default_payment_method": "", "description": "", "email": "", "phone_number": "", "invoice_prefix": "", "addresses": [], "payment_methods": { "data": [ { "id": "other_330f2c3586e670b72aab45f5c12195c0", "type": "in_jiomoney_ewallet", "category": "ewallet_redirect", "metadata": {}, "image": "https://iconslib.rapyd.net/checkout/in_jiomoney_ewallet.png", "webhook_url": "", "supporting_documentation": "", "next_action": "not_applicable" }, { "id": "other_9a1fa177940e16c09f161cfa55ec108a", "type": "sg_grabpay_ewallet", "category": "ewallet", "metadata": {}, "image": "https://iconslib.rapyd.net/checkout/sg_grabpay_ewallet.png", "webhook_url": "", "supporting_documentation": "", "next_action": "not_applicable", "bic_swift": "", "account_last4": "" }, { "id": "other_0bfa8ede2535263dab8da20a384d5c2f", "type": "pe_banco_ripley_cash", "category": "cash", "metadata": {}, "image": "https://iconslib.rapyd.net/checkout/pe_banco_ripley_cash.png", "webhook_url": "", "supporting_documentation": "", "next_action": "not_applicable" } ], "has_more": true, "total_count": 10, "url": "/v1/customers/cus_4e25112ac20e144ad073a614dc46934b/payment_methods" }, "subscriptions": null, "created_at": 1755769161, "metadata": {}, "business_vat_id": "", "ewallet": "", "occupation": "", "birth_country": "", "date_of_birth": "", "nationality": "" } }