Created by rossmccrann 212 days ago Viewed 57 times 1 Point
Create a customer. [See the docs (https://stripe.com/docs/api/customers/create) for more information
No comments yet
export async function main(stripe_con: wmill.Resource<"stripe">) {
const STRIPE_CREATE_CUSTOMER_URL = `https://api.stripe.com/v1/customers`;
const token = stripe_con["token"];
const response = await fetch(STRIPE_CREATE_CUSTOMER_URL, {
method: "POST",
headers: {
Authorization: "Bearer " + token,
"Content-Type": "application/json",
},
});
return await response.json();
}
No comments yet