Skip to main content
POST
/
checkout
/
create-payment-intent
Create Payment Intent
curl --request POST \
  --url https://api.nuwebgroup.com/v1/checkout/create-payment-intent \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "basketId": 1,
  "uuid": "UUID123",
  "cardPresent": false,
  "interacPresent": false
}
'
{
  "publishableKey": "somePublishableKey",
  "clientSecret": "someClientSecret",
  "paymentIntentId": "somePaymentIntentId",
  "connectedStripeAccountId": "someConnectedStripeAccountId",
  "transactionId": "123"
}

Authorizations

Authorization
string
header
required

The 'Bearer' token can be obtained from the token management interface or via the login endpoint using your admin user credentials.

Body

application/json

Request body creating a payment intent.

basketId
integer

The ID of the basket. Basket IDs and Order IDs can be used interchangeably.

uuid
string

Optional idempotency key.

cardPresent
boolean

Accept in-person card payments.

interacPresent
boolean

Accept Interac cards (CA only). Card present is automatically true if this is true.

paymentSplits
object[]

Breakdown of payments when using the 'split' payment method. The sum of all splits must equal the order total.

paymentPlan
object

A payment plan object. This is currently only applicable for the processing of deposit payments.

Example:
{ "type": "deposit" }

Response

Successfully created payment intent.

paymentGateway
string

The identifier for the payment gateway. Accepted values: 'stripe'. Default: 'stripe'

publishableKey
string
clientSecret
string
paymentIntentId
string
connectedStripeAccountId
string
transactionId
string

The transaction ID from our database. This must be forwarded to the complete order endpoint if this payment intent is captured successfully to ensure accurate reporting and the possibility of performing refunds. This is also a mandatory requirement for processing split payments.