Skip to main content
POST
Create a payment

Authorizations

X-Paywit-Secret-Key
string
header
required

Server-to-server key, sk_test_... on sandbox and sk_live_... on production. Generate it in the dashboard under your app. Never ship it to a browser or mobile app.

Body

application/json
amount
number
required

Amount in USDC.

Example:

5.43

description
string | null

Shown to the buyer on the checkout.

Example:

"Order #18421"

clientReferenceId
string | null

Your own order or invoice id. Echoed back in webhooks so you can match the payment to your records.

Example:

"order_18421"

returnUrl
string<uri> | null

Where the checkout sends the buyer after paying. Must be http or https.

Example:

"https://shop.example/orders/18421"

Response

Payment created.

paymentCheckoutUrl
string<uri>

Send the buyer here.

payment
object