cURL
curl -X GET \
/customers/{customerId}/payment-methods \
--header "Authorization: Bearer <token>"import requests
url = "https://coreapi.io/customers/{customerId}/payment-methods"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coreapi.io/customers/{customerId}/payment-methods', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/customers/{customerId}/payment-methods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"id": "c1a2b3c4-d5e6-4f7a-8b9b-0c1d2e3f4a5b",
"customer": "ad8f3b9e-1b1a-4b9a-9b9a-9b9a9b9a9b9a",
"gatewayName": "stripe",
"type": "card",
"referenceId": "pm_1J5J2n2eZvKYlo2C",
"default": true,
"status": "active",
"source": "api",
"enabled": true,
"name": "Visa (4242)",
"data": [],
"creationDate": "2024-01-15T10:30:00+00:00",
"expirationDate": "2026-12-31T23:59:59+00:00",
"expirationInDays": 1082,
"sepaMandate": null,
"card": {
"brand": "Visa",
"last4": "4242",
"expMonth": 12,
"expYear": 2026,
"cardHolder": "Max Mustermann"
},
"sepaDebit": null,
"paypal": null
},
{
"id": "e2f3a4b5-c6d7-4e8f-9a0b-1c2d3e4f5a6b",
"customer": "ad8f3b9e-1b1a-4b9a-9b9a-9b9a9b9a9b9a",
"gatewayName": "sepa_debit",
"type": "sepa_debit",
"referenceId": null,
"default": false,
"status": "active",
"source": "api",
"enabled": true,
"name": "SEPA (DE89...3000)",
"data": [],
"creationDate": "2024-02-20T14:00:00+00:00",
"expirationDate": null,
"expirationInDays": null,
"sepaMandate": {
"id": "ad8f0b9c-0b1a-4e1a-8b0a-0b1a4e1a8b0a",
"status": "active",
"creditorIdentifier": "DE98ZZZ09999999999",
"mandateReference": "MNDT-2024-000001",
"signatureDate": "2024-02-20",
"sequenceType": "RCUR",
"sepaType": "CORE"
},
"card": null,
"sepaDebit": {
"iban": "DE8937*********3000",
"bic": "COBADEFFXXX",
"mandateReference": "MNDT-2024-000001",
"signingDate": "2024-02-20T00:00:00+00:00"
},
"paypal": null
}
],
"meta": {
"totalItems": 2,
"itemsPerPage": 30,
"currentPage": 1
}
}Payment Method
Get customer's payment methods
Get customer’s payment methods.
Required permissions:payment-method:read, customer:payment-method:readGET
/
customers
/
{customerId}
/
payment-methods
cURL
curl -X GET \
/customers/{customerId}/payment-methods \
--header "Authorization: Bearer <token>"import requests
url = "https://coreapi.io/customers/{customerId}/payment-methods"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coreapi.io/customers/{customerId}/payment-methods', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/customers/{customerId}/payment-methods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"id": "c1a2b3c4-d5e6-4f7a-8b9b-0c1d2e3f4a5b",
"customer": "ad8f3b9e-1b1a-4b9a-9b9a-9b9a9b9a9b9a",
"gatewayName": "stripe",
"type": "card",
"referenceId": "pm_1J5J2n2eZvKYlo2C",
"default": true,
"status": "active",
"source": "api",
"enabled": true,
"name": "Visa (4242)",
"data": [],
"creationDate": "2024-01-15T10:30:00+00:00",
"expirationDate": "2026-12-31T23:59:59+00:00",
"expirationInDays": 1082,
"sepaMandate": null,
"card": {
"brand": "Visa",
"last4": "4242",
"expMonth": 12,
"expYear": 2026,
"cardHolder": "Max Mustermann"
},
"sepaDebit": null,
"paypal": null
},
{
"id": "e2f3a4b5-c6d7-4e8f-9a0b-1c2d3e4f5a6b",
"customer": "ad8f3b9e-1b1a-4b9a-9b9a-9b9a9b9a9b9a",
"gatewayName": "sepa_debit",
"type": "sepa_debit",
"referenceId": null,
"default": false,
"status": "active",
"source": "api",
"enabled": true,
"name": "SEPA (DE89...3000)",
"data": [],
"creationDate": "2024-02-20T14:00:00+00:00",
"expirationDate": null,
"expirationInDays": null,
"sepaMandate": {
"id": "ad8f0b9c-0b1a-4e1a-8b0a-0b1a4e1a8b0a",
"status": "active",
"creditorIdentifier": "DE98ZZZ09999999999",
"mandateReference": "MNDT-2024-000001",
"signatureDate": "2024-02-20",
"sequenceType": "RCUR",
"sepaType": "CORE"
},
"card": null,
"sepaDebit": {
"iban": "DE8937*********3000",
"bic": "COBADEFFXXX",
"mandateReference": "MNDT-2024-000001",
"signingDate": "2024-02-20T00:00:00+00:00"
},
"paypal": null
}
],
"meta": {
"totalItems": 2,
"itemsPerPage": 30,
"currentPage": 1
}
}Autorisierungen
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Pfadparameter
PaymentMethod identifier
Abfrageparameter
The collection page number
The number of items per page
Erforderlicher Bereich:
0 <= x <= 100War diese Seite hilfreich?