---
agentTools:
  projectIndex: https://docs.eupago.pt/llms.txt
---

# P24

Polish Payment Method. Creates a request that redirects the payer to an external form to pay with P24.

[block:callout]
{
  "type": "warning",
  "body": "This request uses ApiKey authentication on its header:** ApiKey xxxx-xxxx-xxxx-xxxx-xxxx**"
}
[/block]

You may find your EuPago's API Key on your backoffice on *Channels *->* Channel Listing* menu. Please [check our guide](https://eupago.atlassian.net/servicedesk/customer/portal/2/article/224297034) if you are having trouble finding your API Key.

[block:html]
{
  "html": "<div class=example>\n  <p>To test this request please fill the params below or load a complete example on the right clicking in <strong>Examples</strong> dropdown on the right.</p>\n</div>\n\n<style>\n  .example\n  {\n  color:#C41E3A;\n  }\n</style>"
}
[/block]

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "REST API - ApiKey Auth",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://sandbox.eupago.pt/api/"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "x-bearer-format": "",
        "x-default": ""
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/p24/create": {
      "post": {
        "summary": "P24",
        "description": "Polish Payment Method. Creates a request that redirects the payer to an external form to pay with P24.",
        "operationId": "p24",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount",
                  "urlreturn"
                ],
                "properties": {
                  "amount": {
                    "type": "number",
                    "description": "Amount to pay in Złoty (‎PLN‎)‎.",
                    "format": "float"
                  },
                  "identifier": {
                    "type": "string"
                  },
                  "urlreturn": {
                    "type": "string",
                    "description": "Used to define the url to where the customer will be redirected he/she finishes the payment."
                  },
                  "admincallback": {
                    "type": "string",
                    "description": "Use this optional param to receive a communication when this reference is paid."
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "amount": 5.22,
                    "identifier": "test",
                    "urlreturn": "https://eupago.pt",
                    "admincallback": "https://eupago.pt"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "examples": {
                  "Created": {
                    "value": "{\n    \"transactionStatus\": \"Success\",\n    \"urlresult\": \"https://sandbox.przelewy24.pl/trnRequest/7A2C48BF8C-850839-8CEA01-B589ACBFFC\",\n    \"reference\": \"000000964\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "transactionStatus": {
                      "type": "string",
                      "example": "Success"
                    },
                    "urlresult": {
                      "type": "string",
                      "example": "https://sandbox.przelewy24.pl/trnRequest/7A2C48BF8C-850839-8CEA01-B589ACBFFC"
                    },
                    "reference": {
                      "type": "string",
                      "example": "000000964"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Amount Missing": {
                    "value": "{\n    \"transactionStatus\": \"Rejected\",\n    \"code\": \"AMOUNT_MISSING\",\n    \"text\": \"Amount was not available in the request\"\n}"
                  },
                  "Urlreturn Missing": {
                    "value": "{\n    \"transactionStatus\": \"Rejected\",\n    \"code\": \"URLRETURN_MISSING\",\n    \"text\": \"Url Return was not available in the request\"\n}"
                  }
                },
                "schema": {
                  "oneOf": [
                    {
                      "title": "Amount Missing",
                      "type": "object",
                      "properties": {
                        "transactionStatus": {
                          "type": "string",
                          "example": "Rejected"
                        },
                        "code": {
                          "type": "string",
                          "example": "AMOUNT_MISSING"
                        },
                        "text": {
                          "type": "string",
                          "example": "Amount was not available in the request"
                        }
                      }
                    },
                    {
                      "title": "Urlreturn Missing",
                      "type": "object",
                      "properties": {
                        "transactionStatus": {
                          "type": "string",
                          "example": "Rejected"
                        },
                        "code": {
                          "type": "string",
                          "example": "URLRETURN_MISSING"
                        },
                        "text": {
                          "type": "string",
                          "example": "Url Return was not available in the request"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Auth Missing": {
                    "value": "{\n    \"transactionStatus\": \"Rejected\",\n    \"code\": \"APIKEY_MISSING\",\n    \"text\": \"API Key was not available in the request\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "transactionStatus": {
                      "type": "string",
                      "example": "Rejected"
                    },
                    "code": {
                      "type": "string",
                      "example": "APIKEY_MISSING"
                    },
                    "text": {
                      "type": "string",
                      "example": "API Key was not available in the request"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "61d5aef4dda2500032ca60d3:623b1585a7960c0027039831"
}
```