Hello,
I am unable to pull the status of an ACH payment via the API.
I am creating the charge successfully as follows:
chargeDetails = stripe.Charge.create(
amount=total_inv_amount_cents,
currency="usd",
description=inv_description,
application_fee=agg_claim_amount_cents,
source=chargeToken,
stripe_account=seller_stripe_details.stripe_user_id
)
CHARGE DETAILS
(Pdb) chargeDetails
<Charge charge id=py_19aJvnGVSJlmBwscYPWGQhIN at 0x96127e8> JSON: {
"amount": 101750,
"amount_refunded": 0,
"application": "ca_9qLPd2LPRduB1z15gqlGuqKFhUMyf2uk",
"application_fee": "fee_9u8C4T8agepdfb",
"balance_transaction": "txn_19aJvnGVSJlmBwscFLjlSbsz",
"captured": true,
"created": 1484032831,
"currency": "usd",
"customer": null,
"description": "Delivery dated: 2017-01-10. ",
"destination": null,
"dispute": null,
"failure_code": null,
"failure_message": null,
"fraud_details": {},
"id": "py_19aJvnGVSJlmBwscYPWGQhIN",
"invoice": null,
"livemode": false,
"metadata": {},
"object": "charge",
"order": null,
"outcome": {
"network_status": "approved_by_network",
"reason": null,
"risk_level": "not_assessed",
"seller_message": "Payment complete.",
"type": "authorized"
},
"paid": false,
"receipt_email": null,
"receipt_number": null,
"refunded": false,
"refunds": {
"data": [],
"has_more": false,
"object": "list",
"total_count": 0,
"url": "/v1/charges/py_19aJvnGVSJlmBwscYPWGQhIN/refunds"
},
"review": null,
"shipping": null,
"source": {
"account_holder_name": "Avran TEst",
"account_holder_type": "company",
"bank_name": "STRIPE TEST BANK",
"country": "US",
"currency": "usd",
"customer": null,
"fingerprint": "xPoVfiqSCXQQhAMC",
"id": "ba_19aJvbGVSJlmBwsch9I3W40J",
"last4": "6789",
"metadata": {},
"object": "bank_account",
"routing_number": "110000000",
"status": "verified"
},
"source_transfer": null,
"statement_descriptor": null,
"status": "pending"
}
The charge ID
(Pdb) chargeDetails.id
u'py_19aJvnGVSJlmBwscYPWGQhIN'
Retriging the charge details throws an error
(Pdb) stripe.Charge.retrieve(chargeDetails.id)
[INFO 2017-01-10 13:05:10,352] util.py [:98] log_info: Request to Stripe api
[DEBUG 2017-01-10 13:05:10,354] util.py [:92] log_debug: Post details
[INFO 2017-01-10 13:05:10,357] connectionpool.py [:805] _new_conn: Starting new HTTPS connection (1
[DEBUG 2017-01-10 13:05:11,665] connectionpool.py [:401] _make_request: "GET /v1/charges/py_19aJvnG
[INFO 2017-01-10 13:05:11,671] util.py [:98] log_info: Stripe API response
[DEBUG 2017-01-10 13:05:11,673] util.py [:92] log_debug: API response body
[DEBUG 2017-01-10 13:05:11,673] util.py [:92] log_debug: Dashboard link for request
[INFO 2017-01-10 13:05:11,674] util.py [:98] log_info: Stripe API error received
*** InvalidRequestError: Request req_9u8Qp2SVvvelnu: No such charge: py_19aJvnGVSJlmBwscYPWGQhIN
I am able to do a refund on the same ID (py_19aJvnGVSJlmBwscYPWGQhIN) so I'm unsure why I cant retrieve the status of the payment.
An ACH payment is set to 'pending' until the payment is complete and we would like to check for the status of this payment. Any help in doing so would be appreciated.
Thank you,
Avran