Buy a one-off item; the catalog price is the only price
Buys one unit of a published item for the calling consumer.
/v1/explore/offerings/{offeringId}/purchaseBuys one unit of a published item for the calling consumer. The catalog is the only source of price: no amount is accepted from the client. Since ADR-0035 the purchase is an order of one unit of the item's single variant, so stock is reserved and sold exactly as a cart is, and the response is still the payment. Requires payments:write, an Idempotency-Key and a consumer token (consumer_token_required, 403). Refuses offering_not_found (404), not_an_item (422) for a plan — use subscribe — insufficient_stock (422), insufficient_funds (422), and idempotency_key_reuse (409).
Authorization
bearerAuth A tenant API key (sk_{env}_{id}_{secret}), a wallet user token, or an IdP access token. Which principal the credential resolves to decides the scopes it carries; see the authentication guide.
In: header
Path Parameters
uuidHeader Parameters
1 <= length <= 200Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/v1/explore/offerings/497f6eca-6276-4993-bfeb-53cbbbba6f08/purchase" \ -H "Idempotency-Key: string"{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "status": "requires_capture", "mode": "string", "payer_user_id": "295f0b28-ae85-4d57-93b3-e87e18f208b4", "merchant_id": "500924a8-3f5e-4c00-beb8-2efcde988aea", "amount": 0, "captured_amount": 0, "refunded_amount": 0, "fee": 0, "commission": 0, "hold_expires_at": "2019-08-24T14:15:22Z", "line_items": [ { "name": "string", "amount": 0 } ], "created_at": "2019-08-24T14:15:22Z"}