...
Invoice Payment Succeeded and Invoice Payment Failed Webhook Events - Find the equivalent Gateway Transaction of the Gateway Invoice
Remove Invoice Created and Invoice Updated Webhook Events to prevent duplicate Gateway Invoice
Info |
---|
Post-Config |
Permission Set
Assign the following permission set to the user want to use the feature.
· PosiPay
Digital Experiences
Note: This config is only for the webhook guest user, not the guest user for Stripe Form.
Create Community Site, then enable Public Access then Publish
Configure access profile for guest
a. Apex Class Access
i. WebhookListener
b. Object Access
i. GatewayEvent = Create/Read
Fields:
a. Event ID
b. Event Status
c. Gateway Account
d. Raw Request
e. Webhook Event Object
ii. GatewayAccount = Create/Read
Fields:
a. API Token
b. Accepted Card
c. Accepted Currency
d. Active
e. Base URL
f. Default Currency
g. Description
h. Enable 3d Secure
i. Enable Live Payment from Sandbox
j. Fraud Trigger
k. Gateway Provider
l. Payment Method
m. Publishable Key
n. Sandbox
o. Version
p. Webhook Endpoint URL
q. Unrequire CVC in Batch Gift Entry
iii. PosiPay Log = Create/Read
Fields:
a. Description
b. Details
c. Source
d. Type
iv. Gateway Invoice
Fields:
a. Amount Paid
b. Attempt Count
c. Gateway Event
d. Gift Transaction
e. Gift Transaction ID
f. Invoice Date
g. Invoice ID
h. Invoice Status
i. Payment Intent ID
Sharing Settings
GatewayAccount for Webhook Guest User
a. Criteria: Active = true
Create Gateway Account Record
Fill in the following fields.
a. Gateway Account Name = any
b. API Token = Secret key from Stripe Account
c. Publishable Key = Publishable key from Stripe Account
d. Version = v1
e. Base URL = URL from the created Community Site
f. Gateway Provider
g. Active = false
h. Sandbox = true/false
i. Note: TRUE indicates that the gateway account is in sandbox mode while FALSE indicates that the gateway account is in live mode.
i. Enable 3D Secure = true/false
j. Enable Live Payments from Sandbox = true/false
k. Accepted Currency =
i. AUD
ii. NZD
iii. USD
iv. select all
l. Fraud Trigger =
i. Blocked
ii. Manual Review
iii. Issuer Declined
iv. select all
m. Default Currency =
i. AUD
ii. NZD
iii. USD
n. Payment Method =
i. Cash
ii. Credit Card
iii. BECS Debit
iv. Check
v. Direct Deposit
vi. Select all
o. Accepted Card
i. Visa
ii. Mastercard
iii. American Express
iv. Discover
v. Select all
Then click the Authenticate button after the record save.
Setup Stripe Dashboard Webhook ( https://dashboard.stripe.com )
Developers > Webhooks > Add endpoint button. Disclaimer: This step is from old UI
· Endpoint URL: Webhook Endpoint URL fields from the created Gateway Account record above.
· Then click + Select events
· Then select following events
o charge.failed
o charge.pending
o charge.refunded
o charge.succeeded
o charge.updated
o invoice.created (remove this event if PosiPay version is 92 and above)
o invoice.payment_failed
o invoice.payment_succeeded
o invoice.updated (remove this event if PosiPay version is 92 and above)
o payout.failed
o payout.paid
o payment_intent.canceled
o invoice.marked_uncollectible
· Ensure that you use only one endpoint or webhook URL per Stripe account. Using multiple endpoints or webhook URLs can cause errors in processing transactions.
Custom Settings
· PosiPay Settings
· Default Gateway Account fields = Gateway Account Id for Default
Object Manager:
Bank Account
Page Layouts and Lightning Record Pages
Fields
· Active
· Bank Account Number
· Bank Code
Bank Deposit Batch
Page Layouts and Lightning Record Pages
Fields
· Bank Account
· Batch Status
· Status Message
· When Generated
· Bank Reconciliation Status
· Bank Statement Line
· Settlement Date
Mobile & Lightning Action
· Generate Bank Slip
Contact
Page Layouts and Lightning Record Pages
Fields
· Default Gateway Customer
Gateway Account
Page Layouts and Lightning Record Pages
Fields
· API Token
· Accepted Card
· Accepted Currency
· Active
· Base URL
· Default Currency
· Description
· Enable 3D Secure
· Enable Live Payments from Sandbox
· Faud Trigger
· Gateway Provider
· Payment Method
· Publishable Key
· Sandbox
· Version
· Webhook Endpoint URL
Mobile & Lightning Actions
· Authenticate
Gateway Customer
Page Layout and Lighting Record Pages
Fields
· Customer Address
· Customer Email
· Customer ID
· Customer Phone
· Customer
· Default Payment Source
· Gateway Account
Gateway Event
Page Layout and Lighting Record Pages
Fields
· Event ID
· Event Status
· Gateway Account
· Raw Request
· Webhook Event Object
Gateway Invoice
Page Layout and Lighting Record Pages
Fields
· Amount Paid
· Attempt Count
· Gateway Event
· Invoice Date
· Invoice ID
· Invoice Status
· Payment Intent ID
Gateway Transaction
Fields & Relationships
Transaction Status
· Add picklist value
i. Canceled
ii. Dispute Under Review
Page Layout and Lighting Record Pages
Fields
· Adjustment Date
· Adjustment ID
· Amount
· Balance Transaction
· Charge ID
· Decline Code
· Flagged As Fraud
· Gateway Account
· Gateway Event
· Gateway Fee
· Gateway Invoice
· Order
· Payment Date
· Payment Intent Id
· Payment Method
· Process Type
· Refund Date
· Refund Id
· Result Code
· Result Message
· Risk Level
· Risk Score
· Settlement
· Source Transaction
· Transaction Currency
· Transaction Reference ID
· Transaction Status
· Bank Reconciliation Status
· Bank Statement Line
· Receiving Bank Account
· Settlement Date
Mobile & Lightning Actions
· Refund Payment
Order
Fields & Relationships
Status
a. Add a new picklist value called “Paid” where the Status Category is “Activated”
b. Add a new picklist value called “Failed” where the Status Category is “Draft”
Page Layouts and Lightning Record Pages
Fields
· Check Date
· Check Drawer
· Payment Identifier
· Payment Method
· Receiving Bank Account
· Status
· Bank Reconciliation Status
· Bank Statement Line
· Settlement Date
Payment Source
Page Layout and Lightning Record Pages
Fields
· Account Holder Name
· Active
· BSB Number
· Card Expiry Date
· Card Type
· Cardholder Name
· Default Payment Source
· Gateway Account
· Gateway Customer
· Last4 Digit
· Payer
· Payment Source Type
· Token
PosiPay Log
Page Layout and Lightning Record Pages
Fields
· Description
· Details
· Source
· Type
Gateway Settlement
Page Layout and Lightning Record Pages
Fields
· Amount
· Error Code
· Error Message
· Gateway Account
· Gateway Adjustment Total
· Gateway Fee Total
· Gateway Reconciliation Status
· Gateway Reference ID
· Gateway Refund Total
· Reconciliation Balance
· Reconciliation Date
· Starting After
· Stripe Fee Total
· Bank Reconciliation Status
· Bank Statement Line
· Receiving Bank Account
· Settlement Date
Bank Statement
Page Layout and Lightning Record Pages
Fields
· Bank Account
· Bank Statement Name
· Date Reconciled
· Status
Bank Statement Line
Page Layout and Lightning Record Pages
Fields
· Amount
· Bank Statement
· Bank Statement Line Name
· Description
· Reconciliation Status
· Settlement Date
· Transaction Reference
· Transaction Type
Global Picklist
Payment Method
The only picklists are the following; otherwise, please remove them.
· Credit Card
· BECS Debit
· Cash
· Check
· Direct Deposit
Change Data Capture
In the Setup>Change Data Capture add the following if not yet added.
· Gateway Transaction (PosiPay__GatewayTransaction__c)
· Bank Statement Line (PosiPay__BankStatementLine__c)