Skip to main content

Get payment method details

GET/v2/customers/{customerId}/payment-method
API version
v2
Request method
GET
Operation ID
marketplace-customer-get-payment-method

Request​

  • customerIdstringrequired

Responses​

Format
application/json
Description

The payment method details

  • cardDetailsobject
    • brandstringrequired
    • last4stringrequired
Content-Type: application/json

{
"cardDetails": {
"brand": "string",
"last4": "string"
}
}
{
"properties": {
"cardDetails": {
"properties": {
"brand": {
"type": "string"
},
"last4": {
"type": "string"
}
},
"required": [
"brand",
"last4"
],
"type": "object"
}
},
"type": "object"
}

Usage examples​

$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/customers/string/payment-method
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";

const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.marketplace.customerGetPaymentMethod({
"customerId": "string"
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\Marketplace\CustomerGetPaymentMethod\CustomerGetPaymentMethodRequest;

$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));

$request = (new CustomerGetPaymentMethodRequest(
customerId: "string"
));
$response = $client->marketplace()->customerGetPaymentMethod($request);

var_dump($response->getBody();

On this page