Billing
Get purchase
One of your purchases, with its settlement status.
GET
/
v1
/
organization
/
payments
/
{purchase_id}
Get purchase
curl --request GET \
--url https://api.sqwish.ai/v1/organization/payments/{purchase_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sqwish.ai/v1/organization/payments/{purchase_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sqwish.ai/v1/organization/payments/{purchase_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"status": "<string>",
"origin": "manual",
"amount_usd": "<string>",
"tax_usd": "<string>",
"reversed_usd": "<string>",
"checkout_url": "<string>",
"receipt_url": "<string>",
"created_at": 123,
"credited_at": 123,
"expires_at": 123,
"expired_usd": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}Response
Successful Response
Get purchase
curl --request GET \
--url https://api.sqwish.ai/v1/organization/payments/{purchase_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sqwish.ai/v1/organization/payments/{purchase_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sqwish.ai/v1/organization/payments/{purchase_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"status": "<string>",
"origin": "manual",
"amount_usd": "<string>",
"tax_usd": "<string>",
"reversed_usd": "<string>",
"checkout_url": "<string>",
"receipt_url": "<string>",
"created_at": 123,
"credited_at": 123,
"expires_at": 123,
"expired_usd": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}