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",
"referenceId": "<string>",
"default": true,
"status": "active",
"source": "api",
"enabled": true,
"name": "Visa (4242)",
"data": [
"<string>"
],
"creationDate": "2024-01-15T10:30:00+00:00",
"expirationDate": "2026-12-31T23:59:59+00:00",
"sepaMandate": {
"id": "ad8f0b9c-0b1a-4e1a-8b0a-0b1a4e1a8b0a",
"status": "active",
"creditorIdentifier": "<string>",
"mandateReference": "MNDT-2021-0001",
"bankAccount": {
"id": "ad8f0b9c-4b1e-4e0e-8b9c-4b1e4e0e8b9c",
"iban": "DE12500105170648489890",
"bic": "PBNKDEFFXXX",
"accountHolder": "Max Mustermann",
"bankName": "Commerzbank"
},
"sequenceType": "FRST",
"sepaType": "core"
},
"card": {
"brand": "Visa",
"last4": "4242",
"expMonth": 12,
"expYear": 2022,
"cardHolder": "Max Mustermann"
},
"sepaDebit": {
"iban": "DE8937*********3232",
"bic": "COBADEFFXXX",
"mandateReference": "MNDT-2021-123456",
"signingDate": "2021-01-01T00:00:00+00:00"
},
"paypal": {
"email": "max@mustermann.de",
"billingAgreementId": "I-1J5gqz2eZvKYlo2C2X2X2X2X"
},
"expirationInDays": 365
}
],
"meta": {
"pagination": {
"totalItems": 123,
"itemsPerPage": 123,
"currentPage": 123,
"lastPage": 123,
"pageTotalItems": 123
}
}
}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",
"referenceId": "<string>",
"default": true,
"status": "active",
"source": "api",
"enabled": true,
"name": "Visa (4242)",
"data": [
"<string>"
],
"creationDate": "2024-01-15T10:30:00+00:00",
"expirationDate": "2026-12-31T23:59:59+00:00",
"sepaMandate": {
"id": "ad8f0b9c-0b1a-4e1a-8b0a-0b1a4e1a8b0a",
"status": "active",
"creditorIdentifier": "<string>",
"mandateReference": "MNDT-2021-0001",
"bankAccount": {
"id": "ad8f0b9c-4b1e-4e0e-8b9c-4b1e4e0e8b9c",
"iban": "DE12500105170648489890",
"bic": "PBNKDEFFXXX",
"accountHolder": "Max Mustermann",
"bankName": "Commerzbank"
},
"sequenceType": "FRST",
"sepaType": "core"
},
"card": {
"brand": "Visa",
"last4": "4242",
"expMonth": 12,
"expYear": 2022,
"cardHolder": "Max Mustermann"
},
"sepaDebit": {
"iban": "DE8937*********3232",
"bic": "COBADEFFXXX",
"mandateReference": "MNDT-2021-123456",
"signingDate": "2021-01-01T00:00:00+00:00"
},
"paypal": {
"email": "max@mustermann.de",
"billingAgreementId": "I-1J5gqz2eZvKYlo2C2X2X2X2X"
},
"expirationInDays": 365
}
],
"meta": {
"pagination": {
"totalItems": 123,
"itemsPerPage": 123,
"currentPage": 123,
"lastPage": 123,
"pageTotalItems": 123
}
}
}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?
⌘I