Payments: Confirm
POST/payments/{payment_id}/confirm
Confirms a payment intent that was previously created with confirm: false. This action attempts to authorize the payment with the payment processor.
Expected status transitions after confirmation:
succeeded: If authorization is successful andcapture_methodisautomatic.requires_capture: If authorization is successful andcapture_methodismanual.failed: If authorization fails.
Path parameters
payment_idstringrequiredThe identifier for payment
Request body PaymentsConfirmRequest (object)
amountinteger, nullableThe primary amount for the payment, provided in the lowest denomination of the specified currency (e.g., 6540 for $65.40 USD). This field is mandatory for creating a payment.
order_tax_amountinteger, nullableTotal tax amount applicable to the order, in the lowest denomination of the currency.
currencystring (enum), nullableThe three-letter ISO 4217 currency code (e.g., "USD", "EUR") for the payment amount. This field is mandatory for creating a payment.
Possible values:
AED,AFN,ALL,AMD,ANG,AOA,ARS,AUD,AWG,AZN,BAM,BBDand 148 moreamount_to_captureinteger, nullableThe amount to be captured from the user's payment method, in the lowest denomination. If not provided, and
capture_methodisautomatic, the full paymentamountwill be captured. Ifcapture_methodismanual, this can be specified in the/capturecall. Must be less than or equal to the authorized amount.shipping_costinteger, nullableThe shipping cost for the payment. This is required for tax calculation in some regions.
payment_idstring, nullableOptional. A merchant-provided unique identifier for the payment, contains 30 characters long (e.g., "pay_mbabizu24mvu3mela5njyhpit4"). If provided, it ensures idempotency for the payment creation request. If omitted, Cardencer generates a unique ID for the payment.
capture_methodstring (enum), nullableSpecifies how the payment is captured.
automatic: Funds are captured immediately after successful authorization. This is the default behavior if the field is omitted.manual: Funds are authorized but not captured. A separate request to the/payments/{payment_id}/captureendpoint is required to capture the funds.
Possible values:
automatic,manual,manual_multiple,scheduled,sequential_automaticauthentication_typestring (enum), nullableSpecifies the type of cardholder authentication to be applied for a payment.
ThreeDs: Requests 3D Secure (3DS) authentication. If the card is enrolled, 3DS authentication will be activated, potentially shifting chargeback liability to the issuer.NoThreeDs: Indicates that 3D Secure authentication should not be performed. The liability for chargebacks typically remains with the merchant. This is often the default if not specified.
Note: The actual authentication behavior can also be influenced by merchant configuration and specific processor defaults. Some processors might still enforce 3DS or bypass it regardless of this parameter.
Possible values:
three_ds,no_three_dsbillingAddress (object), nullableShow 3 child attributes
addressAddressDetails (object), nullableAddress details
phonePhoneDetails (object), nullableemailstring, nullable
confirmboolean, nullableIf set to
true, Cardencer attempts to confirm and authorize the payment immediately after creation, provided sufficient payment method details are included. Iffalseor omitted (default isfalse), the payment is created with a status such asrequires_payment_methodorrequires_confirmation, and a separatePOST /payments/{payment_id}/confirmcall is necessary to proceed with authorization.customerCustomerDetails (object), nullablePassing this object creates a new customer or attaches an existing customer to the payment
Show 7 child attributes
idstring, nullableThe identifier for the customer.
namestring, nullableThe customer's name
emailstring, nullableThe customer's email address
phonestring, nullableThe customer's phone number
phone_country_codestring, nullableThe country code for the customer's phone number
tax_registration_idstring, nullableThe tax registration identifier of the customer.
document_detailsCustomerDocumentDetails (object), nullable
customer_idstring, nullableThe identifier for the customer
off_sessionboolean, nullableSet to true to indicate that the customer is not in your checkout flow during this payment, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and charge them later. When making a recurring payment by passing a mandate_id, this parameter is mandatory
descriptionstring, nullableAn arbitrary string attached to the payment. Often useful for displaying to users or for your own internal record-keeping.
return_urlstring, nullableThe URL to redirect the customer to after they complete the payment process or authentication. This is crucial for flows that involve off-site redirection (e.g., 3DS, some bank redirects, wallet payments).
setup_future_usagestring (enum), nullableSpecifies how the payment method can be used for future payments.
off_session: The payment method can be used for future payments when the customer is not present.on_session: The payment method is intended for use only when the customer is present during checkout. If omitted, defaults toon_session.
Possible values:
off_session,on_sessionpayment_method_dataPaymentMethodDataRequest, nullableThe payment method information provided for making a payment
Show 1 child attributes
billingAddress (object), nullable
payment_methodstring (enum), nullableIndicates the type of payment method. Eg: 'card', 'wallet', etc.
Possible values:
card,card_redirect,pay_later,wallet,bank_redirect,bank_transfer,crypto,bank_debit,reward,real_time_payment,upi,voucherand 4 morepayment_tokenstring, nullableAs Cardencer tokenises the sensitive details about the payments method, it provides the payment_token as a reference to a stored payment method, ensuring that the sensitive details are not exposed in any manner.
shippingAddress (object), nullableShow 3 child attributes
addressAddressDetails (object), nullableAddress details
phonePhoneDetails (object), nullableemailstring, nullable
statement_descriptor_namestring, nullableFor non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. To be deprecated soon, use billing_descriptor instead.
statement_descriptor_suffixstring, nullableProvides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. To be deprecated soon, use billing_descriptor instead.
order_detailsarray of OrderDetailsWithAmount (object), nullableUse this object to capture the details about the different products for which the payment is being made. The sum of amount across different products here should be equal to the overall payment amount
Show 20 child attributes
product_namestringrequiredName of the product that is being purchased
quantityintegerrequiredThe quantity of the product to be purchased
amountintegerrequiredthe amount per quantity of product
tax_ratenumber, nullabletax rate applicable to the product
total_tax_amountinteger, nullabletotal tax amount applicable to the product
requires_shippingboolean, nullableproduct_img_linkstring, nullableThe image URL of the product
product_idstring, nullableID of the product that is being purchased
categorystring, nullableCategory of the product that is being purchased
sub_categorystring, nullableSub category of the product that is being purchased
brandstring, nullableBrand of the product that is being purchased
product_typestring (enum), nullablePossible values:
physical,digital,travel,ride,event,accommodationproduct_tax_codestring, nullableThe tax code for the product
descriptionstring, nullableDescription for the item
skustring, nullableStock Keeping Unit (SKU) or the item identifier for this item.
upcstring, nullableUniversal Product Code for the item.
commodity_codestring, nullableCode describing a commodity or a group of commodities pertaining to goods classification.
unit_of_measurestring, nullableUnit of measure used for the item quantity.
total_amountinteger, nullableTotal amount for the item.
unit_discount_amountinteger, nullableDiscount amount applied to this item.
client_secretstring, nullableIt's a token used for client side verification.
mandate_dataMandateData (object), nullablePassing this object during payments creates a mandate. The mandate_type sub object is passed by the server.
Show 3 child attributes
update_mandate_idstring, nullableA way to update the mandate's payment method details
customer_acceptanceCustomerAcceptance (object), nullableThis "CustomerAcceptance" object is passed during Payments-Confirm request, it enlists the type, time, and mode of acceptance properties related to an acceptance done by the customer. The customer_acceptance sub object is usually passed by the SDK or client.
mandate_typeMandateType (one of object | object), nullable
customer_acceptanceCustomerAcceptance (object), nullableThis "CustomerAcceptance" object is passed during Payments-Confirm request, it enlists the type, time, and mode of acceptance properties related to an acceptance done by the customer. The customer_acceptance sub object is usually passed by the SDK or client.
Show 3 child attributes
acceptance_typestring (enum)requiredThis is used to indicate if the mandate was accepted online or offline
Possible values:
online,offlineaccepted_atstring, nullableSpecifying when the customer acceptance was provided
onlineOnlineMandate (object), nullableDetails of online mandate
mandate_idstring, nullableA unique identifier to link the payment to a mandate. To do Recurring payments after a mandate has been created, pass the mandate_id instead of payment_method_data
browser_infoBrowserInformation (object), nullableBrowser information to be used for 3DS 2.0
Show 15 child attributes
color_depthinteger, nullableColor depth supported by the browser
java_enabledboolean, nullableWhether java is enabled in the browser
java_script_enabledboolean, nullableWhether javascript is enabled in the browser
languagestring, nullableLanguage supported
screen_heightinteger, nullableThe screen height in pixels
screen_widthinteger, nullableThe screen width in pixels
time_zoneinteger, nullableTime zone of the client
ip_addressstring, nullableIp address of the client
accept_headerstring, nullableList of headers that are accepted
user_agentstring, nullableUser-agent of the browser
os_typestring, nullableThe os type of the client device
os_versionstring, nullableThe os version of the client device
device_modelstring, nullableThe device model of the client
accept_languagestring, nullableAccept-language of the browser
refererstring, nullableIdentifier of the source that initiated the request.
payment_experiencestring (enum), nullableTo indicate the type of payment experience that the customer would go through
Possible values:
redirect_to_url,invoke_sdk_client,display_qr_code,one_click,link_wallet,invoke_payment_app,display_wait_screen,collect_otppayment_method_typestring (enum), nullableIndicates the sub type of payment method. Eg: 'google_pay' & 'apple_pay' for wallets.
Possible values:
ach,affirm,afterpay_clearpay,alfamart,ali_pay,ali_pay_hk,alma,amazon_pay,paysera,apple_pay,atome,bacsand 105 moreallowed_payment_method_typesarray of string (enum), nullableUse this parameter to restrict the Payment Method Types to show for a given PaymentIntent
retry_actionstring (enum), nullableDenotes the retry action
Possible values:
manual_retry,requeuemetadataobject, nullableYou can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.
payment_linkboolean, nullableWhether to generate the payment link for this payment or not (if applicable)
payment_link_configPaymentCreatePaymentLinkConfig, nullableConfigure a custom payment link for the particular payment
Show 26 child attributes
themestring, nullablecustom theme for the payment link
logostring, nullablemerchant display logo
seller_namestring, nullableCustom merchant name for payment link
sdk_layoutstring, nullableCustom layout for sdk
display_sdk_onlyboolean, nullableDisplay only the sdk for payment link
enabled_saved_payment_methodboolean, nullableEnable saved payment method option for payment link
hide_card_nickname_fieldboolean, nullableHide card nickname field option for payment link
show_card_form_by_defaultboolean, nullableShow card form by default for payment link
transaction_detailsarray of PaymentLinkTransactionDetails (object), nullableDynamic details related to merchant to be rendered in payment link
background_imagePaymentLinkBackgroundImageConfig (object), nullabledetails_layoutstring (enum), nullablePossible values:
layout1,layout2payment_button_textstring, nullableText for payment link's handle confirm button
custom_message_for_card_termsstring, nullableText for customizing message for card terms
custom_message_for_payment_method_typesarray of PaymentMethodConfig (object), nullableList of custom T&C messages grouped by payment method
payment_button_colourstring, nullableCustom background colour for payment link's handle confirm button
skip_status_screenboolean, nullableSkip the status screen after payment completion
payment_button_text_colourstring, nullableCustom text colour for payment link's handle confirm button
background_colourstring, nullableCustom background colour for the payment link
sdk_ui_rulesobject, nullableSDK configuration rules
payment_link_ui_rulesobject, nullablePayment link configuration rules
enable_button_only_on_form_readyboolean, nullableFlag to enable the button only when the payment form is ready for submission
payment_form_header_textstring, nullableOptional header for the SDK's payment form
payment_form_label_typestring (enum), nullablePossible values:
above,floating,nevershow_card_termsstring (enum), nullablePossible values:
always,auto,neveris_setup_mandate_flowboolean, nullableBoolean to control payment button text for setup mandate calls
color_icon_card_cvc_errorstring, nullableHex color for the CVC icon during error state
payment_link_config_idstring, nullableCustom payment link config id set at business profile, send only if business_specific_configs is configured
payment_typestring (enum), nullableThe type of the payment that differentiates between normal and various types of mandate payments. Use 'setup_mandate' in case of zero auth flow.
Possible values:
normal,new_mandate,setup_mandate,recurring_mandate,installmentrequest_incremental_authorizationboolean, nullableRequest an incremental authorization, i.e., increase the authorized amount on a confirmed payment before you capture it.
session_expiryinteger, nullableWill be used to expire client secret after certain amount of time to be supplied in seconds (900) for 15 mins
request_external_three_ds_authenticationboolean, nullableWhether to perform external authentication (if applicable)
three_ds_dataExternalThreeDsData (object), nullableShow 5 child attributes
authentication_cryptogramCryptogram (one of object), nullableRepresents the 3DS cryptogram data returned after authentication.
ds_trans_idstring, nullableDirectory Server Transaction ID generated during the 3DS process.
versionstring, nullableThe version of the 3DS protocol used (e.g., "2.1.0" or "2.2.0").
ecistring, nullableElectronic Commerce Indicator (ECI) value representing the 3DS authentication result.
transaction_statusstring (enum)requiredIndicates the transaction status
Possible values:
Y,N,U,A,R,C,D,I
recurring_detailsRecurringDetails (one of object | object | object | object | object | object | object), nullableDetails required for recurring payment
request_extended_authorizationboolean, nullableOptional boolean value to extent authorization period of this payment
capture method must be manual or manual_multiple
merchant_order_reference_idstring, nullableYour unique identifier for this payment or order. This ID helps you reconcile payments on your system. If provided, it is passed to the processor if supported.
skip_external_tax_calculationboolean, nullableWhether to calculate tax for this payment intent
psd2_sca_exemption_typestring (enum), nullableSCA Exemptions types available for authentication
Possible values:
low_value,transaction_risk_analysisctp_service_detailsCtpServiceDetails (object), nullableShow 5 child attributes
merchant_transaction_idstring, nullablemerchant transaction id
correlation_idstring, nullablenetwork transaction correlation id
x_src_flow_idstring, nullablesession transaction flow id
providerstring (enum), nullablePossible values:
visa,mastercardencrypted_payloadstring, nullableEncrypted payload
force_3ds_challengeboolean, nullableIndicates if 3ds challenge is forced
threeds_method_comp_indstring (enum), nullableIndicates if 3DS method data was successfully completed or not
Possible values:
Y,N,Uis_iframe_redirection_enabledboolean, nullableIndicates if the redirection has to open in the iframe
all_keys_requiredboolean, nullableIf enabled, provides whole processor response
payment_channelPaymentChannel (one of string (enum) | string (enum) | string (enum) | object), nullableDescribes the channel through which the payment was initiated.
tax_statusstring (enum), nullablePossible values:
taxable,exemptdiscount_amountinteger, nullableTotal amount of the discount you have applied to the order or transaction.
shipping_amount_taxinteger, nullableThis Unit struct represents MinorUnit in which core amount works
duty_amountinteger, nullableThis Unit struct represents MinorUnit in which core amount works
order_datestring, nullableDate the payer placed the order.
enable_partial_authorizationboolean, nullableAllow partial authorization for this payment
is_stored_credentialboolean, nullableBoolean flag indicating whether this payment method is stored and has been previously used for payments
mit_categorystring (enum), nullableSpecifies the category of a Merchant Initiated Transaction (MIT). In the case of MIT,
mit_categorytells what kind of MIT is being processed. In the case of CIT, it tells the future intended MIT type.Possible values:
installment,unscheduled,recurring,resubmissionbilling_descriptorBillingDescriptor (object), nullableBilling Descriptor information to be sent to the payment gateway
Show 6 child attributes
namestring, nullablename to be put in billing description
citystring, nullablecity to be put in billing description
phonestring, nullablephone to be put in billing description
statement_descriptorstring, nullablea short description for the payment
statement_descriptor_suffixstring, nullableConcatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor.
referencestring, nullableA reference to be shown on billing description
tokenizationstring (enum), nullableThe type of tokenization to use for the payment method
Possible values:
skip_psp,tokenize_at_psppartner_merchant_identifier_detailsPartnerMerchantIdentifierDetails (object), nullableInformation identifying partner and merchant application initiating the request
Show 2 child attributes
partner_detailsPartnerApplicationDetails (object), nullableInformation identifying partner / external platform details
merchant_detailsMerchantApplicationDetails (object), nullableInformation identifying merchant details
installment_optionsarray of InstallmentOption (object), nullableInstallment payment options grouped by payment method. When provided, the payment is treated as an installment payment.
Show 2 child attributes
payment_methodstring (enum)requiredIndicates the type of payment method. Eg: 'card', 'wallet', etc.
Possible values:
card,card_redirect,pay_later,wallet,bank_redirect,bank_transfer,crypto,bank_debit,reward,real_time_payment,upi,voucherand 4 moreinstallmentsarray of InstallmentOptionData (object)requiredList of available installment configurations
installment_dataInstallmentRequest (object), nullableInstallment selection sent by the customer during payment confirmation.
Show 2 child attributes
number_of_installmentsintegerrequiredNumber of installments chosen by the customer
billing_frequencystring (enum)requiredBilling frequency for a card installment plan
Possible values:
month
Responses
200Payment confirmed400Missing mandatory fields
Request
curl --request POST \
--url https://sandbox.cardencer.com/payments/{payment_id}/confirm \
--header 'Content-Type: application/json' \
--header 'api-key: snd_...' \
--data '{
"customer_acceptance": {
"acceptance_type": "online",
"accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "127.0.0.1",
"user_agent": "amet irure esse"
}
},
"payment_method": "card",
"payment_method_data": {
"card": {
"card_cvc": "123",
"card_exp_month": "10",
"card_exp_year": "25",
"card_holder_name": "joseph Doe",
"card_number": "4242424242424242"
}
},
"payment_method_type": "credit"
}'Response
{
"payment_id": "pay_mbabizu24mvu3mela5njyhpit4",
"merchant_id": "merchant_1668273825",
"status": "requires_confirmation",
"amount": 6540,
"net_amount": 6540,
"amount_capturable": 6540,
"processor_merchant_id": "merchant_1689512302",
"currency": "AED",
"payment_method": "card",
"attempt_count": 0
}{
"error_type": "invalid_request",
"message": "Missing required param: {param}",
"code": "IR_04"
}