Payment Intent to save card after payment from a BBpos not working

335 views
Skip to first unread message

Dinobi Kenkwo

unread,
Jul 13, 2022, 1:38:41 PM7/13/22
to Stripe API Discussion
Hi there,

I'm currently trying to save credit card for future payment from a terminal hardware using the PaymentIntent API (Ruby) and for some reason after the charge is processed successfully; contrary to what the documentation says, the generated_card attribute on the Charge object is null.

Here is an example of request I sent:

Stripe::PaymentIntent.create(
    amount: amount,
    currency: currency,
    capture_method: "manual",
    on_behalf_of: acct_id,
    statement_descriptor: statement_descrptor,
    application_fee_amount: fee,
    payment_method_type: ["card_present"],
    setup_future_usage: "off_session",
    customer: cust_id,
)

In the payment timeline on the Stripe dashboard I see the line that says: This payment successfully set up pm_xxxx for future off-session payments, and after the resulting charge is successful, I don't see any generated_card, and also when I check the customer payment methods, it does not show that the payment method was attached.

I don't know if I am missing anything, but I would really appreciate it if I can get some assistance here.

Thanks in anticipation.

Remi J.

unread,
Jul 13, 2022, 3:50:11 PM7/13/22
to api-d...@lists.stripe.com
Hello,

The code you share seems correct and as long as you pass both `setup_future_usage` and `customer` we will attempt to save the card details after a successful payment which is what we document [1]. If the card isn't saving, it's usually because you're using a wallet like Apple Pay or Google Pay otherwise it should save.

We can't really debug this live over a public email list so I'd recommend either contacting our support team [2] or using our public Discord server [3] to ask for help on that specific attempt.

Best,
Remi


--
To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss...@lists.stripe.com.
Reply all
Reply to author
Forward
0 new messages