Migrate stripe payment methods
curl --request POST \
--url https://coreapi.io/payment-methods/migrate/stripe \
--header 'Authorization: Bearer <token>'import requests
url = "https://coreapi.io/payment-methods/migrate/stripe"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coreapi.io/payment-methods/migrate/stripe', 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/payment-methods/migrate/stripe",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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;
}[
{
"migrated": {
"customer_id": "ad8f7a8d-7a8d-7a8d-7a8d-7a8d7a8d7a8d",
"customer_name": "Max Mustermann",
"customer_number": "123456",
"customer_email": "max@mustermann.de",
"payment_method_id": "pm_1J5gqz2eZvKYlo2C2X2X2X2X",
"payment_method_type": "card",
"payment_method_name": "Visa (4242)"
},
"skipped": {
"reason": "already_exists",
"customer_id": "ad8f7a8d-7a8d-7a8d-7a8d-7a8d7a8d7a8d",
"customer_name": "Max Mustermann",
"customer_number": "123456",
"customer_email": "max@mustermann.de",
"payment_method_id": "pm_1J5gqz2eZvKYlo2C2X2X2X2X",
"payment_method_type": "card",
"payment_method_name": "Visa (4242)"
}
}
]Payment Method
Migrate stripe payment methods
Assigns stripe customer ids to fynn customers, which are matched by email. After that, all not expired and attached payment methods will be created in fynn.
Required permissions:payment-method:migratePOST
/
payment-methods
/
migrate
/
stripe
Migrate stripe payment methods
curl --request POST \
--url https://coreapi.io/payment-methods/migrate/stripe \
--header 'Authorization: Bearer <token>'import requests
url = "https://coreapi.io/payment-methods/migrate/stripe"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coreapi.io/payment-methods/migrate/stripe', 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/payment-methods/migrate/stripe",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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;
}[
{
"migrated": {
"customer_id": "ad8f7a8d-7a8d-7a8d-7a8d-7a8d7a8d7a8d",
"customer_name": "Max Mustermann",
"customer_number": "123456",
"customer_email": "max@mustermann.de",
"payment_method_id": "pm_1J5gqz2eZvKYlo2C2X2X2X2X",
"payment_method_type": "card",
"payment_method_name": "Visa (4242)"
},
"skipped": {
"reason": "already_exists",
"customer_id": "ad8f7a8d-7a8d-7a8d-7a8d-7a8d7a8d7a8d",
"customer_name": "Max Mustermann",
"customer_number": "123456",
"customer_email": "max@mustermann.de",
"payment_method_id": "pm_1J5gqz2eZvKYlo2C2X2X2X2X",
"payment_method_type": "card",
"payment_method_name": "Visa (4242)"
}
}
]War diese Seite hilfreich?