Use OFFER OID and products fields to create a Stripe payment intent.
|
API token
|
|
|
output
|
|
|
Quote oid
|
|
|
Products
|
|
| Parameter | Type | Reqd | Description | Options |
|---|---|---|---|---|
| offer_oid | string | • | Quote oid | |
| products | text | Products |
| Parameter | Type | Description |
|---|---|---|
| status | integer | Status |
| response | array | Payment intent |
| response.payment_intent | array | Payment intent properties |
Json request example
{
"ajax_url": "/api/offer/createpaymentintent",
"output": "json",
"offer_oid": "10311080",
"products": {"combined": ["core", "legal_protection", "personal_possessions", "home_emergency", "ad"]}
}
Json response example
{
"status": "1",
"response": {
"payment_intent": {
"id": "pi_1JIxLGGISb0W1KPizyaY3P0b",
"object": "payment_intent",
"allowed_source_types": [
"card"
],
"amount": 12751,
"amount_capturable": 0,
"amount_received": 0,
"application": null,
"application_fee_amount": 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_1JIxLGGISb0W1KPizyaY3P0b"
},
"client_secret": "pi_1JIxLGGISb0W1KPizyaY3P0b_secret_Nnu1lJt79Drl8n1wFeivDeqxB",
"confirmation_method": "automatic",
"created": 1627657782,
"currency": "gbp",
"customer": null,
"description": "Payment intent for quote: ",
"invoice": null,
"last_payment_error": null,
"livemode": false,
"metadata": [],
"next_action": null,
"next_source_action": null,
"on_behalf_of": null,
"payment_method": null,
"payment_method_options": {
"card": {
"installments": null,
"network": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"status": "requires_source",
"transfer_data": null,
"transfer_group": null
}
},
"apirequest_oid": "10311100"
}