Skip to main content
Version: 1.28 (Current)

Stripe Payment with Token (not SCA compliant)

Audience: Low-code Engineers

Skill Prerequisites: Actions, Tokens, Forms, Connectors, Stripe account

Charges the card the user entered in a Stripe Credit Card field on your form. The card is sent from the browser straight to Stripe, which returns a one-time token. The action creates a Stripe customer with that token, charges it, and runs On Success or On Error.

With Stripe Connect, the payment can also go to a connected account, and your platform can keep an application fee.

caution

This action isn't SCA compliant. It uses Stripe's older Charges API and doesn't support Strong Customer Authentication, such as 3D Secure. Payments with cards that need authentication, for example many cards issued in Europe, are declined. Use Stripe Checkout instead whenever you can.

note

This action is part of the Stripe add-on (DnnSharp.Stripe). The add-on is installed separately and needs the STRIPE feature in your license. If it isn't licensed, the action fails with a "not licensed" error. If you don't see the Stripe actions, the add-on isn't installed.

Typical Use Cases​

  • Maintain an existing form that already charges cards with this action
  • Charge a card on your own form, when your customers' cards don't need SCA
  • Charge on behalf of a connected account and keep an application fee

Don't use it to​

Action NameDescription
Stripe CheckoutTakes an SCA-compliant payment on a Stripe-hosted page.
Add Stripe ConnectorCreates the Stripe connector that holds your secret key.
Stripe Create CustomerSaves a customer with a card, without charging it.
Stripe Add SellerConnects a seller's Stripe account to your platform.
Get Stripe User AccountFinds the ID of a connected account, for Payment To.

Input Parameter Reference​

ParameterDescriptionSupports TokensDefaultRequired
API ConnectorThe Stripe connector with your platform's secret key. See Add Stripe Connector. When using an expression, the value must be the connector ID.YesNoneYes
Application Fee PercentageConnect payments only. The fee your platform keeps, as a percentage of Amount, with a dot for decimals, for example 2.35. Use 0 for no percentage fee. Ignored for Standard Payment.Yesempty stringFor Connect payments
Application Fee Fixed AmountConnect payments only. A fixed fee added to the percentage fee, in the currency's main unit, for example 0.50.Yesempty stringNo
Payee EmailThe customer's email. It's saved with the customer, and Stripe sends the payment receipt to it.Yesempty stringNo
DescriptionA description of the payment, for example Order [OrderId]. It's also saved as the customer's description.Yesempty stringNo
Payment TypeWho receives the funds. See Payment types.NoStandard PaymentNo
Payment ToConnect payments only. The ID of the connected account, for example acct_.... It must be empty for Standard Payment.Yesempty stringFor Connect payments
Card FieldThe form's Stripe Credit Card field. The list shows fields of that type only.Yesempty stringYes
AmountThe amount to charge in the currency's main unit, with a dot for decimals, for example 49.95 or [OrderTotal]. The action converts it to cents. The in-product help says "in cents", but that's not what the action does.Yesempty stringYes
CurrencyA three-letter currency code, for example USD or EUR.Yesempty stringYes
On SuccessActions to run when the payment is made. The charge ID is in [Stripe:ChargeId].NoNoneNo
On ErrorActions to run when Stripe rejects the payment, for example when the card is declined. The error is in [Stripe:ErrorMessage].NoNoneNo

Output Parameters Reference​

The action has no output parameters. It sets these tokens:

TokenDescription
[Stripe:ChargeId]The ID of the charge, for example ch_.... Save it to find or refund the payment later in Stripe.
[Stripe:ErrorMessage]Stripe's error message. Available in On Error.

Payment types​

Payment TypeWho gets the moneyCustomer and charge are created in
Standard PaymentYour Stripe account. No application fee is charged.Your account
Direct Payment to Connected AccountThe connected account in Payment To. Your platform gets the application fee.The connected account
Destination Payment to Connected AccountThe connected account in Payment To. Your platform gets the application fee.Your account

The application fee is Amount times Application Fee Percentage, plus Application Fee Fixed Amount. For example, 100.00 with 2.5 and 0.30 is a fee of 2.80. For more on the differences, see Stripe's documentation on Connect charges.

How the payment works​

  1. The user submits the form. The Stripe Credit Card field sends the card to Stripe and gets back a one-time token. The field's value is that token, as JSON.
  2. The action creates a customer. It creates a Stripe customer with the token, the email and the description.
  3. The action charges the customer. It charges Amount in Currency, and sets [Stripe:ChargeId].
  4. A list runs. If the charge is paid, On Success runs. If Stripe returns an error, for example a declined card, On Error runs.

Set the field's Publishable key, for example pk_test_.... It must belong to the same Stripe account, and the same test or live mode, as the connector's secret key.

Considerations​

  • Amounts are in the main unit, not cents. Enter 49.95, not 4995. Extra decimals are cut off, not rounded. Don't include a currency symbol or thousands separators.
  • Zero-decimal currencies. For currencies without cents, such as JPY, type the code in upper case, for example JPY. In lower case, the amount is multiplied by 100.
  • Set a percentage for Connect payments. For the two Connect payment types, Application Fee Percentage can't be empty. Use 0 if you only want a fixed fee.
  • Payment To must match the type. If it's set for Standard Payment, or empty for a Connect payment, the action fails before anything is sent to Stripe.
  • On Error only covers Stripe errors. A declined card or a wrong key runs On Error. If it's empty, the action fails with the error. Other problems, such as a missing connector, an empty card field or an invalid amount, fail the action with an exception, and On Error doesn't run. To handle those, put the action inside Execute Actions and use its On Error. If Stripe creates the charge but it isn't paid, the action fails with Payment did not succeded!, also without running On Error.
  • A new customer every time. Each payment creates another Stripe customer. If you need one customer per user, use Stripe Checkout with Customer ID.
  • One token, one use. Don't use the same card field in Stripe Create Customer in the same submission. Stripe accepts a card token only once.
  • Starting from the template. The Stripe Payment Form with Tokens form template includes this action without a connector. Pick your connector in API Connector before you use it.
  • Test first. Use test keys (sk_test_... in the connector, pk_test_... in the field) and Stripe's test cards.
  • Where it works. Forms only, because the card comes from a form field.

Examples​

tip

To understand how to use the below examples, please see Running Examples.

1. Charge the order total​

This action charges [OrderTotal] US dollars to the card in the StripeCard field. The funds go to your Stripe account. On success, the charge ID is saved with the order. Replace the connector ID with your Stripe connector.

{
"Title": "Stripe Payment with Token (not SCA compliant)",
"ActionType": "StripeChargeWithToken",
"Description": "Charge the order total",
"Parameters": {
"Credentials": {
"Entry": "00000000-0000-0000-0000-000000000000"
},
"PayeeEmail": "[Email]",
"Description": "Order [OrderId]",
"PaymentType": "StandardPayment",
"CardField": "StripeCard",
"Amount": "[OrderTotal]",
"Currency": "USD",
"OnSuccess": [
{
"Title": "Run SQL Query",
"ActionType": "RunSql",
"Parameters": {
"SqlQuery": "UPDATE Orders SET Status = 'Paid', StripeChargeId = @ChargeId WHERE OrderId = @OrderId",
"BindTokens": [
{
"name": "ChargeId",
"value": "[Stripe:ChargeId]"
},
{
"name": "OrderId",
"value": "[OrderId]"
}
]
}
},
{
"Title": "Display Message",
"ActionType": "ShowMessage",
"Parameters": {
"Message": "<p>Thank you! Your payment was received.</p>"
}
}
],
"OnError": [
{
"Title": "Display Error Message",
"ActionType": "ShowError",
"Parameters": {
"Message": "<p>We couldn't complete your payment: [Stripe:ErrorMessage]</p>"
}
}
]
}
}

2. Pay a seller and keep a fee​

This action charges the order total as a destination payment to the seller's connected account in [SellerAccountId]. Your platform keeps 5% plus 0.30.

{
"Title": "Stripe Payment with Token (not SCA compliant)",
"ActionType": "StripeChargeWithToken",
"Description": "Pay the seller and keep the platform fee",
"Parameters": {
"Credentials": {
"Entry": "00000000-0000-0000-0000-000000000000"
},
"ApplicationFee": "5",
"ApplicationFeeFixedAmount": "0.30",
"PayeeEmail": "[Email]",
"Description": "Order [OrderId] from [SellerName]",
"PaymentType": "ConnectDestinationPayment",
"PaymentTo": "[SellerAccountId]",
"CardField": "StripeCard",
"Amount": "[OrderTotal]",
"Currency": "USD",
"OnError": [
{
"Title": "Display Error Message",
"ActionType": "ShowError",
"Parameters": {
"Message": "<p>We couldn't complete your payment: [Stripe:ErrorMessage]</p>"
}
}
]
}
}

Revised 09/27/2026