A payment_intent
is created to help you navigate the 3DS flow of collecting payment from your customer. It is necessary only for implementing 3DS flow using Chargebee.js.
All payment_intent
s with status
as inited
, in_progress
or authorized
become expired
after an hour automatically.
{
"amount": 5000,
"created_at": 1517501515,
"currency_code": "USD",
"expires_at": 1517503315,
"gateway": "chargebee",
"gateway_account_id": "gw___test__KyVnGlSBWTQeudG",
"id": "__test__KyVnHhSBWTQz2Cu__test__0DZayCQMcAwDkEIPpUrGwkiyL25s7W1X",
"modified_at": 1517501515,
"object": "payment_intent",
"payment_method_type": "card",
"status": "inited"
}
payment_method_type
is ideal
, sofort
, dotpay
or giropay
. payment_method_type
is ideal
, sofort
, dotpay
or giropay
. resource_version
is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28. The unique identifier of the customer for whom the payment_intent
will be created. If specified, the payment_intent
will be used exclusively for that customer. If not specified, the payment_intent
won’t be associated with any customer and will be available for any customer.
payment_intent
payment_method_type
is ideal
, sofort
, dotpay
or giropay
. payment_method_type
is ideal
, sofort
, dotpay
or giropay
. resource_version
is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28. The unique identifier of the customer for whom the payment_intent
will be created. If specified, the payment_intent
will be used exclusively for that customer. If not specified, the payment_intent
won’t be associated with any customer and will be available for any customer.
payment_intent
Creates a PaymentIntent object. This is to be used with Chargebee.js API to complete the 3DS flow for new or stored cards.
While creating, specify the appropriate gateway account and amount. Exact amount can be estimated using our Estimate API.
When customer[id]
is provided for this operation, it is looked up by Chargebee, and if found, the payment_intent is created for it. If not found, the payment_intent
is created without any customer association and will be available for any customer.
If multiple business entities are created for the site, the customer resource lookup and creation happen within the context of the business entity specified in this API call. If no business entity is specified, the customer resource lookup is performed within the site context, and if not found, the resource is created for the default business entity of the site.
Only for Java
curl https://{site}.chargebee.com/api/v2/payment_intents \ -u {site_api_key}:\ -d amount=5000 \ -d currency_code="USD"
{ "payment_intent": { "amount": 5000, "created_at": 1517501515, "currency_code": "USD", "expires_at": 1517503315, "gateway": "chargebee", "gateway_account_id": "gw___test__KyVnGlSBWTQeudG", "id": "__test__KyVnHhSBWTQz2Cu__test__0DZayCQMcAwDkEIPpUrGwkiyL25s7W1X", "modified_at": 1517501515, "object": "payment_intent", "payment_method_type": "card", "status": "inited" } }
Sets the context for this operation to the business entity specified. Applicable only when multiple business entities have been created for the site. When this parameter is provided, the operation is able to read/write data associated only to the business entity specified. When not provided, the operation can read/write data for the entire site.
An alternative way of passing this parameter is by means of a custom HTTP header.
The unique identifier of the customer for whom the payment_intent
will be created. If specified, the payment_intent
will be used exclusively for that customer. If not specified, the payment_intent
won’t be associated with any customer and will be available for any customer.
Customer resource lookup and creation
.payment_method_type
is ideal
, sofort
, dotpay
or giropay
. payment_method_type
is ideal
, sofort
, dotpay
or giropay
. Updating properties on a PaymentIntent object. All the subsequent 3DS transaction attempts will have the updated values.
Only for Java
curl https://{site}.chargebee.com/api/v2/payment_intents/__test__KyVnHhSBWTR3ZCw__test__6AP6PXGBruIztRxpb4L0Si0Rihcur2fil \ -u {site_api_key}:\ -d amount=4000 \ -d currency_code="USD"
{ "payment_intent": { "amount": 4000, "created_at": 1517501515, "currency_code": "USD", "expires_at": 1517503315, "gateway": "chargebee", "gateway_account_id": "gw___test__KyVnGlSBWTQeudG", "id": "__test__KyVnHhSBWTR3ZCw__test__6AP6PXGBruIztRxpb4L0Si0Rihcur2fil", "modified_at": 1517501515, "object": "payment_intent", "payment_method_type": "card", "status": "inited" } }
payment_method_type
is ideal
, sofort
, dotpay
or giropay
. payment_method_type
is ideal
, sofort
, dotpay
or giropay
. Retrieves the PaymentIntent resource.
Only for Java
curl https://{site}.chargebee.com/api/v2/payment_intents/__test__KyVnHhSBWTR1HCv__test__5COaMLU3JrmJkDQKOFQqcdOocdusvy0UBl \ -u {site_api_key}:
{ "payment_intent": { "amount": 5000, "created_at": 1517501515, "currency_code": "USD", "expires_at": 1517503315, "gateway": "chargebee", "gateway_account_id": "gw___test__KyVnGlSBWTQeudG", "id": "__test__KyVnHhSBWTR1HCv__test__5COaMLU3JrmJkDQKOFQqcdOocdusvy0UBl", "modified_at": 1517501515, "object": "payment_intent", "payment_method_type": "card", "status": "inited" } }