- Getting Started
- Auth
- Carts
- Create Payment SessionsPOST
- Refresh a Payment SessionPOST
- Create a CartPOST
- Complete a CartPOST
- Select a Payment SessionPOST
- Delete a Payment SessionDELETE
- Update a Payment SessionPOST
- Get a CartGET
- Update a CartPOST
- Add Shipping MethodPOST
- Update a Line ItemPOST
- Delete a Line ItemDELETE
- Add a Line ItemPOST
- Calculate Cart TaxesPOST
- Remove DiscountDELETE
- Customers
- Gift Cards
- Orders
- Order Edits
- Payment Collections
- Products
- Product Variants
- Product Tags
- Product Categories
- Product Collections
- Product Types
- Regions
- Returns
- Return Reasons
- Shipping Options
- Swaps
Update a Payment Session
POST
/store/carts/{id}/payment-sessions/{provider_id}
Carts
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.medusa-commerce.com/store/carts//payment-sessions/' \
--header 'Content-Type: application/json' \
--data-raw ''
Response Response Example
200 - Example 1
Request
Path Params
id
stringÂ
required
provider_id
stringÂ
required
Body Params application/json
data
objectÂ
required
Examples
Responses
🟢200OK
application/json
Body
The cart's details.
cart
object (Cart)Â
required
id
stringÂ
required
Example:
cart_01G8ZH853Y6TFXWPG5EYE81X63
email
string <email> | nullÂ
required
billing_address_id
string  | nullÂ
required
Example:
addr_01G8ZH853YPY9B94857DY91YGW
shipping_address_id
string  | nullÂ
required
Example:
addr_01G8ZH853YPY9B94857DY91YGW
region_id
stringÂ
required
Example:
reg_01G1G5V26T9H8Y0M4JNE3YGA4G
customer_id
string  | nullÂ
required
Example:
cus_01G2SG30J8C85S4A5CHM2S1NS2
customer
object  | nullÂ
optional
payment_session
object  | nullÂ
required
payment_id
string  | nullÂ
required
Example:
pay_01G8ZCC5W42ZNY842124G7P5R9
payment
object  | nullÂ
optional
completed_at
string <date-time> | nullÂ
required
payment_authorized_at
string <date-time> | nullÂ
required
sales_channel_id
string  | nullÂ
optional
Example:
null
created_at
string <date-time>
required
updated_at
string <date-time>
required
deleted_at
string <date-time> | nullÂ
required
shipping_total
integerÂ
optional
Example:
1000
discount_total
integerÂ
optional
Example:
800
raw_discount_total
integerÂ
optional
Example:
800
item_tax_total
integerÂ
optional
Example:
8000
shipping_tax_total
integerÂ
optional
Example:
1000
tax_total
integerÂ
optional
Example:
0
refunded_total
integerÂ
optional
Example:
0
total
integerÂ
optional
Example:
8200
subtotal
integerÂ
optional
Example:
8000
refundable_amount
integerÂ
optional
Example:
8200
gift_card_total
integerÂ
optional
Example:
0
gift_card_tax_total
integerÂ
optional
Example:
0
payment_sessions
array [object]Â
optional
type
enum<string>Â
required
Allowed values:
defaultswapdraft_orderpayment_linkclaim
Default:
default
idempotency_key
string  | nullÂ
required
context
object  | nullÂ
required
Example:
{"ip":"::1","user_agent":"PostmanRuntime/7.29.2"}
metadata
object  | nullÂ
required
Example:
{"car":"white"}
billing_address
object (Address)Â
optional
sales_channel
object (Sales Channel)Â
optional
shipping_address
object (Address)Â
optional
shipping_methods
array[object (Shipping Method) {20}]Â
optional
region
object (Region)Â
optional
gift_cards
array[object (Gift Card) {15}]Â
optional
discounts
array[object (Discount) {18}]Â
optional
items
array[object (Line Item) {42}]Â
optional
🟠400Client Error or Multiple Errors
🟠404Not Found Error
🟠409Invalid State Error
🟠422Invalid Request Error
🔴500Server Error
Modified at 2023-11-27 13:05:07