Storrik LogoStorrik Docs
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.

POST
/v1/payments/intents
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).

Range50 <= value
currencystring

currency used on the payment.

Value in"USD" | "EUR" | "GBP" | "AUD" | "CYN"
country?string

Optional ISO country code. Auto determined if missing.

Length2 <= length <= 2
email?string
Formatemail
receipt_email?string
Formatemail
productId?string
variantId?string
customerId?string
quantity?integer
Range1 <= value
description?string
coupon?string
collect_billing?boolean
Defaultfalse
collect_shipping?boolean
Defaultfalse
metadata?object

Empty Object

success_url?string
Formaturi
cancel_url?string
Formaturi

Response 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