Update a Payment Intent on a Cart
PUThttps://useast.api.elasticpath.com/v2/carts/:cartID/payments/:paymentIntentID
Updates the payment information for a specific payment intent on a cart.
Request
Path Parameters
cartID stringrequired
The unique identifier of the cart.
paymentIntentID stringrequired
The unique identifier of the payment intent.
- application/json
Bodyrequired
data objectrequired
Responses
- 200
Payment updated successfully
- application/json
- Schema
- Example (auto)
Schema
idstring
The unique identifier for the cart. Use SDK or create it yourself.
typestring
The type of object being returned.
namestring
The name of this cart.
descriptionstring
A description of the cart.
contact object
discount_settings object
inventory_settings object
payment_intent_idstring
Stripe-assigned unique identifier for the linked Payment Intent
custom_attributesobject
Specifies custom attributes for cart or order objects. Each attribute includes a top-level key, as well as corresponding type and value entries. Attribute values must correspond to the assigned types.
Example:
"custom_attributes": {
"is_member": {
"type": "boolean",
"value": true
},
"membership_level": {
"type": "string",
"value": "premium"
}
}
links object
meta object
relationships object
{
"id": "string",
"type": "string",
"name": "string",
"description": "string",
"contact": {
"email": "user@example.com"
},
"discount_settings": {
"custom_discounts_enabled": true,
"use_rule_promotions": true
},
"inventory_settings": {
"defer_inventory_check": true
},
"payment_intent_id": "string",
"custom_attributes": {},
"links": {
"self": "string"
},
"meta": {
"display_price": {
"with_tax": {
"amount": 0,
"currency": "string",
"formatted": "string"
},
"without_tax": {
"amount": 0,
"currency": "string",
"formatted": "string"
},
"tax": {
"amount": 0,
"currency": "string",
"formatted": "string"
},
"discount": {
"amount": 0,
"currency": "string",
"formatted": "string"
},
"without_discount": {
"amount": 0,
"currency": "string",
"formatted": "string"
},
"shipping": {
"amount": 0,
"currency": "string",
"formatted": "string"
}
},
"timestamps": {
"created_at": "2023-11-07T23:04:18.845Z",
"updated_at": "2023-11-07T23:04:18.845Z"
}
},
"relationships": {
"customers": {
"data": [
{
"type": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
]
},
"items": {
"data": [
{
"type": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
]
},
"accounts": {
"data": [
{
"type": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
]
},
"custom_discounts": {
"data": [
{
"type": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
]
},
"promotions": {
"data": [
{
"type": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
]
}
}
}
Authorization: http
name: bearerAuthtype: httpscheme: bearer
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://useast.api.elasticpath.com/v2/carts/:cartID/payments/:paymentIntentID");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"gateway\": \"string\",\n \"method\": \"string\",\n \"payment_method_types\": [\n \"string\"\n ],\n \"amount\": 0,\n \"options\": {}\n }\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear