This tutorial shows you how to create a Stripe Action for any Smart Clause® that emits a Payment Obligation.

No programming skills are required for this tutorial, however you will need a Stripe account.

First, please complete the Full Payment on Signature tutorial.

1. Add a Perishable Goods Smart Clause

Create a new contract and then add the Perishable Goods smart clause (one of the advanced clauses) to your contract. If you view the details of the template for the smart clause you will see that the logic for the template emits a Payment Obligation.

3. Add an Action Flow with a Stripe Create Charge Step

Add an Action Flow, and then add a Stripe Create Charge Step.

4. Request Signatures and Trigger the Contract

You can now add signatories, sign the contract and then trigger the clause via an HTTP POST. Note that you can trigger the smart clause when the contract is in the DRAFTING state however payment obligations will only be sent to Stripe when the contract is in the RUNNING state.

You can view the JSON body for the HTTP POST for the smart clause by viewing the details for the clause in the Accord Project template library. You can navigate to the library by viewing the details of the smart clause and then pressing the View in Accord Project Template Library link.

Every time the smart clause is triggered with a org.accordproject.perishablegoods.ShipmentReceived transaction you will see a new payment (in the "Payments" tab on the left) in your Stripe Dashboard.