---
agentTools:
  projectIndex: https://payswifter.readme.io/llms.txt
---

# Charge Order By Id

# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "info": {
    "title": "PaySwifter API",
    "version": "2.0"
  },
  "paths": {
    "/orders/{order_id}/charge": {
      "post": {
        "tags": [
          "Orders"
        ],
        "summary": "Charge Order By Id",
        "operationId": "charge_order",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "Order Id",
              "type": "string",
              "format": "id"
            },
            "name": "order_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "ChargeOrderSchema",
                  "required": [
                    "order",
                    "charge"
                  ],
                  "type": "object",
                  "properties": {
                    "order": {
                      "title": "Order",
                      "required": [
                        "id",
                        "create_date",
                        "organization_id",
                        "total_amount",
                        "status",
                        "track_number"
                      ],
                      "type": "object",
                      "properties": {
                        "id": {
                          "title": "Id",
                          "type": "string",
                          "format": "id"
                        },
                        "create_date": {
                          "title": "Create Date",
                          "type": "string",
                          "format": "date-time"
                        },
                        "store_id": {
                          "title": "Store Id",
                          "type": "string",
                          "format": "id"
                        },
                        "charge_id": {
                          "title": "Charge Id",
                          "type": "string",
                          "format": "id"
                        },
                        "organization_id": {
                          "title": "Organization Id",
                          "type": "string",
                          "format": "id"
                        },
                        "marketplace_id": {
                          "title": "Marketplace Id",
                          "type": "string"
                        },
                        "delivered_date": {
                          "title": "Delivered Date",
                          "type": "string",
                          "format": "date-time"
                        },
                        "total_amount": {
                          "title": "Total Amount",
                          "anyOf": [
                            {
                              "maximum": 9223372036854776000,
                              "minimum": 1,
                              "type": "integer"
                            },
                            {
                              "maximum": 9223372036854776000,
                              "minimum": 0,
                              "type": "integer"
                            }
                          ]
                        },
                        "status": {
                          "title": "OrderStatus",
                          "enum": [
                            "submitted",
                            "total_finalized",
                            "delivered",
                            "charged",
                            "canceled"
                          ],
                          "type": "string",
                          "description": "An enumeration."
                        },
                        "track_number": {
                          "title": "Track Number",
                          "type": "string"
                        },
                        "updated_at": {
                          "title": "Updated At",
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "additionalProperties": false
                    },
                    "charge": {
                      "title": "Charge",
                      "required": [
                        "id",
                        "create_date",
                        "type",
                        "status",
                        "amount",
                        "balance_transaction_id",
                        "consumer_fi_account_id",
                        "business_fi_account_id",
                        "organization_id",
                        "track_number"
                      ],
                      "type": "object",
                      "properties": {
                        "id": {
                          "title": "Id",
                          "type": "string",
                          "format": "id"
                        },
                        "create_date": {
                          "title": "Create Date",
                          "type": "string",
                          "format": "date-time"
                        },
                        "type": {
                          "title": "ChargeType",
                          "enum": [
                            "ACH_DEBIT"
                          ],
                          "type": "string",
                          "description": "An enumeration."
                        },
                        "status": {
                          "title": "ChargeStatus",
                          "enum": [
                            "pending",
                            "succeeded",
                            "failed"
                          ],
                          "type": "string",
                          "description": "An enumeration."
                        },
                        "amount": {
                          "title": "Amount",
                          "maximum": 9223372036854776000,
                          "minimum": 1,
                          "type": "integer"
                        },
                        "balance_transaction_id": {
                          "title": "Balance Transaction Id",
                          "type": "string",
                          "format": "id"
                        },
                        "consumer_fi_account_id": {
                          "title": "Consumer Fi Account Id",
                          "type": "string",
                          "format": "id"
                        },
                        "business_fi_account_id": {
                          "title": "Business Fi Account Id",
                          "type": "string",
                          "format": "id"
                        },
                        "organization_id": {
                          "title": "Organization Id",
                          "type": "string",
                          "format": "id"
                        },
                        "marketplace_id": {
                          "title": "Marketplace Id",
                          "type": "string"
                        },
                        "track_number": {
                          "title": "Track Number",
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "title": "DoesNotExistResponse",
                  "required": [
                    "error_code",
                    "error_message",
                    "message"
                  ],
                  "type": "object",
                  "properties": {
                    "error_code": {
                      "title": "Error Code",
                      "type": "string"
                    },
                    "error_message": {
                      "title": "Error Message",
                      "type": "string"
                    },
                    "message": {
                      "title": "Message",
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication error",
            "content": {
              "application/json": {
                "schema": {
                  "title": "AuthenticationErrorResponse",
                  "required": [
                    "message"
                  ],
                  "type": "object",
                  "properties": {
                    "message": {
                      "title": "Message",
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "title": "HTTPValidationError",
                  "type": "object",
                  "properties": {
                    "detail": {
                      "title": "Detail",
                      "type": "array",
                      "items": {
                        "title": "ValidationError",
                        "required": [
                          "loc",
                          "msg",
                          "type"
                        ],
                        "type": "object",
                        "properties": {
                          "loc": {
                            "title": "Location",
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "integer"
                                }
                              ]
                            }
                          },
                          "msg": {
                            "title": "Message",
                            "type": "string"
                          },
                          "type": {
                            "title": "Error Type",
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Oauth2ClientCredentials": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "Oauth2ClientCredentials": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "scopes": {},
            "tokenUrl": "https://auth.swifterhq.com/oauth2/token"
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.swifterhq.com/api/v2.0",
      "description": "Live Server"
    },
    {
      "url": "https://api-sandbox.swifterhq.com/api/v2.0",
      "description": "Sandbox Server"
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 98,
      "1": 232,
      "2": 236,
      "3": 253,
      "4": 92,
      "5": 4,
      "6": 163,
      "7": 6,
      "8": 126,
      "9": 210,
      "10": 247,
      "11": 114
    }
  }
}
```