Skip to main content

Get the link to update the marketplace payment method

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

Request​

  • customerIdstringrequired

Responses​

Format
application/json
Description

The generated link to the Stripe payment method setup

  • urlstring
Content-Type: application/json

{
"url": "string"
}
{
"properties": {
"url": {
"type": "string"
}
},
"type": "object"
}

Usage examples​

$ curl \
--fail \
--location \
-X PUT \
-d '{"customReturnUrl":"https://mittwald.studio/app/marketplace"}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
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.customerUpdatePaymentMethod({
"customerId": "string",
"data": {
"customReturnUrl": "https://mittwald.studio/app/marketplace"
}
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\Marketplace\CustomerUpdatePaymentMethod\CustomerUpdatePaymentMethodRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Marketplace\CustomerUpdatePaymentMethod\CustomerUpdatePaymentMethodRequestBody;

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

// TODO: Please consult the properties and constructor signature of
// CustomerUpdatePaymentMethodRequestBody to learn how to construct a valid instance
$body = new CustomerUpdatePaymentMethodRequestBody(/* TODO: ... */);

$request = (new CustomerUpdatePaymentMethodRequest(
customerId: "string",
body: $body
));
$response = $client->marketplace()->customerUpdatePaymentMethod($request);

var_dump($response->getBody();

On this page