#jcrivello
1 messages · Page 1 of 1 (latest)
% curl https://api.stripe.com/v1/payment_intents
-u sk_test_REDACT:
-d customer=cus_LxjWMr0ygf142L
-d amount=18000
-d currency=usd
-d "payment_method_types[]"=customer_balance
{
"id": "pi_3NjwM3AfsowYyDKQ1L5Aqhsn",
"object": "payment_intent",
"amount": 18000,
"amount_capturable": 0,
"amount_details": {
"tip": {}
},
"amount_received": 0,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "automatic",
"charges": {
"object": "list",
"data": [],
"has_more": false,
"total_count": 0,
"url": "/v1/charges?payment_intent=pi_3NjwM3AfsowYyDKQ1L5Aqhsn"
},
"client_secret": "pi_3NjwM3AfsowYyDKQ1L5Aqhsn_secret_mDHPv8vWN4LFibd4Rklf0fYT9",
"confirmation_method": "automatic",
"created": 1693194187,
"currency": "usd",
"customer": "cus_LxjWMr0ygf142L",
"description": null,
"invoice": null,
"last_payment_error": null,
"latest_charge": null,
"livemode": false,
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": null,
"payment_method_options": {
"customer_balance": {
"funding_type": null
}
},
"payment_method_types": [
"customer_balance"
],
"processing": null,
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"status": "requires_payment_method",
"transfer_data": null,
"transfer_group": null
}
% curl -X POST https://api.stripe.com/v1/payment_intents/pi_3NjwM3AfsowYyDKQ1L5Aqhsn/apply_customer_balance
-u sk_test_REDACTED:
-d amount=18000
-d currency=usd
{
"error": {
"message": "The PaymentMethod provided () is not allowed for this endpoint. Customer balance can only be applied to PaymentIntents that have customer_balance PaymentMethods attached.",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_DWO8GR2aVaK0NB?t=1693194221",
"type": "invalid_request_error"
}
}
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
In https://dashboard.stripe.com/test/logs/req_0k1Gwxr3GUqPEr, you only specified payment_method_types as customer_balance. For US bank transfer, payment_method_data and payment_method_options should be set as well: https://stripe.com/docs/payments/bank-transfers/accept-a-payment?platform=web&invoices=without&country=US#element-create-payment-intent