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

Create a Payment Session

POST
/store/payment-collections/{id}/sessions
Payment Collections
Create a Payment Session for a payment provider in a Payment Collection.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST '{{BASE_URL}}/store/payment-collections//sessions' \
--header 'Content-Type: application/json' \
--data-raw '{
    "provider_id": "string"
}'
Response Response Example
200 - Example 1

Request

Path Params
id
string 
required
The ID of the Payment Collection.
Body Params application/json
provider_id
string 
required
The ID of the Payment Provider.
Examples

Responses

🟢200OK
application/json
Body
The payment collection's details.
payment_collection
object (Payment Collection) 
required
A payment collection allows grouping and managing a list of payments at one. This can be helpful when making additional payment for order edits or integrating installment payments.
id
string 
required
The payment collection's ID
Example:
paycol_01G8TJSYT9M6AVS5N4EMNFS1EK
description
string  | null 
required
Description of the payment collection
amount
integer 
required
Amount of the payment collection.
authorized_amount
integer  | null 
required
Authorized amount of the payment collection.
region_id
string 
required
The ID of the region this payment collection is associated with.
Example:
reg_01G1G5V26T9H8Y0M4JNE3YGA4G
created_by
string 
required
The ID of the user that created the payment collection.
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.
deleted_at
string <date-time> | null 
required
The date with timezone at which the resource was deleted.
type
enum<string> 
required
The type of the payment collection
Allowed value:
order_edit
status
enum<string> 
required
The type of the payment collection
Allowed values:
not_paidawaitingauthorizedpartially_authorizedcanceled
currency_code
string 
required
The three character ISO code for the currency this payment collection is associated with.
Example:
usd
metadata
object  | null 
required
An optional key-value map with additional details
Example:
{"car":"white"}
currency
object (Currency) 
optional
Currency
payments
array[object (Payment) {19}] 
optional
The details of the payments created as part of the payment collection.
region
object (Region) 
optional
A region holds settings specific to a geographical location, including the currency, tax rates, and fulfillment and payment providers. A Region can consist of multiple countries to accomodate common shopping settings across countries.
payment_sessions
array[object (Payment Session) {13}] 
optional
The details of the payment sessions created as part of the payment collection.
🟠400Client Error or Multiple Errors
🟠401User is not authorized. Must log in first
🟠404Not Found Error
🟠409Invalid State Error
🟠422Invalid Request Error
🔴500Server Error
Modified at 2023-11-27 13:05:07
Previous
Manage Payment Sessions
Next
Search Products
Built with