Credits

Start or resume a credit purchase

Creates a Stripe checkout session for the amount or the credit pack, or returns the open purchase of the same amount and pack with the terms it was created under. The team, the buyer and the total are decided by the server.

post/teams/{team_slug}/funding/purchases

Request

  • Base URL: https://api.presscart.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.presscart.com/teams/{team_slug}/funding/purchases
  • Auth: HTTP bearer

Path parameters

team_slugstring required
Example:team-a-bb4478bd2e2e

Request body

amountnumber required

Amount to buy, in dollars

profile_idstring uuid required
pack_keystring

The credit pack to buy; the amount must equal its current price

Example request

{
  "amount": 250,
  "pack_key": "matterhorn"
}

Response

The open purchase of the same amount and pack was resumed

idstring uuid required
amountnumber required
status'OPEN' | 'PROCESSING' | 'SETTLED' | 'FAILED' | 'EXPIRED' required
client_secretstring required
payment_expires_atstring nullable required
match_previewnumber required
processing_feenumber required

The fee charged on top of the amount, in dollars

totalnumber required

What the customer pays, amount plus fee, in dollars

Example response

{
  "processing_fee": 7.5,
  "total": 257.5
}

Changes

No recorded changes to this operation across all 3 revisions of this API.