How to connect Stripe + ActiveCampaign + FacturaDirecta
Zapier lets you send info between Stripe, ActiveCampaign, and FacturaDirecta automatically—no code required.
- Free forever for core features
- 14 day trial for premium features & apps
Do even more with Stripe + ActiveCampaign + FacturaDirecta
With Zapier, you can do more than just connect your apps - you can automate entire processes from beginning to end! Check out the following list of triggers and actions you can use with Stripe, ActiveCampaign, and FacturaDirecta. And don’t forget that you can add more apps and actions to create complex workflows.
Canceled Subscription
Triggers when a subscription is canceled (by a subscriber or due to end of billing period).
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.Failed Payment
Triggers when a payment attempt fails.
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.New Customer
Triggers when a new customer is added.
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.New Subscription
Triggers when a customer is signed up for a new plan.
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.New Invoice Item
Triggers when a new invoice item is created.
Try ItTriggerThis is the start of your ZapScheduledZapier checks for new data every 15 min on the Free planNew Payment Link
Triggers when a new payment link is created.
Try ItTriggerThis is the start of your ZapScheduledZapier checks for new data every 15 min on the Free planUpdated Subscription
Triggers when a customer subscription has changed.
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.PriceRequired
You can add a Price Description to the Price of a Product in Stripe to make it easier to find in Zapier.
QuantityRequired
Minimum adjustable quantity
By default this value is 0. You can specify a value up to 98. If you do not want to let customers adjust quantity, leave this field empty, or pass an empty line item value.
Maximum adjustable quantity
By default this value is 99. You can specify a value up to 99. If you do not want to let customers adjust quantity, leave this field empty, or pass an empty line item value.
Collect Tax Automatically?
To use this option, you must first enable "Automate taxes" at https://dashboard.stripe.com/setup
Allow Promotion Codes?
Collect Customers' Addresses?
Require customers to provide a phone number?
Confirmation Page
Metadata
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.NameRequired
Description
Image
Tax Code
A tax code ID.
Metadata
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.Payment LinkRequired
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.Api Docs Info
API docs for Stripe are located here https://stripe.com/docs/api
HTTP MethodRequired
URLRequired
Requests can only be made to domains associated by this application.
Query String Parameters
These params will be URL-encoded and appended to the URL when making the request.
Headers
Authentication headers are included automatically
Additional Request Headers
Zapier will apply these optional headers and values to the request in addition to any headers created as part of the authentication mechanism.
Body
Zapier will pass this along raw. If you would like to provide complex JSON, try a "Code by Zapier" step to build the structure and pass it along here. For example,
{"foo": "bar"}
is perfectly valid.
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.Find by
Defaults to "Customer Stripe ID"
QueryRequired
Enter the Stripe ID (e.g.
cus_51kxW2Z0qQHpGc
) or the email address of the customer to find.
ActionThis is an event a Zap performs.SearchFind existing data in your appPayment Intent IDRequired
Enter the Stripe ID of the payment intent to find. (e.g.
pi_51kxCxb1NFWajM
)
ActionThis is an event a Zap performs.SearchFind existing data in your appCustom ObjectRequired
Select the object you want to trigger this Zap
Trigger EventsRequired
Select which events should trigger this Zap
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.Task Type (Optional)
The type of the task based on the available Task Types in your account
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.New Automation Webhook
Triggers when an automation sends out webhook data. To add a webhook in ActiveCampaign, navigate to your Automations section, add or edit an automation, and create a new "Webhook" action.
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.ListRequired
List the campaign link click is associated with.
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.ListRequired
List the Campaign is sent to.
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.List
List that the contact note is associated with.
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.New Deal Note
Triggers when a new deal note is created.
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.New Deal Added or Updated
Triggers when a new deal is created or existing deal is updated.
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.ListRequired
List the subscriber is updated in.
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.EventRequired
Tag
Leave blank to trigger for all Tags, begin typing to filter, or use the Custom tab for text/input entry
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.Account IDRequired
Name
Website
Suggested Format:
https://www.example.com
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.TitleRequired
ValueRequired
In dollars. Example: 350.00.
Owner
The "Auto" option only works if your chosen pipeline has "Automatic Deal Assignment" configured. If no value (or invalid value) is supplied, it will default to the connected ActiveCampaign account user.
CurrencyRequired
Example: usd.
PipelineRequired
StageRequired
Account
Contact Email Address
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.AutomationRequired
The contact will be removed from this automation.
Automation RunRequired
The automation run(s) that the contact will be removed from.
Contact IDRequired
ActiveCampaign ID of the contact.
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.Contact IDRequired
Contact that will get added to the account.
Account IDRequired
Choose an account.
Job Title
Set a job title for the related contact.
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.Contact IDRequired
The ID of the Contact where the tag will be added or removed
ActionRequired
Add or remove tag from AC Contact
Existing Tags
Choose from list or enter/insert tag data below
Tags
Enter/insert tag data or use the drop down list above, separate tags with a comma
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.Custom ObjectRequired
The object that you want to create a record for in ActiveCampaign
Record ID
To update an existing record, provide the record ID or external ID
External ID
To update an existing record, provide the record ID or external ID
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.TitleRequired
ValueRequired
In cents. Example: $350.00 would be 35000.
Owner
The "Auto" option only works if your chosen pipeline has "Automatic Deal Assignment" configured. If no value is supplied, it will default to the connected ActiveCampaign account user.
CurrencyRequired
Example: usd.
PipelineRequired
StageRequired
Account ID
An Account or Contact is required to create a deal.
Contact ID
An Account or Contact is required to create a deal. The Contact selected will be made the Primary Contact.
Description
Deal's description
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.Task ID
Insert the task ID to be updated. Leave blank if creating a new task.
Title
The title to be assigned to the task.
Deal IDRequired
Insert the ID of the Deal to be assigned this task.
Note
The content describing the task.
Due DateRequired
Due date of the task ex. 2021-02-25T12:00:00-06:00.
End Date
End Date (i.e. duration) of the task ex. 2021-02-25T12:15:00-06:00. Must be later than Due Date.
Task TypeRequired
The type of the task based on the available Task Types in your account.
Assignee
The id of the user this task will be assigned to.
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.ActionRequired
Subscribing will not update lists the Contact already belongs to with any status. Unsubscribing requires the contact already belongs to the list in some status.
List IDRequired
List from which you'd like to your Contact to be Subscribed/Unsubscribed
Contact ID
ActiveCampaign ID of the Contact. NOTE: IF THIS IS NOT PROVIDED, 'Email Address' MUST BE
Email Address
Email of the Contact. NOTE: IF THIS IS NOT PROVIDED, 'Contact ID' MUST BE
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.NameRequired
ActionThis is an event a Zap performs.SearchFind existing data in your appContact Task TitleRequired
The contact task title
Contact ID
The related contact ID
ActionThis is an event a Zap performs.SearchFind existing data in your appTitle
The title of the Deal
Contact Email
The email of a Contact on the Deal
ActionThis is an event a Zap performs.SearchFind existing data in your appEmailRequired
Email of the user being searched
ActionThis is an event a Zap performs.SearchFind existing data in your appCompanyRequired
Find Customer By Email
If contact exists, FacturaDirecta will update the existing one instead of creating a new one.
NameRequired
Surname
Email
Phone
Fiscal Id
Type the customer fiscalId/taxCode/vatNumber without any formatting characters, just numbers and letters.
Is final customer
Select 'yes' to create a customer as an individual as an opposite to a business. This can help to apply the right taxes automatically when invoicing this customer
Address
City
Region/State
Zip Code
Country
If you use a custom value, the value must be a two-digit country code according to ISO 3166-1.
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.CompanyRequired
Invoice IdRequired
Bank Id
ID of the bank for the counterpart of the balance change in the invoice. Only one of 'bankId' and 'bankSearchName' are required, if both are informed 'bankId' has precedence. If the bank can not be found with the provided values the Zap will fail.
Bank
Text to search the bank. Only one of 'bankId' and 'bankSearchName' are required, if both are informed 'bankId' has precedence. If the bank can not be found with the provided values the Zap will fail.
Amount
Amount in the currency of the invoice to substract to the invoice balance. If it is empty or zero, the entire pending amount of the invoice will be paid.
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.
Checkout Session Completed
Triggers when a checkout session is completed.
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.Invoice Payment Failed
Triggers when an invoice payment fails.
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.New Dispute
Triggers when a customer disputes a charge.
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.New Invoice
Triggers when a new invoice is created (supports line items).
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.New Payment
Triggers when a new payment is completed.
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.New Refund
Triggers when a charge is refunded, including partial refunds.
Try ItTriggerThis is the start of your ZapScheduledZapier checks for new data every 15 min on the Free planName
Email
Description
Billing - Address Line 1
Billing - Address Line 2
Billing - City
Billing - State
Billing - ZIP
Billing - Country
Enter a two-letter country code.
Billing - Phone
Shipping - Name
Shipping - Address Line 1
Shipping - Address Line 2
Shipping - City
Shipping - State
Shipping - ZIP
Shipping - Country
Enter a two-letter country code.
Shipping - Phone
Language
Enter a two-letter language code.
Invoice prefix
The prefix for the customer used to generate unique invoice numbers. Must be 3-12 uppercase letters or numbers.
Next Invoice Sequence
Tax Status
Credit Balance
An integer amount in cents that represents the customer's current balance. A negative amount represents a credit that decreases the amount due on an invoice. (e.g.
-2000
decreases invoice amount by $20.00) A positive amount increases the amount due on an invoice. (e.g.1000
increases invoice amount by $10.00)Metadata
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.ProductRequired
Price (in minor units, e.g. cents)Required
A positive integer in minor units (e.g. cents) or
0
for a free price. For example, if your currency is USD, enter100
to charge $1.00.CurrencyRequired
Must be a supported three-letter ISO currency code.
Recurring or One time?
Tax Behavior
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.Customer IDRequired
ItemsRequired
A subscription can be created with up to 20 items. Selecting the same item more than once will result in an error.
Collection MethodRequired
When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions.
Coupon ID
Cancel at period end?
Metadata
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.Customer IDRequired
Name
Email
Description
Billing - Address Line 1
Billing - Address Line 2
Billing - City
Billing - State
Billing - ZIP
Billing - Country
Enter a two-letter country code.
Billing - Phone
Shipping - Name
Shipping - Address Line 1
Shipping - Address Line 2
Shipping - City
Shipping - State
Shipping - ZIP
Shipping - Country
Enter a two-letter country code.
Shipping - Phone
Language
Enter a two-letter language code.
Invoice prefix
The prefix for the customer used to generate unique invoice numbers. Must be 3-12 uppercase letters or numbers.
Next Invoice Sequence
Tax Status
Credit Balance
An integer amount in cents that represents the customer's current balance. A negative amount represents a credit that decreases the amount due on an invoice. (e.g.
-2000
decreases invoice amount by $20.00) A positive amount increases the amount due on an invoice. (e.g.1000
increases invoice amount by $10.00)Metadata
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.Stripe Charge IDRequired
Enter the Stripe ID of the charge to find. (e.g.
ch_51kxCxb1NFWajM
)
ActionThis is an event a Zap performs.SearchFind existing data in your appInvoice IDRequired
Enter the Stripe ID of the invoice to find. (e.g.
in_51kxCxb1NFWajM
)
ActionThis is an event a Zap performs.SearchFind existing data in your appCustomer IDRequired
Price ID
Status
If this field is left empty, Zapier will search for subscriptions that have not been canceled.
ActionThis is an event a Zap performs.SearchFind existing data in your appCustom ObjectRequired
Select the object you want to trigger this Zap
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.New or Updated Account
Triggers when a new account is added or an existing account's details are updated.
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.ListRequired
List the campaign bounce is associated with.
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.ListRequired
List the campaign open is associated with.
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.ListRequired
List the campaign unsubscribe is associated with.
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.Task type
Leave blank to trigger for all task types, begin typing to filter, or use the Custom tab for text/input entry.
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.New Deal Task
Triggers when a new deal task is created.
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.ListRequired
List the subscriber is added to.
Importer Note
Adding contacts to lists via the CSV importer will not cause this trigger to fire.
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.List
List the subscriber is added or updated in. Leave blank if you wish this trigger to run on all contact adds or updates.
Skip Unsubscribe Events
Choose "Yes" to stop unsubscribe events from triggering the zap.
Importer Note
Creating contacts via the CSV importer will not cause this trigger to fire.
Try ItTriggerThis is the start of your ZapInstantThis event starts a Zap instantly.NameRequired
Website
Suggested Format:
https://www.example.com
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.List
ID
ActiveCampaign ID of the contact. NOTE: IF THIS IS NOT PROVIDED, 'email' MUST BE
Email Address
Email of the contact, once created it cannot be updated via this action. NOTE: IF THIS IS NOT PROVIDED, 'id' MUST BE.
First Name
Last Name
Full Name
Only use this if you can't obtain the first and last name fields separately.
Phone Number
Can be used with our SMS feature.
Tags
Separate multiple tags with a comma (IE: "tag1, tag2, etc").
Organization Name
Job Title
Job Title will be available when there is an Account associated.
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.AutomationRequired
Subscriber EmailRequired
The contact email address (to add into the automation).
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.Email MessageRequired
The email message (previously created). No HTML/text values accepted here. To generate a new email message, create a new campaign and set up the email message on the template step. Save it, then come back into Zapier and choose that message from the dropdown here.
ListRequired
Campaign NameRequired
This is internal name of the campaign, not the subject.
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.Contact IDRequired
Enter the contact ID.
List IDRequired
Enter the List ID or enter zero for all lists.
NoteRequired
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.Task ID
Insert the task ID to be updated. Leave blank if creating a new task
Title
The title to be assigned to the task.
Contact IDRequired
Insert the ID of the Contact to be assigned this task.
Note
The content describing the task.
Due DateRequired
Due date of the task ex. 2021-02-25T12:00:00-06:00.
End Date
End Date (i.e. duration) of the task ex. 2021-02-25T12:15:00-06:00. Must be later than Due Date.
Task TypeRequired
The type of the task based on the available Task Types in your account.
Assignee
The id of the user this task will be assigned to.
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.Contact IDRequired
Deal IDRequired
Role
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.DealRequired
NoteRequired
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.DealRequired
Title
Value
In cents. Example: $350.00 would be 35000.
Currency
Example: usd.
Owner
Pipeline
Stage
Account ID
Contact ID
Status
Description
Deal's description
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.Event KeyRequired
Found under the Settings > Tracking > Event Tracking section of ActiveCampaign.
Event Account IDRequired
Found under the Settings > Tracking > Event Tracking API section of ActiveCampaign.
Event NameRequired
Event Value
Contact Email Address
If not supplied the event will still be saved.
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.ID
ActiveCampaign ID of the contact. NOTE: IF THIS IS NOT PROVIDED, 'email' MUST BE
Email Address
Email of the contact. NOTE: IF THIS IS NOT PROVIDED, 'id' MUST BE
ActionThis is an event a Zap performs.SearchFind existing data in your appDeal Title
Use either Deal Title or Contact Email to search for a deal. If both are filled out, both the title and email must match on a deal to get a result.
Contact Email
Use either Deal Title or Contact Email to search for a deal. If both are filled out, both the title and email must match on a deal to get a result.
ActionThis is an event a Zap performs.SearchFind existing data in your appDeal Task TitleRequired
The deal task title
Deal ID
The related deal ID
ActionThis is an event a Zap performs.SearchFind existing data in your appCompanyRequired
Find Customer By Email
If contact doesn't exist, FacturaDirecta will create a new one with data obtained from the trigger. Please select fields to match.
Find Customer By FiscalId
If contact doesn't exist, FacturaDirecta will create a new one with data obtained from the trigger. Please select fields to match.
Customer Name
Customer Surname
Customer Email
Customer Phone
Customer Fiscal Id
Is final customer
Select 'yes' to create a customer as an individual as an opposite to a business. This can help to apply the right taxes automatically when the invoice is created
Customer Address
Customer City
Customer Region
Customer Zip Code
Customer Country
If you use a custom value, the value must be a two-digit country code according to ISO 3166-1.
External ID
Indicate here a unique ID for this invoice. When this field is present a new invoice will be created only if there is no other invoice created with the same external ID in the last 7 days. This field allows to reexecute Zaps that failed without the risk of duplicating invoices.
Create as draft
Select 'yes' to create a draft invoice, select 'no' to create a final invoice or left empty to create the invoice in the mode indicated by default in the configuration of your company
Series
Enter your invoices serial number or select a field.
Created Date
Due Date
Visible notes
Tags
Add labels separated by ','
PDF Template
Select your invoice template.
Currency
Line Total Decimals
Indicate the number of decimals (between 2 and 6) to use to calculate the line total amount or each line.
Invoice total
Taxes Included
Auto calculate taxes
Select 'yes' to allow FacturaDirecta to auto calculate taxes based on customer data. You must indicate the tax for national customers and FacturaDirecta will updated it to fit the customer location
Mark as paid
Select 'yes' to create a payment for the invoice.
Bank
Select the bank where the invoice will be paid. The payment will be created only if a valid bank is selected.
Payment method
Select the payment method where the invoice will be paid. The payment method will be created only if has a valid bank.
Send document
Select 'yes' to send the invoice to the customer.
Include facturae
Select 'yes' to include the invoice in facturae format when you send the invoice to the customer. The Facturae will be send only if you have all the needed data for the customer, otherwise it will be ignored and the Zap will not fail.
Generate PDF
Select 'yes' to get the document URL in PDF format. Select 'true' only if you do need the PDF in another step of this Zap.
Generate Facturae
Select 'yes' to get the document URL in Facturae format (xsig) when you have all the needed data for the customer. Select 'true' only if you do need the Facturae file in another step of this Zap.
Product SKU
The SKU or unique identifier of the product on the order. This must match a SKU that exists in your FacturaDirecta database.
Description
Quantity
Unit Price
Amount
If you have unit price and quantity fields informed, you don't need to use 'amount' field. FacturaDirecta will calculate the total amount automatically. You must use 'amount' field if your trigger action doesn't provide you the unit price. If discounts are applied, this is the amount without the discount applied.
Tax Codes
Select your tax code.
Tax Name
Type IVA,VAT or IRPF, or select field.
Tax Rate
Type your tax rate or select field. (Ex: 0.21)
Discount Rate
Type your discount rate or select field. (Ex: 0.05)
Tax amount
Shipping Item
The SKU of the shipping product on the order, this must match a SKU that exists in your FacturaDirecta database or select your shipping product in FacturaDirecta.
Shipping Amount
Shipping Description
Shipping Tax Codes
Shipping Tax Name
Shipping Tax Rate. (Ex: 0.21)
Shipping Discount Rate. (Ex: 0.05)
Shipping Tax Amount
Rates Base 100
Activate this field to use 100% based values on any 'Rate' field in the Step. If this is enabled you must use '21' instead of '0.21' to indicate 21%
ActionThis is an event a Zap performs.WriteCreate a new record or update an existing record in your app.
Top companies trust Zapier to automate work and free up time
Connect your apps and automate workflows
Easy automation for busy people. Zapier moves info between your web apps automatically, so you can focus on your most important work.
How Stripe + ActiveCampaign + FacturaDirecta Integrations Work
- Step 1: Authenticate Stripe, ActiveCampaign, and FacturaDirecta.30 seconds
- Step 2: Pick one of the apps as a trigger, which will kick off your automation.15 seconds
- Step 3: Choose a resulting action from the other app.15 seconds
- Step 4: Select the data you want to send from one app to the other.2 minutes
- That’s it! More time to work on other things.
Related categories
Related categories
Related categories
Get started for free
You can't add more hours to the day. Zapier is the next best thing.
Other Stripe + ActiveCampaign Integrations
- clickfunnels
- trainerize
- kajabi
- zoom
- xero
- woocommerce
- code
- trello
- sms
- pipedrive
- mysql
- gmail
- facebook-offline-conversions
- facebook-custom-audiences
- learnworlds
- zendesk
- wave
- typeform
- tapfiliate
- shipstation
- sendinblue
- searchie
- quickbooks
- proof
- liveagent
- leadconnector
- keap-max-classic
- jobber
- intercom
- hubspot
- google-forms
- google-drive
- google-calendar
- google-analytics
- front-app
- freshdesk
- docusign
- closeio
- clickup
- clicksend
- circle
- calendly
- acuity-scheduling
- 17hats
- teachable
- monday
- twilio
- facebook-conversions