APIReference
Create a new payment intent
Creates a payment intent for a transaction
The response will return either a hosted checkout url or a client secret for embedded mode.
Authorization<token>
In: header
method?string
Payment method. Defaults to card.
Default
"card"Value in
"card"typestring
Checkout mode. Hosted returns a redirect url.
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"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
Range
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.io/v1/payments/intents" \ -H "Content-Type: application/json" \ -d '{ "type": "embed", "amount": 50, "currency": "USD" }'{
"ok": true,
"clientSecret": "string"
}Empty