Buy credits with a machine payment
Buy scan credits with the Machine Payments Protocol (MPP). Authenticate with X-Strix-Authorization: Bearer <token> because MPP uses the standard Authorization header for its payment credential. The first request without a payment credential returns HTTP 402 with a payment challenge. Pay the challenge with a Stripe agent wallet (https://link.com/agents), then retry the request with the payment credential. The user approves each payment in the Link app. If the user does not want a wallet, create a hosted checkout link with the billing checkout operation instead. A verified payment grants the credits one time and returns a receipt. Requires the billing:write scope and the admin role.
Authorizations
API token for operations where the standard Authorization header carries a protocol credential. Include as X-Strix-Authorization: Bearer <token>.
Body
Number of credits to purchase.
1 <= x <= 10000Response
Payment verified and credits granted.
Credits granted by this payment. Zero when the payment was already processed.
True when this payment reference was already granted.
Payment reference from the payment receipt.
Credit balance after the grant.