PayPal
PayPal Instant Payment Notification (IPN) sends a message to an address in the profile of a business account every time a payment changes: completed, denied, refunded. IPN is the older PayPal mechanism, still supported, and the only one set in the profile without code. Pointed at the Flows address, it starts your flows — a thank-you after a payment, a note about a refund.
This page is written from the public documentation of PayPal and has not been checked on a live account yet.
What you need
- A PayPal business account.
- IPN that is not taken. The profile has one Notification URL. If your site or a shop module already uses IPN,
replacing the address cuts the shop off — then take the "paid" event from the shop. A
notify_urlpassed by a button or an API call overrides the profile, and such payments go to their own address, not to AlphaFlow. - The phone of the buyer usually is not in the message — the contact is found by email.
Step 1. Create a connection
- Open
Flows → Connections, press Connect a system and choose PayPal. - Press Copy address. It looks like
https://events.alphasms.net/hooks/<TOKEN>— keep it secret.
Step 2. Set up IPN in PayPal
- Log in to your PayPal business account at www.paypal.com.
- Hover over your name and choose Account Settings.
- On the Notifications page press Update next to Instant payment notifications.
- Press Choose IPN Settings and paste the address from the cabinet into Notification URL.
- Choose Receive IPN messages (Enabled) and press Save.
Step 3. Send a test
Send a test message from the IPN Simulator in the sandbox (developer.paypal.com), or make a real payment.
IPN History in the profile shows the messages and sends one again. The event appears in
Flows → Connections → Event journal within seconds, and the
connection shows Recognised: PayPal.
Events
PayPal payment_status | AlphaFlow event | Properties |
|---|---|---|
Completed | payment_succeeded | order_id, total, currency, item, txn_type |
Denied, Failed | payment_failed | order_id, total, currency, item, txn_type |
Refunded, Reversed | refund_issued | order_id, total, currency, item, txn_type |
order_idis theinvoiceof the seller, if passed;totalismc_gross,currencyismc_currency,itemisitem_name.- Every event also carries
status,customandlast_name. Pending,Canceled_Reversal,Processedand the other statuses start nothing.- The time of the event is the time AlphaFlow received it: PayPal writes the date in its own format.
The contact is found by the email of the payer (payer_email) — the reliable contact here. The phone (contact_phone)
comes only if the seller turned on phone collection, so it is usually empty; the first name comes from
first_name. An event without a phone reaches the buyer by SMS or Viber only if AlphaFlow already knows a contact with
this email and a phone.
Payment events are not among the events of the ready-made templates (see Recommended events): create the flow From scratch and choose the event as its start.
Good to know
- PayPal repeats a message until it gets
200— with a growing pause, for up to 4 days and no more than 15 times. A repeat has the same transaction and status and is not recorded twice. - IPN has no signature. PayPal suggests checking each message by sending it back (
cmd=_notify-validate); AlphaFlow does not do this, so the protection is the secret in the address. - PayPal often sends names in the
windows-1252encoding: Cyrillic names may come garbled. - PayPal REST webhooks need a REST application and are not covered by this page.
- The address always answers
200. Above the daily event limit the event is refused in AlphaFlow withquota_exceededand shown in the journal; IPN in PayPal stays on.