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

# Credit Card

Creates an url to a secure form where the customer may finish the Credit Card payment.

Supports 3D Secure Technology.

[block:api-header]
{}
[/block]

[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:callout]
{
  "type": "info",
  "title": "Maximum Amount",
  "body": "Maximum amount: 3999€"
}
[/block]

[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.02/creditcard/create": {
      "post": {
        "summary": "Credit Card",
        "description": "Creates an url to a secure form where the customer may finish the Credit Card payment.\n\nSupports 3D Secure Technology.",
        "operationId": "credit-card",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "payment",
                  "customer"
                ],
                "properties": {
                  "payment": {
                    "type": "object",
                    "description": "Informations regarding the payment",
                    "required": [
                      "successUrl",
                      "failUrl",
                      "backUrl"
                    ],
                    "properties": {
                      "identifier": {
                        "type": "string"
                      },
                      "amount": {
                        "type": "object",
                        "required": [
                          "value",
                          "currency"
                        ],
                        "properties": {
                          "value": {
                            "type": "number",
                            "description": "Payment amount",
                            "format": "float"
                          },
                          "currency": {
                            "type": "string",
                            "default": "EUR"
                          }
                        }
                      },
                      "successUrl": {
                        "type": "string",
                        "description": "The payer will be forwarded to this url if the payment process is successful."
                      },
                      "failUrl": {
                        "type": "string",
                        "description": "The payer will be forwarded to this url if the payment process fails (eg: no funds, problems with 3DS)"
                      },
                      "backUrl": {
                        "type": "string",
                        "description": "The payer will be forwarded to this url if the user presses back."
                      },
                      "lang": {
                        "type": "string",
                        "description": "Defines the Language of the form.",
                        "default": "PT"
                      },
                      "minutesFormUp": {
                        "type": "integer",
                        "description": "Number of minutes that the url for the payment form will remain active. After that time the form will be unaccessible and the reference expired. Max and default 1440 minutes",
                        "default": 1440,
                        "format": "int32"
                      }
                    }
                  },
                  "customer": {
                    "type": "object",
                    "description": "Informations regarding customer's notifications",
                    "required": [
                      "notify",
                      "email"
                    ],
                    "properties": {
                      "notify": {
                        "type": "boolean",
                        "default": true
                      },
                      "email": {
                        "type": "string",
                        "description": "Customer's email"
                      }
                    }
                  }
                }
              },
              "examples": {
                "Example": {
                  "value": {
                    "payment": {
                      "identifier": "Test",
                      "amount": {
                        "value": 2,
                        "currency": "EUR"
                      },
                      "successUrl": "https://eupago.pt",
                      "failUrl": "https://eupago.pt",
                      "backUrl": "https://eupago.pt",
                      "lang": "PT"
                    },
                    "customer": {
                      "notify": true,
                      "email": "teste@eupago.pt"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "OK": {
                    "value": "{\n\t\"transactionStatus\": \"Success\",\n  \"transactionID\": \"6526ds26653sad5489sa32\",\n  \"reference\": \"00235\",\n  \"redirectUrl\": \"https://clientes.eupago.pt/api/extern/creditcard/form/6526ds26653sad5489sa32\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "transactionStatus": {
                      "type": "string",
                      "example": "Success"
                    },
                    "transactionID": {
                      "type": "string",
                      "example": "6526ds26653sad5489sa32"
                    },
                    "reference": {
                      "type": "string",
                      "example": "00235"
                    },
                    "redirectUrl": {
                      "type": "string",
                      "example": "https://clientes.eupago.pt/api/extern/creditcard/form/6526ds26653sad5489sa32"
                    }
                  }
                }
              }
            }
          },
          "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:61d718d970ae9b01d2283f5d"
}
```