POST /payment_intents

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.

Customer resource lookup and creation {#customer_lookup}

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.

Multiple business entities

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.

Servers

Request headers

Name Type Required Description
chargebee-request-origin-device String No

The device from which the customer has made the request

Content-Type String Yes The media type of the request body.

Default value: "application/x-www-form-urlencoded"

chargebee-event-webhook String No

skip only webhooks

Possible values:

  • "all-disabled"
chargebee-business-entity-id String No

If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.

chargebee-event-actions String No

skip all actions to be done on the events

Possible values:

  • "all-disabled"
chargebee-request-origin-user String No

The email address of your customer/user. Use this when the email address has only ASCII characters.

chargebee-request-origin-ip String No

The IP address of the customer where the request originated

chargebee-request-origin-user-encoded String No

The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.

chargebee-event-email String No

skip only emails

Possible values:

  • "all-disabled"

Request body fields

Name Type Required Description
customer_id String No

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.
See also

Customer resource lookup and creation .

success_url String No

The URL the customer will be directed to once 3DS verification is successful. Applicable only when payment_method_type is ideal, sofort, dotpay or giropay.

currency_code String Yes

The currency code (ISO 4217 format) of the amount used in transaction.

amount Integer Yes

Amount(in cents) to be authorized for 3DS flow.

gateway_account_id String No

The gateway account used for performing the 3DS flow.

business_entity_id String No

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.
Note

An alternative way of passing this parameter is by means of a custom HTTP header.
See also

Customer resource lookup and creation.

payment_method_type String No

The payment method of this intent. * google_pay - google_pay * boleto - boleto * apple_pay - apple_pay * faster_payments - Faster Payments * klarna_pay_now - Klarna Pay Now * ideal - ideal * amazon_payments - Amazon Payments * bancontact - bancontact * netbanking_emandates - netbanking_emandates * pay_to - PayTo * venmo - Venmo * card - card * dotpay - dotpay * giropay - giropay * upi - upi * sofort - sofort * sepa_instant_transfer - Sepa Instant Transfer * direct_debit - direct_debit * paypal_express_checkout - paypal_express_checkout

Possible values:

  • "bancontact"
  • "upi"
  • "amazon_payments"
  • "online_banking_poland"
  • "direct_debit"
  • "sofort"
  • "boleto"
  • "netbanking_emandates"
  • "giropay"
  • "paypal_express_checkout"
  • "apple_pay"
  • "pay_to"
  • "venmo"
  • "payconiq_by_bancontact"
  • "card"
  • "klarna_pay_now"
  • "dotpay"
  • "faster_payments"
  • "sepa_instant_transfer"
  • "google_pay"
  • "ideal"

Default value: "card"

failure_url String No

The URL the customer will be directed to when 3DS verification fails. Applicable only when payment_method_type is ideal, sofort, dotpay or giropay.

reference_id String No

Reference for payment method at gateway. Only applicable when the PaymentIntent is created for cards stored in the gateway.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.