See the reference documentation for Custom Actions for guidance on how to use this connector.

This sample connects a response from the one-time-payment Smart Clause® to the Clause Stripe Create Charge connector.

This sample uses a Stripe Secret key. Get yours from https://dashboard.stripe.com/account/apikeys
Find your Stripe accountId at the bottom of your Stripe profile page, https://dashboard.stripe.com/settings/user
{
  "$class": "io.clause.outbound.physical.payments.stripe.StripeCreateCharge",
  "accessToken": "sk_test_XXXXXXXXXXXXXXXXXXXXXXX",
  "source": "tok_visa",
  "accountId":"acct_XXXXXXXXXXXXXX",
  "amount": event.amount
}

Note that tok_visa is a Stripe test credit card

In this sample, event.amount references a MonetaryAmount object, you can reference the value and currency with event.amount.doubleValue and event.amount.currencyCode respectively.