I want to clarify if it's possible to change the amount to be charged on a capture_transaction call. Say on charge endpoint I authorize a $5 and delayed the capture, but when capturing transaction I only want to charge the customer $4.
From reading the docs, it doesn't really provide any parameter to change the amount. Is there any way to do this?
https://github.com/square/connect-python-sdk/blob/master/docs/TransactionsApi.md#endpoint-charge
Currently there is no way to do this. You cannot edit a transaction (even if it's set to delay_capture
) after it's created.
Your best bet would be saving the card on file (using CreateCustomerCard
) and then charging the card at a later date for whatever amount you need.
Save cards on file: https://docs.connect.squareup.com/payments/transactions/cookbook/save-cards-on-file
Charge cards on file: https://docs.connect.squareup.com/payments/transactions/cookbook/charge-cards-on-file