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_d3ed65d5091a8398cc3651bcedec1201' \ -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": "f9291253-ad54-4793-895a-02188afacaa9" }, "data": { "id": "cus_f3d4d8575d30b27aa39230e76fb83a54", "delinquent": false, "discount": null, "name": "Company Customer", "default_payment_method": "", "description": "", "email": "company.customer.162417@example.com", "phone_number": "+14155551236", "invoice_prefix": "", "addresses": [], "payment_methods": { "data": [ { "id": "other_2d1a55ed70548f259f6a488fd81ed96a", "type": "pl_p24_bank", "category": "bank_redirect", "metadata": { "merchant_defined": true }, "image": "https://iconslib.rapyd.net/checkout/pl_p24_bank.png", "webhook_url": "", "supporting_documentation": "", "next_action": "not_applicable", "bic_swift": "", "account_last4": "" } ], "has_more": false, "total_count": 1, "url": "/v1/customers/cus_f3d4d8575d30b27aa39230e76fb83a54/payment_methods" }, "subscriptions": null, "created_at": 1753881859, "metadata": { "merchant_defined": true }, "business_vat_id": "", "ewallet": "ewallet_b5320c566cc4aa01fe77440ad08693f7", "occupation": "", "birth_country": "", "date_of_birth": "", "nationality": "" } }