{
  "service": "paystack",
  "displayName": "Paystack",
  "categories": [
    "Finance"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "Secret Key",
      "placeholder": "sk_test_...",
      "description": "Paystack secret key used with the Authorization Bearer header. Manage keys from https://paystack.com/docs/api/.",
      "extraFields": []
    }
  ],
  "homepageUrl": "https://paystack.com",
  "actions": [
    {
      "id": "paystack.create_customer",
      "service": "paystack",
      "name": "create_customer",
      "description": "Create a customer in Paystack.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "description": "Customer email address.",
            "format": "email"
          },
          "first_name": {
            "type": "string",
            "description": "Customer first name."
          },
          "last_name": {
            "type": "string",
            "description": "Customer last name."
          },
          "phone": {
            "type": "string",
            "description": "Customer phone number."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "description": "A metadata value."
            },
            "description": "Metadata object sent to or returned by Paystack."
          }
        },
        "additionalProperties": false,
        "required": [
          "email"
        ],
        "description": "The input payload for creating a Paystack customer."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "customer": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "Unique Paystack customer ID."
              },
              "email": {
                "type": "string",
                "description": "Customer email address.",
                "format": "email"
              },
              "customer_code": {
                "type": "string",
                "description": "Paystack customer code."
              },
              "first_name": {
                "type": "string",
                "description": "Customer first name."
              },
              "last_name": {
                "type": "string",
                "description": "Customer last name."
              },
              "phone": {
                "type": "string",
                "description": "Customer phone number."
              },
              "metadata": {
                "type": "object",
                "additionalProperties": {
                  "description": "A metadata value."
                },
                "description": "Metadata object sent to or returned by Paystack."
              }
            },
            "additionalProperties": true,
            "description": "A Paystack customer object."
          }
        },
        "additionalProperties": false,
        "description": "The Paystack customer create response."
      }
    },
    {
      "id": "paystack.get_customer",
      "service": "paystack",
      "name": "get_customer",
      "description": "Fetch a customer in Paystack by email address or customer code.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "email_or_code": {
            "type": "string",
            "minLength": 1,
            "description": "Customer email address or customer code accepted by Paystack."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for fetching a Paystack customer."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "customer": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "Unique Paystack customer ID."
              },
              "email": {
                "type": "string",
                "description": "Customer email address.",
                "format": "email"
              },
              "customer_code": {
                "type": "string",
                "description": "Paystack customer code."
              },
              "first_name": {
                "type": "string",
                "description": "Customer first name."
              },
              "last_name": {
                "type": "string",
                "description": "Customer last name."
              },
              "phone": {
                "type": "string",
                "description": "Customer phone number."
              },
              "metadata": {
                "type": "object",
                "additionalProperties": {
                  "description": "A metadata value."
                },
                "description": "Metadata object sent to or returned by Paystack."
              }
            },
            "additionalProperties": true,
            "description": "A Paystack customer object."
          }
        },
        "additionalProperties": false,
        "description": "The Paystack customer detail response."
      }
    },
    {
      "id": "paystack.get_transaction",
      "service": "paystack",
      "name": "get_transaction",
      "description": "Fetch a Paystack transaction by transaction ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "description": "Paystack transaction ID."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for fetching a Paystack transaction."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "transaction": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "Unique Paystack transaction ID."
              },
              "status": {
                "type": "string",
                "description": "Transaction status returned by Paystack."
              },
              "reference": {
                "type": "string",
                "description": "Paystack transaction reference."
              },
              "amount": {
                "type": "integer",
                "description": "Transaction amount in the smallest currency unit."
              },
              "currency": {
                "type": "string",
                "description": "Transaction currency code."
              },
              "gateway_response": {
                "type": "string",
                "description": "Gateway response message returned by Paystack."
              },
              "channel": {
                "type": "string",
                "description": "Payment channel used for the transaction."
              },
              "paid_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Timestamp when the transaction was paid."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "description": "Timestamp when the transaction was created."
              },
              "metadata": {
                "type": "object",
                "additionalProperties": {
                  "description": "A metadata value."
                },
                "description": "Metadata object sent to or returned by Paystack."
              }
            },
            "additionalProperties": true,
            "description": "A Paystack transaction object."
          }
        },
        "additionalProperties": false,
        "description": "The Paystack transaction detail response."
      }
    },
    {
      "id": "paystack.initialize_transaction",
      "service": "paystack",
      "name": "initialize_transaction",
      "description": "Initialize a Paystack transaction and return checkout details.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "description": "Customer email address used for the transaction.",
            "format": "email"
          },
          "amount": {
            "type": "integer",
            "minimum": 1,
            "description": "Transaction amount in the smallest currency unit."
          },
          "currency": {
            "type": "string",
            "description": "Transaction currency code."
          },
          "reference": {
            "type": "string",
            "description": "Custom transaction reference."
          },
          "callback_url": {
            "type": "string",
            "description": "Callback URL used after checkout completes."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "description": "A metadata value."
            },
            "description": "Metadata object sent to or returned by Paystack."
          }
        },
        "additionalProperties": false,
        "required": [
          "email",
          "amount"
        ],
        "description": "The input payload for initializing a Paystack transaction."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "authorization_url": {
            "type": "string",
            "description": "Checkout authorization URL returned by Paystack."
          },
          "access_code": {
            "type": "string",
            "description": "Access code returned by Paystack."
          },
          "reference": {
            "type": "string",
            "description": "Transaction reference returned by Paystack."
          }
        },
        "additionalProperties": false,
        "description": "The Paystack checkout initialization response."
      }
    },
    {
      "id": "paystack.list_customers",
      "service": "paystack",
      "name": "list_customers",
      "description": "List customers available in Paystack.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1,
            "description": "Page number to fetch."
          },
          "perPage": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Number of records to return per page."
          },
          "from": {
            "type": "string",
            "description": "Inclusive ISO 8601 start timestamp used to filter creation time."
          },
          "to": {
            "type": "string",
            "description": "Inclusive ISO 8601 end timestamp used to filter creation time."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for listing Paystack customers."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "customers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "Unique Paystack customer ID."
                },
                "email": {
                  "type": "string",
                  "description": "Customer email address.",
                  "format": "email"
                },
                "customer_code": {
                  "type": "string",
                  "description": "Paystack customer code."
                },
                "first_name": {
                  "type": "string",
                  "description": "Customer first name."
                },
                "last_name": {
                  "type": "string",
                  "description": "Customer last name."
                },
                "phone": {
                  "type": "string",
                  "description": "Customer phone number."
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "description": "A metadata value."
                  },
                  "description": "Metadata object sent to or returned by Paystack."
                }
              },
              "additionalProperties": true,
              "description": "A Paystack customer object."
            },
            "description": "Customers returned by Paystack."
          },
          "meta": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "description": "Total records available."
              },
              "perPage": {
                "type": "integer",
                "description": "Records returned per page."
              },
              "page": {
                "type": "integer",
                "description": "Current page number."
              },
              "pageCount": {
                "type": "integer",
                "description": "Total page count."
              },
              "next": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Next page cursor or URL when provided."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "previous": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Previous page cursor or URL when provided."
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": true,
            "description": "Pagination metadata returned by Paystack."
          }
        },
        "additionalProperties": false,
        "required": [
          "customers"
        ],
        "description": "The paginated Paystack customer list response."
      }
    },
    {
      "id": "paystack.list_transactions",
      "service": "paystack",
      "name": "list_transactions",
      "description": "List transactions available in Paystack.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1,
            "description": "Page number to fetch."
          },
          "perPage": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Number of records to return per page."
          },
          "from": {
            "type": "string",
            "description": "Inclusive ISO 8601 start timestamp used to filter creation time."
          },
          "to": {
            "type": "string",
            "description": "Inclusive ISO 8601 end timestamp used to filter creation time."
          },
          "status": {
            "type": "string",
            "description": "Transaction status filter."
          },
          "customer": {
            "type": "string",
            "description": "Customer code filter."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for listing Paystack transactions."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "transactions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "Unique Paystack transaction ID."
                },
                "status": {
                  "type": "string",
                  "description": "Transaction status returned by Paystack."
                },
                "reference": {
                  "type": "string",
                  "description": "Paystack transaction reference."
                },
                "amount": {
                  "type": "integer",
                  "description": "Transaction amount in the smallest currency unit."
                },
                "currency": {
                  "type": "string",
                  "description": "Transaction currency code."
                },
                "gateway_response": {
                  "type": "string",
                  "description": "Gateway response message returned by Paystack."
                },
                "channel": {
                  "type": "string",
                  "description": "Payment channel used for the transaction."
                },
                "paid_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Timestamp when the transaction was paid."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "description": "Timestamp when the transaction was created."
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "description": "A metadata value."
                  },
                  "description": "Metadata object sent to or returned by Paystack."
                }
              },
              "additionalProperties": true,
              "description": "A Paystack transaction object."
            },
            "description": "Transactions returned by Paystack."
          },
          "meta": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "description": "Total records available."
              },
              "perPage": {
                "type": "integer",
                "description": "Records returned per page."
              },
              "page": {
                "type": "integer",
                "description": "Current page number."
              },
              "pageCount": {
                "type": "integer",
                "description": "Total page count."
              },
              "next": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Next page cursor or URL when provided."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "previous": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Previous page cursor or URL when provided."
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": true,
            "description": "Pagination metadata returned by Paystack."
          }
        },
        "additionalProperties": false,
        "required": [
          "transactions"
        ],
        "description": "The paginated Paystack transaction list response."
      }
    },
    {
      "id": "paystack.update_customer",
      "service": "paystack",
      "name": "update_customer",
      "description": "Update a Paystack customer by customer code.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "description": "Customer code used in the Paystack update path."
          },
          "email": {
            "type": "string",
            "description": "Customer email address.",
            "format": "email"
          },
          "first_name": {
            "type": "string",
            "description": "Customer first name."
          },
          "last_name": {
            "type": "string",
            "description": "Customer last name."
          },
          "phone": {
            "type": "string",
            "description": "Customer phone number."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "description": "A metadata value."
            },
            "description": "Metadata object sent to or returned by Paystack."
          }
        },
        "additionalProperties": false,
        "required": [
          "code",
          "email"
        ],
        "description": "The input payload for updating a Paystack customer.",
        "anyOf": [
          {
            "required": [
              "first_name"
            ]
          },
          {
            "required": [
              "last_name"
            ]
          },
          {
            "required": [
              "phone"
            ]
          },
          {
            "required": [
              "metadata"
            ]
          }
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "customer": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "Unique Paystack customer ID."
              },
              "email": {
                "type": "string",
                "description": "Customer email address.",
                "format": "email"
              },
              "customer_code": {
                "type": "string",
                "description": "Paystack customer code."
              },
              "first_name": {
                "type": "string",
                "description": "Customer first name."
              },
              "last_name": {
                "type": "string",
                "description": "Customer last name."
              },
              "phone": {
                "type": "string",
                "description": "Customer phone number."
              },
              "metadata": {
                "type": "object",
                "additionalProperties": {
                  "description": "A metadata value."
                },
                "description": "Metadata object sent to or returned by Paystack."
              }
            },
            "additionalProperties": true,
            "description": "A Paystack customer object."
          }
        },
        "additionalProperties": false,
        "description": "The Paystack customer update response."
      }
    },
    {
      "id": "paystack.verify_transaction",
      "service": "paystack",
      "name": "verify_transaction",
      "description": "Verify a Paystack transaction by reference.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string",
            "minLength": 1,
            "description": "Transaction reference used by Paystack verify."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for verifying a Paystack transaction."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "transaction": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "Unique Paystack transaction ID."
              },
              "status": {
                "type": "string",
                "description": "Transaction status returned by Paystack."
              },
              "reference": {
                "type": "string",
                "description": "Paystack transaction reference."
              },
              "amount": {
                "type": "integer",
                "description": "Transaction amount in the smallest currency unit."
              },
              "currency": {
                "type": "string",
                "description": "Transaction currency code."
              },
              "gateway_response": {
                "type": "string",
                "description": "Gateway response message returned by Paystack."
              },
              "channel": {
                "type": "string",
                "description": "Payment channel used for the transaction."
              },
              "paid_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Timestamp when the transaction was paid."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "description": "Timestamp when the transaction was created."
              },
              "metadata": {
                "type": "object",
                "additionalProperties": {
                  "description": "A metadata value."
                },
                "description": "Metadata object sent to or returned by Paystack."
              }
            },
            "additionalProperties": true,
            "description": "A Paystack transaction object."
          }
        },
        "additionalProperties": false,
        "description": "The Paystack transaction verify response."
      }
    }
  ]
}
