Charge_PaymentModel is a record of a specific payment against a
Each Payment model relates to a single payment event. If the original Charge was a one-time payment, there will only be a single payment model related to a Charge. If the Charge was recurring, each time the plan recurs a new payment model record will be created.
Make sure your web hooks are configured Recurring records of payments requires web hook callbacks from Charge. Without it, Charge can't see later payments made on recurring charges.
You'd access a payment via the parent charge, not directly. Payments for a charge are all available via the charge's
- The id for the payment.
- The stripe id for the payment.
- The id of the Charge Customer for this payment.
- The id of the parent Charge model for this payment.
- The id of the craft user for this payment.
- The mode this payment was made under.
- The numeric amount for this payment. Will return similar to '5' for a $5 payment.
- The integer value for the payment in pence/cents. Will return similar to '500' for a $5 payment.
- A nicely formatted version of the payment amount, including the currency. Will return similar to '$5.00' for a $5 payment.
- A nicely formatted version of the payment card details, as best they are available. This combines the card last 4 digits, card type, and intelligently includes spacing characters. Will return similar to
···· ···· ···· 4242.
- The payment card type. ie.
- The payment card expiry month, i.e.
- The payment card expiry year. ie.
- The supplied cardholder name. This is optional and might be blank.
- Card address details. All are optional and might be blank. Don't rely on these for shipping address information. These specifically relate to the card billing address, and if supplied are used for fraud detection, not shipping address collection.
- The currency code for the payment. ie.
- A bool that indicates the state of a refund on a charge. Only returns
true if the payment is fully refunded. If only partially refunded, it will still return
- The amount that has been refunded on a payment.
- The stripe invoice id that was used during the creation of this payment.
- The status of a payment. Can be
failed. For the moment, this will always be
succeeded in Charge.
- The email that any receipt for the payment was sent to.
- Returns a ready to use url for linking directly to a specific stripe payment in the Stripe dashboard. This is useful for admin areas, or admin emails. Will return a url similar to :