List a Customer's Payment Methods
GET
https://us-central1-appgregator.cloudfunctions.net/stripe/customers/:customerId/payment_methods/
Query Parameters
Name
Type
Description
name*
String
ft-4
connection_name*
String
stripe-1
type*
String
card
Headers
Name
Type
Description
x-api-key*
String
XXX
{
"object": "list",
"data": [
{
"id": "pm_1MYnW2Iyq0PiFIhUQiDmw7kN",
"object": "payment_method",
"billing_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": null,
"name": null,
"phone": null
},
"card": {
"brand": "visa",
"checks": {
"address_line1_check": null,
"address_postal_code_check": null,
"cvc_check": "pass"
},
"country": "US",
"exp_month": 8,
"exp_year": 2023,
"fingerprint": "UDAye2KvD1pcOwWy",
"funding": "credit",
"generated_from": null,
"last4": "4242",
"networks": {
"available": [
"visa"
],
"preferred": null
},
"three_d_secure_usage": {
"supported": true
},
"wallet": null
},
"created": 1675762266,
"customer": "cus_MQqeLuPp19Qbk8",
"livemode": false,
"metadata": {},
"type": "card"
}
],
"has_more": false,
"url": "/v1/customers/cus_MQqeLuPp19Qbk8/payment_methods"
}
curl --location --request GET 'https://us-central1-appgregator.cloudfunctions.net/stripe/customers/cus_MQqeLuPp19Qbk8/payment_methods?name=ft-4&connection_name=stripe-1&type=card' \
--header 'x-api-key: U2FsdGVkX1//ZSY1a5H8680FCQTqF7xceOYQ0BN6sh7yFXbQKAIdQJy50W/nNR59hPI79ukOAPGxsZOa24Z2Cw=='
var axios = require('axios');
var config = {
method: 'get',
url: 'https://us-central1-appgregator.cloudfunctions.net/stripe/customers/cus_MQqeLuPp19Qbk8/payment_methods?name=ft-4&connection_name=stripe-1&type=card',
headers: {
'x-api-key': 'U2FsdGVkX1//ZSY1a5H8680FCQTqF7xceOYQ0BN6sh7yFXbQKAIdQJy50W/nNR59hPI79ukOAPGxsZOa24Z2Cw=='
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://us-central1-appgregator.cloudfunctions.net/stripe/customers/cus_MQqeLuPp19Qbk8/payment_methods?name=ft-4&connection_name=stripe-1&type=card',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'x-api-key: U2FsdGVkX1//ZSY1a5H8680FCQTqF7xceOYQ0BN6sh7yFXbQKAIdQJy50W/nNR59hPI79ukOAPGxsZOa24Z2Cw=='
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Last updated