{ "opencollection": "1.0.0", "info": { "name": "Admin Account / Address Payments API", "version": "v3" }, "items": [ { "info": { "name": "Payments", "type": "folder" }, "items": [ { "info": { "name": "List payments", "type": "http" }, "http": { "method": "GET", "url": "http://{defaultHost}/api/v3/admin/orders/:order_id/payments", "headers": [ { "name": "x-spree-api-key", "value": "" }, { "name": "Authorization", "value": "" } ], "params": [ { "name": "order_id", "value": "", "type": "path", "description": "Order ID" }, { "name": "expand", "value": "", "type": "query", "description": "Comma-separated associations to expand (e.g., payment_method, source). Use dot notation for nested expand (max 4 levels)." }, { "name": "fields", "value": "", "type": "query", "description": "Comma-separated list of fields to include (e.g., amount,status,number,response_code). id is always included." } ], "auth": { "type": "apikey", "key": "x-spree-api-key", "value": "{{x-spree-api-key}}", "placement": "header" } }, "docs": "Returns all payments for an order.\n\n**Required scope:** `read_payments` (for API-key authentication)." }, { "info": { "name": "Create a payment", "type": "http" }, "http": { "method": "POST", "url": "http://{defaultHost}/api/v3/admin/orders/:order_id/payments", "headers": [ { "name": "x-spree-api-key", "value": "" }, { "name": "Authorization", "value": "" } ], "params": [ { "name": "order_id", "value": "", "type": "path", "description": "Order ID" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "apikey", "key": "x-spree-api-key", "value": "{{x-spree-api-key}}", "placement": "header" } }, "docs": "Creates a new payment for the order.\n\n**Required scope:** `write_payments` (for API-key authentication)." }, { "info": { "name": "Show a payment", "type": "http" }, "http": { "method": "GET", "url": "http://{defaultHost}/api/v3/admin/orders/:order_id/payments/:id", "headers": [ { "name": "x-spree-api-key", "value": "" }, { "name": "Authorization", "value": "" } ], "params": [ { "name": "order_id", "value": "", "type": "path", "description": "Order ID" }, { "name": "id", "value": "", "type": "path", "description": "Payment ID" }, { "name": "expand", "value": "", "type": "query", "description": "Comma-separated associations to expand (e.g., payment_method, source). Use dot notation for nested expand (max 4 levels)." }, { "name": "fields", "value": "", "type": "query", "description": "Comma-separated list of fields to include (e.g., amount,status,number,response_code). id is always included." } ], "auth": { "type": "apikey", "key": "x-spree-api-key", "value": "{{x-spree-api-key}}", "placement": "header" } }, "docs": "Returns details of a specific payment.\n\n**Required scope:** `read_payments` (for API-key authentication)." }, { "info": { "name": "Capture a payment", "type": "http" }, "http": { "method": "PATCH", "url": "http://{defaultHost}/api/v3/admin/orders/:order_id/payments/:id/capture", "headers": [ { "name": "x-spree-api-key", "value": "" }, { "name": "Authorization", "value": "" } ], "params": [ { "name": "order_id", "value": "", "type": "path", "description": "Order ID" }, { "name": "id", "value": "", "type": "path", "description": "Payment ID" } ], "auth": { "type": "apikey", "key": "x-spree-api-key", "value": "{{x-spree-api-key}}", "placement": "header" } }, "docs": "Captures a pending payment.\n\n**Required scope:** `write_payments` (for API-key authentication)." }, { "info": { "name": "Void a payment", "type": "http" }, "http": { "method": "PATCH", "url": "http://{defaultHost}/api/v3/admin/orders/:order_id/payments/:id/void", "headers": [ { "name": "x-spree-api-key", "value": "" }, { "name": "Authorization", "value": "" } ], "params": [ { "name": "order_id", "value": "", "type": "path", "description": "Order ID" }, { "name": "id", "value": "", "type": "path", "description": "Payment ID" } ], "auth": { "type": "apikey", "key": "x-spree-api-key", "value": "{{x-spree-api-key}}", "placement": "header" } }, "docs": "Voids a payment.\n\n**Required scope:** `write_payments` (for API-key authentication)." }, { "info": { "name": "Return a list of Payments", "type": "http" }, "http": { "method": "GET", "url": "http://{defaultHost}/api/v2/platform/payments", "params": [ { "name": "page", "value": "1", "type": "query" }, { "name": "per_page", "value": "50", "type": "query" }, { "name": "include", "value": "payment_method,order,source", "type": "query", "description": "Select which associated resources you would like to fetch, see: https://jsonapi.org/format/#fetching-includes" }, { "name": "filter[payment_method_id_eq]", "value": "1", "type": "query" }, { "name": "filter[amount_gteq]", "value": "99.90", "type": "query" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Returns a list of Payments" }, { "info": { "name": "Return a Payment", "type": "http" }, "http": { "method": "GET", "url": "http://{defaultHost}/api/v2/platform/payments/:id", "params": [ { "name": "id", "value": "", "type": "path" }, { "name": "include", "value": "payment_method,order,source", "type": "query", "description": "Select which associated resources you would like to fetch, see: https://jsonapi.org/format/#fetching-includes" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Returns a Payment" }, { "info": { "name": "Delete a Payment", "type": "http" }, "http": { "method": "DELETE", "url": "http://{defaultHost}/api/v2/platform/payments/:id", "params": [ { "name": "id", "value": "", "type": "path" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Deletes a Payment" } ] } ], "bundled": true }