APIReference
Create a new payment intent
Creates a payment intent for a product or fixed amount.
Default behavior:
- If
typeis not provided, it defaults tohostedand returns a hosted checkout url. - If
typeisembed, it returns a client secret for embedded flows.
Authorization<token>
Use Authorization: Bearer sk_...
In: header
method?string
Payment method. Defaults to card.
Default
"card"Value in
"card"type?string
Checkout mode. Defaults to hosted.
Default
"hosted"Value in
"embed" | "hosted"amountinteger
Amount in the smallest currency unit (cents).
Range
50 <= valuecurrencystring
Currency used on the payment.
Value in
"USD" | "EUR" | "GBP" | "AUD" | "CYN" | "CAD"country?string
Optional ISO country code. Auto determined if missing.
Length
2 <= length <= 2email?string
Format
emailreceipt_email?string
Format
emailproductId?string
variantId?string
customerId?string
quantity?integer
Default
1Range
1 <= valuedescription?string
coupon?string
collect_billing?boolean
Default
falsecollect_shipping?boolean
Default
falsemetadata?object
Empty Object
success_url?string
Format
uricancel_url?string
Format
uriResponse Body
curl -X POST "https://api.storrik.com/v1/payments/intents" \ -H "Content-Type: application/json" \ -d '{ "amount": 50, "currency": "USD" }'{
"ok": true,
"clientSecret": "string",
"pk": "string"
}Empty
Empty
Empty