Repository navigation
V. Features & Usage
Stripe events are logged through the doctype Stripe Log. The data saved in this doctype are datetime_received, event_id, event_type and event_data. If the webhook receiver encounters any issue, Stripe Log can help in diagnosing and troubleshooting.
In addition, Stripe Log is registered as a log-type doctype. So, Stripe Logs can be automatically cleaned up by Frappe's scheduler. To allow automatic cleanup:
- Open Log Settings.
- Add a row in the table.
- Choose Stripe Log and set your frequency (default is 30).
- Click Save.
The entire accounting of a single Stripe transaction is recorded through the doctype Merchant Payment. Fields source, payment_status, payment_method, 'customer, 'associated_payment_request, associated_sales_order, associated_sales_invoice, associated_subscription, associated_payment entry are found in the doctype
Merchant Payment is based on the Stripe object Balance Transaction so fields created, available_on, gross_amount, net_amount and merchant_fee are also part of it.
If the automation fails to complete the information (missing merchant_transaction_id, gross_amount, net_amount, etc.) the button Update Transaction Details is available to help automatically fill in the missing fields. To use the button:
- In the action bar, click Update Transaction Details.
- If the update is successful, a success message will appear and the fields will be successfully set; otherwise, an error will pop up.
If the automation fails to create a Payment Entry, the button Retry PE is available to help automatically create one. To use the button:
- Go to the Merchant Payment list.
- Filter the list according to either the Associated Payment Request, Sales Order or Sales Invoice, depending on the information you have.
- Select the first result in the list.
- In the action bar, click Retry PE.
- There can be three outcomes in retrying the payment:
- The Payment Entry already exists so it will just be linked to the doc.
- The Payment Entry does not exist so it will be created and linked to the doc.
- The creation failed.
Once a Subscription is set up, Stripe Plus automates the payment for every invoice created for it. If there are no unpaid sales invoices, an advance payment will be created instead and will be allocated later on.
Advance Payments are linked in the Connections tab under Selling. Clicking on the hyperlink will redirect to the Payment Entry list with filters:
-
status= Submitted -
reference_nolike pi% -
payment_entry_referenceis null -
party= [customer]
Customers can access view and modify their subscriptions via the portal. In the portal, the customer can change their payment method, request for a plan change, subscription cancellation or renewal. The payment method change can be immediately done by the customer in the portal but the requests require admin approval.
In the Subscription doc, an admin can approve or decline a customer's update request. Pending update requests are linked in the Connections section under Management. Clicking the hyperlink redirects to the list of Subscription Update Requests for the Subscription.
To apply an Update Request, click the Tools dropdown and select Apply Update Request. A table of requests will be displayed with rows showing details for each request. Choose a request to apply by clicking the Apply button found in each row. Depending on the type of request, the button behaves differently:
- Cancellation:
a. If the
cancellation_dateis on the day or past thesubscription_end_date, the subscription will be cancelled immediately. b. If thecancellation_dateis in the future, thesubscription_end_datewill be changed and the tab will automatically scroll to the field. - Resubscription
a. If the
resubscription_dateis on the day or past thesubscription_start_date, the subscription will be renewed immediately. b. If theresubscription_dateis in the future, thesubscription_start_datewill be changed and the tab will automatically scroll to the field. - Plan Change [No additional actions]
In addition, a prompt will appear where the admin can add approval notes before the update is applied.
The subscription payment method of a customer can be reused for single payment checkout through Redisplay Payment Method. By default the payment details entered for the subscription auto-charging is hidden. Clicking the button allows it to be visible and reusable in all future checkouts without the need for re-entering the details. To use the feature, click the Tools dropdown and select Redisplay Payment Method.
If there are Stripe payments that are not accounted for in Advance Payments or unassigned to a Sales Invoice, Look for Unallocated Payments can come in handy. This feature queries Stripe Transactions that are not referenced in any Payment Entry, displays it to the user, and gives the option to allocate them. To use the feature:
- Click the Tools dropdown and select Look for Unallocated Payments.
- A pop-up will appear with a table of Stripe Transactions.
- Tick the transactions you want to account for and click Allocate Payments.
- Automatically, payments are created and are allocated to unpaid invoices. If there's none, they will be recorded as Advance Payments.