Create Payment Request

This page will help you get started with Create Checkout Payment Request.

Accepting payments via Checkout is one of the most manageable client-server interactions requiring minimum development resources. This process involves sending API requests to perform key system operations, such as CREATE, READ, UPDATE, and DELETE.

The Payment Request can be created through the REST API Request initiation. The corresponding request should contain the Request method, URL and relevant Query parameter.

This is where you show your users how to set it up. You can use code samples, like this:

{
  "data": {
    "type": "payment-requests",
    "attributes": {
      "checkout_id": "co_S1uyiiVYgL5mxF09",
      "expires_at": 1702002100,
      "metadata": {
        "key": "value"
      },
      "test_mode": true,
      "origin_reference_id": "5fcc5ebb-5ec1-4ff9-8de4-e62be777caa4",
      "reference_id": "acddb8e5-eea3-4756-9781-19c95ad94ebe",
      "currency": "USD",
      "strategy": "direct",
      "amount": 100.12,
      "description": "string",
      "fields": {
        "key": "value"
      },
      "options": {
        "auth_auto_retry": true,
        "transactions_limit": 2,
        "commits_limit": 2,
        "return_url": "http://example.org/return",
        "descriptor": "string",
        "complete_auth_url_template": "string",
        "variable_amount": true,
        "delayed_action": true,
        "action_delay": 0,
        "tokenize": true,
        "instant": true
      },
      "checkout_options": {
        "auto_redirect": false,
        "allow_remember_me": false,
        "bypass_status_page": false
      },
      "customer": {
        "reference_id": "test_customer",
        "email": "[email protected]",
        "token": "56043f9814a6349c4547a3b422bdf8a300f5e109",
        "description": "string",
        "metadata": {
          "key": "value"
        },
        "archived": true,
        "commerce_account_id": "string",
        "processing_options": {
          "is_payment_enabled": true,
          "is_payout_enabled": true
        },
        "details": [
          {
            "customer_details": {
              "date_of_birth": "2020-02-02",
              "phone": 380668965532,
              "home_phone": 380668965532,
              "work_phone": 380668965532,
              "mobile_phone": 380668965532,
              "first_name": "John",
              "last_name": "Wick",
              "address": {}
            },
            "billing_details": {
              "active": true,
              "city": "Dnipro",
              "country": "Ukraine",
              "line1": "SHpitalna Vul., bld. 30, appt. 7",
              "line2": "SHpitalna Vul., bld. 30, appt. 7",
              "line3": "SHpitalna Vul., bld. 30, appt. 7",
              "postal_code": "79007",
              "state": "Ukraine"
            },
            "shipping_details": {
              "active": true,
              "city": "Dnipro",
              "country": "Ukraine",
              "line1": "SHpitalna Vul., bld. 30, appt. 7",
              "line2": "SHpitalna Vul., bld. 30, appt. 7",
              "line3": "SHpitalna Vul., bld. 30, appt. 7",
              "postal_code": "79007",
              "state": "Ukraine"
            }
          }
        ]
      }
    }
  }
}

Try typing / to see how easy it is to add more content!

Parameters

1. Path parameters

Path parameters represent the variable part of the URL path and are primarily used to identify entities by their unique IDs or Names.

Thus, they serve as the main elements to filter or retrieve particular resources when allowing you to work with dynamic values for your API Requests.

2. Query parameters

Query parameters are the pre-determined keys with static or dynamic values. They are used to indicate options and filters aiming to narrow down the results.

3. Body parameters

The Body parameters' principal function lies in creating new resources or updating the existing ones while sending the specific data to the server in the JSON format as a priority.

Response status

After sending the Request, the system reacts by providing its Response status and the JSON data where applicable.

HTTP status codeDescription
201 CreatedThe Payment Request has been successfully created. The system provides the Payment Request ID that you can open via the following link: https://checkout.eu.corefy.dev/{id}.
422 Unprocessable entityThe server failed to process the request because of the invalid data.
404 Not FoundThe X-AUTH-PUBLIC-KEY or X-COREFY-ORGANIZATION hasn't found
400Credentials are invalid

You can find the detailed breakdown of the required parameters and response peculiarities below:

Language
Click Try It! to start a request and see the response here!