Skip to content

Payments ​

Connect a payment provider to your store, create payment sessions, or bring your own checkout.

MethodPathDescription
POST/v1/store/payments/connectCreate a payment account for this store
POST/v1/store/payments/sessionCreate an account session for embedded payment components
POST/v1/store/payments/disconnectDisconnect the payment account
POST/v1/store/payments/byoEnable own checkout mode

Create a payment account for this store

POST /v1/store/payments/connect

Provisions a payment account for the store and saves the account ID. Returns 409 if already connected.

Request

curl -X POST https://api.hydrajs.dev/v1/store/payments/connect \
  -H "Authorization: Bearer sk_YOUR_KEY"

Create an account session for embedded payment components

POST /v1/store/payments/session

Creates an account session with embedded component access (onboarding, management, payments, payouts, documents).

Request

curl -X POST https://api.hydrajs.dev/v1/store/payments/session \
  -H "Authorization: Bearer sk_YOUR_KEY"

Disconnect the payment account

POST /v1/store/payments/disconnect

For Connect mode: clears the connected payment account. For BYO mode: resets to Connect mode. Returns the updated store payload.

Request

curl -X POST https://api.hydrajs.dev/v1/store/payments/disconnect \
  -H "Authorization: Bearer sk_YOUR_KEY"

Enable own checkout mode

POST /v1/store/payments/byo

Switches the store to BYO checkout mode. The merchant handles payment collection entirely on their own using the Checkouts API to create checkouts and the confirm endpoint to mark them as paid.

Request

curl -X POST https://api.hydrajs.dev/v1/store/payments/byo \
  -H "Authorization: Bearer sk_YOUR_KEY"