---
updatedAt: 2025-10-04T19:22:25.000Z
agentTools:
  projectIndex: https://coinify.readme.io/llms.txt
---

# Create Payment Intent

> ❗️ Important
>
> **NEVER consider the Payment Intent or any other transaction completed or failed  before validating the webhook signature.**
> See [example Recipe](https://coinify.readme.io/reference/payment-intent-api-webhook-notifications) for the code to validate the webhook signature header.

Coinify provides a hosted checkout user interface to enable the customer to make a payment regarding a specific PaymentIntent. Use the GET HTTP verb and redirect the customer to the `paymentWindowUrl` which is received in the successful response of this endpoint.

If you prefer not to use the Coinify checkout interface, you have the option to construct your own. When you create a Payment Intent, the endpoint will return a Payment Intent ID. This ID can then be used to call our GET [payment-intent](https://coinify.readme.io/reference/read-payment-intent) endpoint, which will provide you with all the data points associated with the payment intent. This allows for greater flexibility and customization in how you handle payment intents in your application.

### Preselect a cryptocurrency

To **preselect a cryptocurrency** before redirecting your customer to the Payment Window, use the `quoteCurrency` parameter, as explained below. You can fetch the list of available cryptocurrencies available for a specific Payment Intent via [Get Currency Estimations](https://coinify.readme.io/update/reference/payment-intent-read-currencies#/) API endpoint.

## Successful Response

| Property         | Type   | Description                                                                |
| :--------------- | :----- | :------------------------------------------------------------------------- |
| id               | string | The ID of the newly created PaymentIntent.                                 |
| paymentWindowUrl | string | The URL to redirect the customer in order to use Coinify's payment window. |

<Recipe slug="merchant-integration" title="Merchant Integration" />

<br />

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "payment-intent",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.payment.sandbox.coinify.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY",
        "x-default": ""
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/payment-intents": {
      "post": {
        "summary": "Create PaymentIntent",
        "description": "",
        "operationId": "create-payment-intent",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount",
                  "currency",
                  "orderId",
                  "customerId",
                  "customerEmail",
                  "pluginIdentifier",
                  "successUrl",
                  "failureUrl"
                ],
                "properties": {
                  "amount": {
                    "type": "number",
                    "description": "The amount intended to be collected",
                    "default": 99.99,
                    "format": "float"
                  },
                  "currency": {
                    "type": "string",
                    "description": "Three-letter ISO currency code of the amount",
                    "default": "EUR"
                  },
                  "orderId": {
                    "type": "string",
                    "description": "Merchant's ID of the order for which the PaymentIntent was created.",
                    "default": "123456"
                  },
                  "customerId": {
                    "type": "string",
                    "description": "The ID of Merchant's customer. Should uniquely identify the customer",
                    "default": "6af46318-9e60-4390-8bf0-e042d7b96b21"
                  },
                  "customerEmail": {
                    "type": "string",
                    "description": "The customer email",
                    "default": "customer@coinify.com"
                  },
                  "pluginIdentifier": {
                    "type": "string",
                    "description": "The name of your API integration or e-commerce plugin integration. You can name it whatever you want. For easier distinction among other clients in Coinify system the suggested naming is \"**YourMerchantName** + Coinify API Integration\".",
                    "default": "DemoMerchant - Conify API Integration"
                  },
                  "successUrl": {
                    "type": "string",
                    "description": "A URL to redirect your customer when everything goes well",
                    "default": "https://coinify.com"
                  },
                  "failureUrl": {
                    "type": "string",
                    "description": "A URL to redirect your customer when something goes wrong",
                    "default": "https://www.google.com"
                  },
                  "context": {
                    "type": "string",
                    "description": "(Optional) Additional metadata information regarding the payment intent",
                    "format": "json"
                  },
                  "memo": {
                    "type": "string",
                    "description": "(Optional) A message for your customer. Provided in paymentUri of a PaymentIntent quote. See Resource section."
                  },
                  "subaccountId": {
                    "type": "string",
                    "description": "(Optional) An ID of Subaccount to which this Payment Intent should be attributed. You need to pass an existing subaccountId. See [Create Sub-account](https://coinify.readme.io/reference/subaccounts-create) section."
                  },
                  "coinifyCustomerId": {
                    "type": "string",
                    "description": "(Optional) The Coinify Customer ID for this Payment Intent, valid IDs owned by merchant skip the travel rule KYC flow of the payment intent."
                  },
                  "quoteCurrency": {
                    "type": "string",
                    "description": "Allows you to preselect the cryptocurrency the customer will pay with. If this parameter is specified, the Select Crypto screen will be skipped on the Payment Window and the customer will see the payment quote in the specified cryptocurrency on the UI."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "id": "2874f955-3114-4087-91e5-256a75ce16a5",
                      "paymentWindowUrl": "https://checkout.sandbox.coinify.com/payment-intent/2874f955-3114-4087-91e5-256a75ce16a5"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "00dd6006-a76a-4e00-8085-cbd90d4a4272"
                    },
                    "paymentWindowUrl": {
                      "type": "string",
                      "example": "https://checkout.sandbox.coinify.com/payment-intent/00dd6006-a76a-4e00-8085-cbd90d4a4272"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"errorCode\": \"invalid_request\",\n  \"errorMessage\": \"A descriptive error message\",\n  \"requestId\": \"{requestId}\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "errorCode": {
                      "type": "string",
                      "example": "invalid_request"
                    },
                    "errorMessage": {
                      "type": "string",
                      "example": "A descriptive error message"
                    },
                    "requestId": {
                      "type": "string",
                      "example": "{requestId}"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"errorCode\": \"invalid_authentication\",\n  \"errorMessage\": \"A descriptive error message\",\n  \"requestId\": \"{requestId}\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "errorCode": {
                      "type": "string",
                      "example": "invalid_authentication"
                    },
                    "errorMessage": {
                      "type": "string",
                      "example": "A descriptive error message"
                    },
                    "requestId": {
                      "type": "string",
                      "example": "{requestId}"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"errorCode\": \"not_found\",\n  \"errorMessage\": \"{resource} not found error\",\n  \"requestId\": \"{requestId}\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "errorCode": {
                      "type": "string",
                      "example": "not_found"
                    },
                    "errorMessage": {
                      "type": "string",
                      "example": "{resource} not found error"
                    },
                    "requestId": {
                      "type": "string",
                      "example": "{requestId}"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"errorCode\": \"invalid_payload\",\n  \"errorMessage\": \"\\\"{property}\\\" is required\",\n  \"requestId\": \"{requestId}\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "errorCode": {
                      "type": "string",
                      "example": "invalid_payload"
                    },
                    "errorMessage": {
                      "type": "string",
                      "example": "\"{property}\" is required"
                    },
                    "requestId": {
                      "type": "string",
                      "example": "{requestId}"
                    }
                  }
                }
              }
            }
          },
          "451": {
            "description": "451",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"errorCode\": \"unavailable_legal_reasons\",\n  \"errorMessage\": \"Unavailable For Legal Reasons\",\n  \"requestId\": \"{requestId}\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "errorCode": {
                      "type": "string",
                      "example": "unavailable_legal_reasons"
                    },
                    "errorMessage": {
                      "type": "string",
                      "example": "Unavailable For Legal Reasons"
                    },
                    "requestId": {
                      "type": "string",
                      "example": "{requestId}"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```