POST /estimates/gift_subscription_for_items
This endpoint generates an estimate for a subscription that is intended to be a gift. The estimate provides details about the gift sender, gift recipient, address details of the recipient, and the type and details of subscription items included in the gift.
Servers
- {protocol}://{site}.{environment}:{port}/api/v2
- {protocol}://{site}-test.{environment}:{port}/api/v2
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:
|
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:
|
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-event-email |
String | No |
skip only emails Possible values:
|
Request body fields
Name | Type | Required | Description |
---|---|---|---|
shipping_address |
Object | No |
Parameters for shipping_address |
shipping_address.first_name |
String | No |
The first name of the contact. |
shipping_address.state |
String | No |
The state/province name. Is set by Chargebee automatically for US, Canada and India If |
shipping_address.city |
String | No |
The name of the city. |
shipping_address.validation_status |
String | No |
The address verification status. * partially_valid - The address is valid for taxability but has not been validated for shipping. * invalid - Address is invalid. * not_validated - Address is not yet validated. * valid - Address was validated successfully. Possible values:
Default value: "not_validated" |
shipping_address.line2 |
String | No |
Address line 2 |
shipping_address.line1 |
String | No |
Address line 1 |
shipping_address.email |
String | No |
The email address. |
shipping_address.last_name |
String | No |
The last name of the contact. |
shipping_address.company |
String | No |
The company name. |
shipping_address.line3 |
String | No |
Address line 3 |
shipping_address.state_code |
String | No |
The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set |
shipping_address.zip |
String | No |
Zip or postal code. The number of characters is validated according to the rules specified here. |
shipping_address.phone |
String | No |
The phone number. |
shipping_address.country |
String | No |
The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code. Note : If you enter an invalid country code, the system will return an error. Brexit If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then |
gift |
Object | No |
Parameters for gift |
gift.no_expiry |
Boolean | No |
When |
gift.claim_expiry_date |
Integer | No |
The date until which the gift can be claimed. Must be set to a value after |
gift.scheduled_at |
Integer | No |
Indicates the date on which the gift notification is sent to the receiver. If not passed, the receiver is notified immediately. |
gift.auto_claim |
Boolean | No |
When Default value: false |
payment_intent |
Object | No |
Parameters for payment_intent |
payment_intent.id |
String | No |
Identifier for PaymentIntent generated by Chargebee.js. Applicable only when you are using Chargebee.js for completing the 3DS flow. The PaymentIntent should be in 'authorized' state while passing it here. You need not pass other PaymentIntent parameters if this is passed. |
payment_intent.gateway_account_id |
String | No |
The gateway account used for performing the 3DS flow. |
payment_intent.payment_method_type |
String | No |
The list of payment method types (For example, card, ideal, sofort, bancontact, etc.) this Payment Intent is allowed to use. If payment method type is empty, Card is taken as the default type for all gateways except Razorpay. * card - card * netbanking_emandates - netbanking_emandates * dotpay - dotpay * faster_payments - Faster Payments * upi - upi * direct_debit - direct_debit * sepa_instant_transfer - Sepa Instant Transfer * bancontact - bancontact * google_pay - google_pay * apple_pay - apple_pay * giropay - giropay * paypal_express_checkout - paypal_express_checkout * venmo - Venmo * klarna_pay_now - Klarna Pay Now * sofort - sofort * amazon_payments - Amazon Payments * ideal - ideal * pay_to - PayTo * boleto - boleto Possible values:
|
payment_intent.additional_information |
Object | No |
* `checkout_com`: While adding a new payment method using [permanent token](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). * `payer`: User related information. * `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes). * `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. * `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. * `fraud`: Fraud identification related information. * `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. * `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. * `fraud`: Fraud identification related information. * `device_session_id`: Session ID associated with the user's device. * `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. * `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions. * `fraud`: Fraud identification related information. * `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. * `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions. * `fraud`: Fraud identification related information. * `device_session_id`: Session ID associated with the user's device. * `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. * `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted. * `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. * `payer`: User related information. * `document`: Document is the user's identification number based on their country. * `fraud`: Fraud identification related information. * `device_session_id`: Session ID associated with the user's device |
payment_intent.gw_token |
String | No |
Identifier for 3DS transaction/verification object at the gateway. Can be passed only after successfully completing the 3DS flow. Refer 3DS implementation in Chargebee to find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow. |
payment_intent.reference_id |
String | No |
Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow. |
gifter |
Object | No |
Parameters for gifter |
gifter.signature |
String | Yes |
Gifter sign-off name |
gifter.customer_id |
String | Yes |
Gifter customer id. |
gifter.note |
String | No |
Personalized message for the gift. |
gifter.payment_src_id |
String | No |
Identifier of the payment source |
subscription_items |
Object | No |
Parameters for subscription_items |
subscription_items.item_price_id[] |
Array | No |
The unique identifier of the item price. |
subscription_items.quantity[] |
Array | No |
The quantity of the item purchased |
subscription_items.quantity_in_decimal[] |
Array | No |
The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when multi-decimal pricing is enabled. |
coupon_ids[] |
Array | No |
List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes. |
gift_receiver |
Object | No |
Parameters for gift_receiver |
gift_receiver.customer_id |
String | Yes |
Receiver customer id. |
gift_receiver.email |
String | Yes |
Email of the receiver. All gift related emails are sent to this email. |
gift_receiver.last_name |
String | Yes |
Last name of the receiver as given by the gifter, |
gift_receiver.first_name |
String | Yes |
First name of the receiver as given by the gifter. |
How to start integrating
- Add HTTP Task to your workflow definition.
- 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.
- Click Test request to test run your request to the API and see the API's response.