Transaction¶
-
class
altapay.
Transaction
(version=None, header=None, body=None, api=None)¶ Bases:
altapay.resource.Resource
-
capture
(**kwargs)¶ Capture a reservation on a transaction.
Parameters: **kwargs – used for optional capture parameters, see the AltaPay documentation for a full list. Note that you will need to use lists and dictionaries to map the URL structures from the AltaPay documentation into these kwargs. Return type: altapay.Callback
object.
-
charge_subscription
(**kwargs)¶ This will charge a subscription using a capture. Can be called many times on a subscription.
If amount is not sent as an optinal parameter, the amount specified in the original setup of the subscription will be used.
Parameters: **kwargs – used for optional charge subscription parameters, see the AltaPay documentation for a full list. Note that you will need to use lists and dictionaries to map the URL structures from the AltaPay documentation into these kwargs. Return type: altapay.Callback
object.
-
classmethod
find
(transaction_id, api)¶ Find exactly one transaction by a transaction ID.
Parameters: - transaction_id – ID of the transaction in AltaPay
- api – An API object which will be used for AltaPay communication.
Return type:
-
refund
(**kwargs)¶ Refund full or partial payments on an order.
Parameters: **kwargs – used for optional refund parameters, see the AltaPay documentation for a full list. Note that you will need to use lists and dictionaries to map the URL structures from the AltaPay documentation into these kwargs. Return type: altapay.Callback
object.
-
release
()¶ This will release the reservation on the transaction. This is useful if you for whatever reason do not want to capture the payment.
Refer to the AltaPay documentation for edge cases surround this method.
Return type: altapay.Callback
object.
-
reserve_subscription_charge
(**kwargs)¶ This will create a reservation on a subscription. Can be called many times on a subscription.
If amount is not sent as an optinal parameter, the amount specified in the original setup of the subscription will be used.
Parameters: **kwargs – used for optional reserve subscription parameters, see the AltaPay documentation for a full list. Note that you will need to use lists and dictionaries to map the URL structures from the AltaPay documentation into these kwargs. Return type: altapay.Callback
object.
-