Checkout/createCnpPaymentIntent
Create Payment Intent
Create the server-side object representing an online payment.
POST
/v1/cnp/payment-intentsCreate a CNP payment intent for Hosted Payment Page, Elements, or Drop-in checkout. Your server creates this object; the browser receives only the client secret required to continue the checkout.
Request body
application/json
merchantIdstringRequiredMerchant identifier.
Example "mch_123"
customerIdstringOptional customer identifier for saved payment methods.
amountMinorintegerRequiredAmount in minor units.
Example 2500
currencyCodestringRequiredISO 4217 currency code.
Example "USD"
setupFutureUsageenumWhether to save for future use.
OFF_SESSIONON_SESSIONdescriptionstringCheckout/order description.
Example "Order #10042"
metadataobjectMerchant metadata.
Response
application/json
idstringPayment intent ID.
statusenumIntent lifecycle state.
REQUIRES_PAYMENT_METHODPROCESSINGSUCCEEDEDDECLINEDclientSecretstringPass to browser checkout; never log or expose outside this checkout.
amountMinorintegerAmount in minor units.
currencyCodestringCurrency.
createCnpPaymentIntent