Medusa
Store APIAdmin API
Store APIAdmin API
Discord
Twitter
Linkedin
Github
  1. Payment Collections
  • Getting Started
    • Introduction
    • Authentication
    • HTTP Compression
    • Publishable API Key
    • Expanding Fields
    • Selecting Fields
    • Query Parameter Types
    • Pagination
  • Auth
    • Customer Login (JWT)
      POST
    • Customer Login (JWT)
      POST
    • Check if Email Exists
      GET
    • Get Current Customer
      GET
    • Customer Log out
      DELETE
    • Customer Login
      POST
  • Carts
    • Create Payment Sessions
      POST
    • Refresh a Payment Session
      POST
    • Create a Cart
      POST
    • Complete a Cart
      POST
    • Select a Payment Session
      POST
    • Delete a Payment Session
      DELETE
    • Update a Payment Session
      POST
    • Get a Cart
      GET
    • Update a Cart
      POST
    • Add Shipping Method
      POST
    • Update a Line Item
      POST
    • Delete a Line Item
      DELETE
    • Add a Line Item
      POST
    • Calculate Cart Taxes
      POST
    • Remove Discount
      DELETE
  • Customers
    • Request Password Reset
    • Get Saved Payment Methods
    • Add a Shipping Address
    • Update Customer
    • Get a Customer
    • Update a Shipping Address
    • Delete an Address
    • Create a Customer
    • Reset Password
    • List Orders
  • Gift Cards
    • Get Gift Card by Code
  • Orders
    • Claim Order
    • Verify Order Claim
    • Get an Order
    • Look Up an Order
    • Get by Cart ID
  • Order Edits
    • Complete an Order Edit
    • Retrieve an Order Edit
    • Decline an Order Edit
  • Payment Collections
    • Authorize Payment Session
      POST
    • Authorize Payment Sessions
      POST
    • Refresh a Payment Session
      POST
    • Get a PaymentCollection
      GET
    • Manage Payment Sessions
      POST
    • Create a Payment Session
      POST
  • Products
    • Search Products
    • List Products
    • Get a Product
  • Product Variants
    • Get a Product Variant
    • Get Product Variants
  • Product Tags
    • List Product Tags
  • Product Categories
    • List Product Categories
    • Get a Product Category
  • Product Collections
    • Get a Collection
    • List Collections
  • Product Types
    • List Product Types
  • Regions
    • List Regions
    • Get a Region
  • Returns
    • Create Return
  • Return Reasons
    • List Return Reasons
    • Get a Return Reason
  • Shipping Options
    • List for Cart
    • Get Shipping Options
  • Swaps
    • Get by Cart ID
    • Create a Swap
  1. Payment Collections

Refresh a Payment Session

POST
/store/payment-collections/{id}/sessions/{session_id}
Payment Collections
Refresh a Payment Session's data to ensure that it is in sync with the Payment Collection.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST '{{BASE_URL}}/store/payment-collections//sessions/'
Response Response Example
200 - Example 1

Request

Path Params
id
string 
required
The id of the PaymentCollection.
session_id
string 
required
The id of the Payment Session to be refreshed.

Responses

🟢200OK
application/json
Body
payment_session
object (Payment Session) 
required
A Payment Session is created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, which is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for payment processing such as capture or refund. Payment sessions can also be used as part of payment collections.
id
string 
required
The payment session's ID
Example:
ps_01G901XNSRM2YS3ASN9H5KG3FZ
cart_id
string  | null 
required
The ID of the cart that the payment session was created for.
Example:
cart_01G8ZH853Y6TFXWPG5EYE81X63
provider_id
string 
required
The ID of the Payment Provider that is responsible for the Payment Session
Example:
manual
is_selected
boolean  | null 
required
A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.
Example:
true
is_initiated
boolean 
required
A flag to indicate if a communication with the third party provider has been initiated.
Default:
false
Example:
true
amount
integer  | null 
required
The amount that the Payment Session has been authorized for.
Example:
100
payment_authorized_at
string <date-time> | null 
required
The date with timezone at which the Payment Session was authorized.
created_at
string <date-time>
required
The date with timezone at which the resource was created.
updated_at
string <date-time>
required
The date with timezone at which the resource was updated.
status
enum<string> 
required
Indicates the status of the Payment Session. Will default to pending, and will eventually become authorized. Payment Sessions may have the status of requires_more to indicate that further actions are to be completed by the Customer.
Allowed values:
authorizedpendingrequires_moreerrorcanceled
Example:
pending
data
object 
required
The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.
Example:
{}
idempotency_key
string  | null 
required
Randomly generated key used to continue the completion of a cart in case of failure.
cart
object (Cart) 
optional
A cart represents a virtual shopping bag. It can be used to complete an order, a swap, or a claim.
🟠400Client Error or Multiple Errors
🟠404Not Found Error
🟠409Invalid State Error
🟠422Invalid Request Error
🔴500Server Error
Modified at 2023-11-27 13:05:07
Previous
Authorize Payment Sessions
Next
Get a PaymentCollection
Built with