Get purchase
Gets one of an organization's purchases of credits.
Gets one of an organization's purchases of credits.
bearerAuthorizationBearer <token>An access token, or an API key.
organization*stringThe organization's ID.
^org_[0-7][0-9a-hjkmnp-tv-z]{25}$purchase*stringThe purchase's ID.
^pur_[0-7][0-9a-hjkmnp-tv-z]{25}$OK
application/json- response
amount*The credits it buys, before any tax; once paid, what Stripe charged.
checkoutUri*stringStripe's page to pay at, while it is open.
createTime*stringWhen it was started.
date-timecreditGrant*stringThe credits it bought, organizations/{organization_id}/creditGrants/{credit_grant_id}, once paid.
expireTime?stringWhen the checkout stops taking a payment, while it is open.
date-timefailure*stringWhy the card's bank declined it, once failed.
invoiceUri*stringThe invoice that Stripe hosts for it, once paid and Stripe has finalized it.
kind*stringHow it is paid for: CHECKOUT, in Stripe Checkout, by whoever started it; AUTO_RELOAD, by auto-reload, with the saved card.
"CHECKOUT""AUTO_RELOAD"name*stringResource name, organizations/{organization_id}/purchases/{purchase_id}.
receiptUri*stringStripe's receipt for an auto-reload, once paid.
state*stringWhere it stands: OPEN, waiting to be paid at checkoutUri; PAID, and its credits granted; EXPIRED, the checkout ended without a payment; FAILED, the card's bank declined an auto-reload; DISPUTED, paid, then disputed, and what was left of its credits taken back.
"OPEN""PAID""EXPIRED""FAILED""DISPUTED"updateTime*stringWhen it last changed, such as when it was paid.
date-timecurl -X GET 'https://api.kosem.ai/v1/organizations/string/purchases/string'{
"amount": {
"currencyCode": "string",
"nanos": -999999999,
"units": 0
},
"checkoutUri": "string",
"createTime": "2019-08-24T14:15:22Z",
"creditGrant": "string",
"expireTime": "2019-08-24T14:15:22Z",
"failure": "string",
"invoiceUri": "string",
"kind": "CHECKOUT",
"name": "string",
"receiptUri": "string",
"state": "OPEN",
"updateTime": "2019-08-24T14:15:22Z"
}