Create a customer
curl --request POST \
--url https://api.talescria.com/v1/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"name": "<string>",
"email": "[email protected]",
"additionalEmails": [
"[email protected]"
],
"phone": "<string>"
}
'import requests
url = "https://api.talescria.com/v1/customers"
payload = {
"name": "<string>",
"email": "[email protected]",
"additionalEmails": ["[email protected]"],
"phone": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
email: '[email protected]',
additionalEmails: ['[email protected]'],
phone: '<string>'
})
};
fetch('https://api.talescria.com/v1/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"customer": {
"id": "cus_6f1c0d2e9a7b4c55b0d1e2f3a4b5c6d7",
"name": "<string>",
"email": "<string>",
"additionalEmails": [
"<string>"
],
"createdAt": 123,
"updatedAt": 123,
"phone": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"country": "<string>",
"line2": "<string>",
"stateOrProvince": "<string>",
"postalCode": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Customers
Create a customer
Adds someone who pays you. You can invoice them and make payment links for them.
Customers are your own records: nothing is sent to a payment network, so you can add them before your account is verified. Emails are lower-cased.
Requires the customers:write scope.
POST
/
v1
/
customers
Create a customer
curl --request POST \
--url https://api.talescria.com/v1/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"name": "<string>",
"email": "[email protected]",
"additionalEmails": [
"[email protected]"
],
"phone": "<string>"
}
'import requests
url = "https://api.talescria.com/v1/customers"
payload = {
"name": "<string>",
"email": "[email protected]",
"additionalEmails": ["[email protected]"],
"phone": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
email: '[email protected]',
additionalEmails: ['[email protected]'],
phone: '<string>'
})
};
fetch('https://api.talescria.com/v1/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"customer": {
"id": "cus_6f1c0d2e9a7b4c55b0d1e2f3a4b5c6d7",
"name": "<string>",
"email": "<string>",
"additionalEmails": [
"<string>"
],
"createdAt": 123,
"updatedAt": 123,
"phone": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"country": "<string>",
"line2": "<string>",
"stateOrProvince": "<string>",
"postalCode": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Headers
Body
application/json