Create a payment link
curl --request POST \
--url https://api.talescria.com/v1/payment-links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"accountId": "<string>",
"minorUnits": "<string>",
"description": "<string>",
"expiresAt": 123,
"customerId": "<string>"
}
'import requests
url = "https://api.talescria.com/v1/payment-links"
payload = {
"accountId": "<string>",
"minorUnits": "<string>",
"description": "<string>",
"expiresAt": 123,
"customerId": "<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({
accountId: '<string>',
minorUnits: '<string>',
description: '<string>',
expiresAt: 123,
customerId: '<string>'
})
};
fetch('https://api.talescria.com/v1/payment-links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"paymentLink": {
"id": "<string>",
"url": "<string>",
"amount": {
"minorUnits": "125000",
"currency": "USD"
},
"usage": "single",
"status": "active",
"paymentsCompleted": 123,
"paymentInProgress": true,
"createdAt": 123,
"country": "<string>",
"description": "<string>",
"expiresAt": 123,
"accountId": "<string>",
"customer": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"deleted": true
},
"lastPaidAt": 123
}
}{
"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>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Payment links
Create a payment link
Makes a link anyone can open to pay you by card, into one of your accounts. Share the returned url.
usage: singlecloses after one successful payment.reusabletakes payments until it expires or you archive it.- The account must be yours and in the link’s currency. Links take USD, GBP and EUR.
customerIdrecords who the link is for. It is never shown to the payer.
Requires the payment_links:write scope.
POST
/
v1
/
payment-links
Create a payment link
curl --request POST \
--url https://api.talescria.com/v1/payment-links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"accountId": "<string>",
"minorUnits": "<string>",
"description": "<string>",
"expiresAt": 123,
"customerId": "<string>"
}
'import requests
url = "https://api.talescria.com/v1/payment-links"
payload = {
"accountId": "<string>",
"minorUnits": "<string>",
"description": "<string>",
"expiresAt": 123,
"customerId": "<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({
accountId: '<string>',
minorUnits: '<string>',
description: '<string>',
expiresAt: 123,
customerId: '<string>'
})
};
fetch('https://api.talescria.com/v1/payment-links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"paymentLink": {
"id": "<string>",
"url": "<string>",
"amount": {
"minorUnits": "125000",
"currency": "USD"
},
"usage": "single",
"status": "active",
"paymentsCompleted": 123,
"paymentInProgress": true,
"createdAt": 123,
"country": "<string>",
"description": "<string>",
"expiresAt": 123,
"accountId": "<string>",
"customer": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"deleted": true
},
"lastPaidAt": 123
}
}{
"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>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Headers
Body
application/json