Get billing account
curl --request GET \
--url https://api.interchange.io/api/v2/billing/account \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.interchange.io/api/v2/billing/account"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.interchange.io/api/v2/billing/account', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"organization": {
"customerId": 0,
"name": "<string>",
"roles": [],
"capabilities": {
"seller": true,
"buyer": true
}
},
"scope": {
"delegatedFrom": 0
},
"standing": {
"creditLimitMinor": "<string>",
"holds": [
{
"id": "<string>",
"type": "PAYMENT_FAILED",
"reason": "<string>",
"createdAt": "<string>"
}
]
},
"plan": {
"tosVersion": "<string>",
"tosAcceptedAt": "<string>",
"tosAcceptedByEmail": "<string>",
"effectiveDate": "<string>",
"endDate": "<string>",
"autoRenewal": true,
"subscriptions": [
"<unknown>"
]
},
"pricing": {
"effective": {
"rates": [
{
"feeRatePercent": 123,
"unitPrice": 123,
"currency": "<string>"
}
]
},
"publicList": {
"rates": [
{
"feeRatePercent": 123,
"unitPrice": 123,
"currency": "<string>"
}
]
}
},
"usage": {
"intelligence": {
"periodStart": "<string>",
"byFeature": [
{
"bucket": "<string>",
"inputTokens": 4503599627370495,
"outputTokens": 4503599627370495,
"cacheCreationInputTokens": 4503599627370495,
"cacheReadInputTokens": 4503599627370495,
"costMicroUsd": 4503599627370495,
"costUsd": 1,
"callCount": 4503599627370495
}
],
"byDay": [
{
"bucket": "<string>",
"inputTokens": 4503599627370495,
"outputTokens": 4503599627370495,
"cacheCreationInputTokens": 4503599627370495,
"cacheReadInputTokens": 4503599627370495,
"costMicroUsd": 4503599627370495,
"costUsd": 1,
"callCount": 4503599627370495
}
],
"totalCostMicroUsd": 4503599627370495
},
"creditBalance": {
"effectiveCustomerId": 0,
"creditLimitMinor": "30000000",
"fundedBalanceMinor": "10000000",
"owedBalanceMinor": "0",
"netBalanceMinor": "-10000000",
"spendableMinor": "40000000",
"accounts": [
{
"code": "customer:42:USD:buyer_funds",
"balanceMinor": "10000000"
}
]
},
"orgPosition": {
"orgRootCustomerId": 0,
"customerCount": 0,
"fundedMinor": "<string>",
"committedMinor": "<string>",
"creditLimitMinor": "<string>",
"availableMinor": "<string>",
"overLimit": true
},
"iuAccount": {
"commitmentMinor": 0,
"perIuOverageMinor": 0,
"rolloverPolicy": {
"capBasisPoints": 5000,
"expiresAfterBillingPeriods": 4503599627370496
},
"cycle": "<string>",
"cycleStart": "<string>",
"cycleEnd": "<string>",
"usedIus": 123,
"buckets": {
"free": {
"granted": 123,
"used": 123,
"remaining": 123
},
"rollover": {
"granted": 123,
"used": 123,
"remaining": 123
},
"included": {
"granted": 123,
"used": 123,
"remaining": 123
},
"overage": {
"ius": 123,
"minor": 0,
"capMinor": 0,
"warnAtMinor": 0,
"overWarnThreshold": true,
"overCap": true
}
},
"forecast": {
"projectedIusThisCycle": 123,
"projectedOverageMinor": 0
},
"ratingTerms": {
"revisionId": "<string>"
}
}
},
"payment": {
"billingInfo": {
"contactName": "<string>",
"email": [
"<string>"
],
"ccEmails": [
"<string>"
],
"phone": "<string>",
"address": "<string>",
"address2": "<string>",
"city": "<string>",
"region": "<string>",
"postalCode": "<string>",
"countryAlpha2": "<string>",
"taxId": "<string>",
"redactedFields": [
"<string>"
]
},
"paymentMethod": {
"kind": "CARD",
"brand": "<string>",
"last4": "<string>",
"expiresMonth": 6,
"expiresYear": 0
},
"cardCollectionEnabled": true,
"storefrontBilling": {
"platformFeePercent": 123,
"currency": "<string>",
"defaultNetDays": 123
},
"creditApplications": [
{
"id": "42",
"customerId": 0,
"customerName": "<string>",
"requestedCreditLimit": 0,
"currency": "<string>",
"justification": "<string>",
"grantedCreditLimit": 0,
"reviewedBy": "<string>",
"reviewerName": "<string>",
"reviewedAt": "2023-11-07T05:31:56Z",
"reviewerNotes": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"deposits": [
{
"id": "<string>",
"amountMinor": "<string>",
"currency": "<string>",
"occurredAt": "<string>",
"provider": "<string>",
"reference": "<string>"
}
],
"invoices": [
"<unknown>"
]
},
"contracts": {
"agreements": [
{
"contractId": "<string>",
"effectiveDate": "<string>",
"endDate": "<string>",
"acceptedAt": "<string>",
"acceptedByEmail": "<string>"
}
],
"documents": [
{
"id": "<string>",
"title": "<string>",
"downloadUrl": "<string>",
"sharepointLink": "<string>",
"gcpLink": "<string>"
}
],
"mediaRateCard": {
"rates": [
{
"feeRatePercent": 123,
"unitPrice": 123,
"currency": "<string>"
}
]
}
},
"accounts": [
{
"customerId": 0,
"name": "<string>",
"company": "<string>",
"periodFees": 123,
"intelligenceUsage": 123
}
],
"totalAccounts": 0,
"nextAction": {
"message": "<string>",
"docsUrl": "<string>",
"route": "<string>",
"taskId": "<string>"
},
"permissions": {
"canAcceptTos": true,
"canEditBillingInfo": true,
"canApplyForCredit": true
}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Buyer Billing
Get billing account
One consolidated view of the organization’s commercial account: plan and terms, effective pricing, intelligence usage, credit/prepay balance, agreements, child accounts, and the single next action (if any) needed to become or remain paid. Org-admin only; child-account requests resolve to the parent organization.
GET
/
billing
/
account
Get billing account
curl --request GET \
--url https://api.interchange.io/api/v2/billing/account \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.interchange.io/api/v2/billing/account"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.interchange.io/api/v2/billing/account', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"organization": {
"customerId": 0,
"name": "<string>",
"roles": [],
"capabilities": {
"seller": true,
"buyer": true
}
},
"scope": {
"delegatedFrom": 0
},
"standing": {
"creditLimitMinor": "<string>",
"holds": [
{
"id": "<string>",
"type": "PAYMENT_FAILED",
"reason": "<string>",
"createdAt": "<string>"
}
]
},
"plan": {
"tosVersion": "<string>",
"tosAcceptedAt": "<string>",
"tosAcceptedByEmail": "<string>",
"effectiveDate": "<string>",
"endDate": "<string>",
"autoRenewal": true,
"subscriptions": [
"<unknown>"
]
},
"pricing": {
"effective": {
"rates": [
{
"feeRatePercent": 123,
"unitPrice": 123,
"currency": "<string>"
}
]
},
"publicList": {
"rates": [
{
"feeRatePercent": 123,
"unitPrice": 123,
"currency": "<string>"
}
]
}
},
"usage": {
"intelligence": {
"periodStart": "<string>",
"byFeature": [
{
"bucket": "<string>",
"inputTokens": 4503599627370495,
"outputTokens": 4503599627370495,
"cacheCreationInputTokens": 4503599627370495,
"cacheReadInputTokens": 4503599627370495,
"costMicroUsd": 4503599627370495,
"costUsd": 1,
"callCount": 4503599627370495
}
],
"byDay": [
{
"bucket": "<string>",
"inputTokens": 4503599627370495,
"outputTokens": 4503599627370495,
"cacheCreationInputTokens": 4503599627370495,
"cacheReadInputTokens": 4503599627370495,
"costMicroUsd": 4503599627370495,
"costUsd": 1,
"callCount": 4503599627370495
}
],
"totalCostMicroUsd": 4503599627370495
},
"creditBalance": {
"effectiveCustomerId": 0,
"creditLimitMinor": "30000000",
"fundedBalanceMinor": "10000000",
"owedBalanceMinor": "0",
"netBalanceMinor": "-10000000",
"spendableMinor": "40000000",
"accounts": [
{
"code": "customer:42:USD:buyer_funds",
"balanceMinor": "10000000"
}
]
},
"orgPosition": {
"orgRootCustomerId": 0,
"customerCount": 0,
"fundedMinor": "<string>",
"committedMinor": "<string>",
"creditLimitMinor": "<string>",
"availableMinor": "<string>",
"overLimit": true
},
"iuAccount": {
"commitmentMinor": 0,
"perIuOverageMinor": 0,
"rolloverPolicy": {
"capBasisPoints": 5000,
"expiresAfterBillingPeriods": 4503599627370496
},
"cycle": "<string>",
"cycleStart": "<string>",
"cycleEnd": "<string>",
"usedIus": 123,
"buckets": {
"free": {
"granted": 123,
"used": 123,
"remaining": 123
},
"rollover": {
"granted": 123,
"used": 123,
"remaining": 123
},
"included": {
"granted": 123,
"used": 123,
"remaining": 123
},
"overage": {
"ius": 123,
"minor": 0,
"capMinor": 0,
"warnAtMinor": 0,
"overWarnThreshold": true,
"overCap": true
}
},
"forecast": {
"projectedIusThisCycle": 123,
"projectedOverageMinor": 0
},
"ratingTerms": {
"revisionId": "<string>"
}
}
},
"payment": {
"billingInfo": {
"contactName": "<string>",
"email": [
"<string>"
],
"ccEmails": [
"<string>"
],
"phone": "<string>",
"address": "<string>",
"address2": "<string>",
"city": "<string>",
"region": "<string>",
"postalCode": "<string>",
"countryAlpha2": "<string>",
"taxId": "<string>",
"redactedFields": [
"<string>"
]
},
"paymentMethod": {
"kind": "CARD",
"brand": "<string>",
"last4": "<string>",
"expiresMonth": 6,
"expiresYear": 0
},
"cardCollectionEnabled": true,
"storefrontBilling": {
"platformFeePercent": 123,
"currency": "<string>",
"defaultNetDays": 123
},
"creditApplications": [
{
"id": "42",
"customerId": 0,
"customerName": "<string>",
"requestedCreditLimit": 0,
"currency": "<string>",
"justification": "<string>",
"grantedCreditLimit": 0,
"reviewedBy": "<string>",
"reviewerName": "<string>",
"reviewedAt": "2023-11-07T05:31:56Z",
"reviewerNotes": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"deposits": [
{
"id": "<string>",
"amountMinor": "<string>",
"currency": "<string>",
"occurredAt": "<string>",
"provider": "<string>",
"reference": "<string>"
}
],
"invoices": [
"<unknown>"
]
},
"contracts": {
"agreements": [
{
"contractId": "<string>",
"effectiveDate": "<string>",
"endDate": "<string>",
"acceptedAt": "<string>",
"acceptedByEmail": "<string>"
}
],
"documents": [
{
"id": "<string>",
"title": "<string>",
"downloadUrl": "<string>",
"sharepointLink": "<string>",
"gcpLink": "<string>"
}
],
"mediaRateCard": {
"rates": [
{
"feeRatePercent": 123,
"unitPrice": 123,
"currency": "<string>"
}
]
}
},
"accounts": [
{
"customerId": 0,
"name": "<string>",
"company": "<string>",
"periodFees": 123,
"intelligenceUsage": 123
}
],
"totalAccounts": 0,
"nextAction": {
"message": "<string>",
"docsUrl": "<string>",
"route": "<string>",
"taskId": "<string>"
},
"permissions": {
"canAcceptTos": true,
"canEditBillingInfo": true,
"canApplyForCredit": true
}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Pre-check content against moderation policyGet the organization IU Rate Card offer and binding state
⌘I