---
updatedAt: 2025-06-12T00:05:33.000Z
agentTools:
  projectIndex: https://developers.tap.company/llms.txt
---

# Create an Authorize

This endpoint authorizes a transaction.

To place a hold on a card, use the Authorize API. You can later capture the payment or release the hold. To authorize a card, create an authorization request. If in test mode, the card won't be authorized, but everything else will occur as if in live mode.

To automatically capture the authorized payment after a defined number of hours, you can use the `auto` object and set the `type` to `AUTO`. Alternatively if the `type` is `VOID`, the authorization hold will be released after the predefined `time`.

To capture an authorized payment, you can use [Charges API](http://google.com). You can pass the `authorize_id` within the `source_id` of the charges request.

Please review the Authorization Request and Authorization Response Model to get more information.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "authorize",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.tap.company/v2/authorize"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer",
        "x-default": "sk_test_XKokBfNWv6FIYuTMg5sLPjhJ"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/": {
      "post": {
        "summary": "Create an Authorize",
        "description": "This endpoint authorizes a transaction.",
        "operationId": "create-an-authorize",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "integer",
                    "description": "The amount to be authorized in decimal format. (Eg: 3.990)",
                    "default": 1,
                    "format": "int32"
                  },
                  "currency": {
                    "type": "string",
                    "description": "The currency in which the amount should be authorized in standard 3 digit ISO currency code. (Eg: USD)",
                    "default": "KWD"
                  },
                  "customer_initiated": {
                    "type": "boolean",
                    "description": "This parameter determines whether the charge was initiated by customer or not",
                    "default": true
                  },
                  "threeDSecure": {
                    "type": "boolean",
                    "description": "The 3D Secure request status for a particular authorized payment. Values can either be true or false.",
                    "default": true
                  },
                  "save_card": {
                    "type": "boolean",
                    "description": "The credit card of the payer can be saved for future transactions. Values can be either true or false.",
                    "default": false
                  },
                  "payment_agreement": {
                    "type": "object",
                    "description": "Serves as a unique identifier for referencing and managing the payment agreement",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Serves as a unique identifier for referencing and managing the payment agreement."
                      },
                      "contract": {
                        "type": "object",
                        "description": "Represents the unique identifier for the associated contract, helping in identification and referencing.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Uniquely identifies the agreement between the merchant and the customer, using an invoice ID, subscription ID, card ID, or order ID."
                          }
                        }
                      }
                    }
                  },
                  "statement_descriptor": {
                    "type": "string",
                    "description": "The text that appears on the customer's bank/card statement for this charge, e.g., \"TAP*SUBSCRIPTION\".",
                    "default": ""
                  },
                  "receipt": {
                    "type": "object",
                    "description": "Note: This feature is longer supported.",
                    "properties": {
                      "email": {
                        "type": "boolean",
                        "description": "Set it as ``true` if this charge’s receipt needs to be sent to the customer's email address.",
                        "default": true
                      },
                      "sms": {
                        "type": "boolean",
                        "description": "Set it as ``true` if this charge’s receipt needs to be sent to the customer's phone number.",
                        "default": true
                      }
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "description": "Any additional set of information as key/value pairs to be added to the authorization request. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.",
                    "properties": {
                      "udf1": {
                        "type": "string",
                        "default": "test_data_1"
                      },
                      "udf2": {
                        "type": "string",
                        "default": "test_data_2"
                      },
                      "udf3": {
                        "type": "string",
                        "default": "test_data_3"
                      }
                    }
                  },
                  "reference": {
                    "type": "object",
                    "description": "The reference numbers associated with this authorize request.",
                    "properties": {
                      "transaction": {
                        "type": "string",
                        "description": "Merchant Transaction Reference Number",
                        "default": "txn_0001"
                      },
                      "order": {
                        "type": "string",
                        "description": "Merchant Order Reference Number",
                        "default": "ord_0001"
                      }
                    }
                  },
                  "customer": {
                    "type": "object",
                    "description": "The customer information.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Customer Id created using Customer API or the Customer ID returned from any previous transaction (Charges, Authorize, Card)"
                      },
                      "first_name": {
                        "type": "string",
                        "description": "The First Name of the Customer",
                        "default": "Test"
                      },
                      "middle_name": {
                        "type": "string",
                        "description": "The Middle Name of Customer",
                        "default": "Test"
                      },
                      "last_name": {
                        "type": "string",
                        "description": "The Last Name of Customer",
                        "default": "Test"
                      },
                      "email": {
                        "type": "string",
                        "description": "The Email ID of the Customer",
                        "default": "test@test.com"
                      },
                      "phone": {
                        "type": "object",
                        "description": "The Phone Number of the Customer",
                        "properties": {
                          "country_code": {
                            "type": "string",
                            "description": "The Country Code (Do not add + or 0)",
                            "default": "965"
                          },
                          "number": {
                            "type": "string",
                            "description": "The Phone Number",
                            "default": "50000000"
                          }
                        }
                      }
                    }
                  },
                  "merchant": {
                    "type": "object",
                    "description": "The ID of the Merchant Account. Available on the Tap Dashboard (goSell > API Credentials > Merchant ID)",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "The ID of the Merchant Account to which the funds need to be routed.",
                        "default": "1234"
                      }
                    }
                  },
                  "source": {
                    "type": "object",
                    "description": "The source of the payment method that needs to be authorized.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Source id (``token_id`` or ``src_all`` or ``src_card``), to use a saved card for customer, create a token by using [Create a Token API](https://developers.tap.company/reference/create-a-token-from-saved-card) (make sure to pass ``id`` in the customer object)",
                        "default": "src_card"
                      }
                    }
                  },
                  "authorize_debit": {
                    "type": "boolean",
                    "description": "A boolean parameter that accepts values true or false. If set to true, the API will process the transaction even if it is not supported by the payment network. It is important to note that currently, this feature is only supported for mada transactions.",
                    "default": false
                  },
                  "auto": {
                    "type": "object",
                    "description": "The type and duration of the authorization.",
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "VOID or CAPTURE  Allowed Values: CAPTURE, VOID",
                        "default": "VOID"
                      },
                      "time": {
                        "type": "integer",
                        "description": "In hours. Minimum: 1 Maximum: 168 (Visa and MasterCard tokens is up to 720 hours)",
                        "default": 100,
                        "format": "int32"
                      }
                    }
                  },
                  "post": {
                    "type": "object",
                    "description": "The URL to which tap needs to send the response once the authorize is completed.",
                    "properties": {
                      "url": {
                        "type": "string",
                        "description": "This URL should be a live URL which should listen to the POST responses sent from tap.",
                        "default": "http://your_website.com/posturl"
                      }
                    }
                  },
                  "redirect": {
                    "type": "object",
                    "description": "The URL to which the customer needs to be redirected once the authorize is completed.",
                    "properties": {
                      "url": {
                        "type": "string",
                        "description": "The Confirmation Page of the Merchant. The Authorize ID will be available as a Query Parameter in this URL",
                        "default": "http://your_website.com/redirecturl"
                      }
                    }
                  },
                  "payment_provider": {
                    "type": "object",
                    "description": "Information about the payment provider associated with this authorize",
                    "properties": {
                      "technology": {
                        "type": "object",
                        "description": "Information about the technology associated with this authorize",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The technology ID provided by Tap"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "examples": {
                "authorize with payment agreement": {
                  "value": {
                    "amount": 100,
                    "currency": "KWD",
                    "payment_agreement": {
                      "id": "payment_agreement_TS05A1920230911b2K12105431"
                    },
                    "customer_initiated": "true",
                    "threeDSecure": true,
                    "save_card": true,
                    "statement_descriptor": "sample",
                    "metadata": {
                      "udf1": "test_data_1",
                      "udf2": "test_data_2",
                      "udf3": "test_data_3"
                    },
                    "reference": {
                      "transaction": "txn_0001",
                      "order": "ord_0001"
                    },
                    "receipt": {
                      "email": true,
                      "sms": true
                    },
                    "customer": {
                      "id": "cus_TS01A4620230032p4KP1406279"
                    },
                    "source": {
                      "id": "tok_Om5q623220khi113ke54568"
                    },
                    "auto": {
                      "type": "VOID",
                      "time": 168
                    },
                    "post": {
                      "url": "http://your_website.com/posturl"
                    },
                    "redirect": {
                      "url": "http://your_website.com/redirecturl"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"id\": \"auth_TS065220221533k5FK1505634\",\n\t\"object\": \"authorize\",\n\t\"live_mode\": false,\n\t\"api_version\": \"V2\",\n\t\"method\": \"CREATE\",\n\t\"status\": \"INITIATED\",\n\t\"amount\": 1,\n\t\"currency\": \"KWD\",\n\t\"threeDSecure\": true,\n\t\"save_card\": false,\n\t\"merchant_id\": \"\",\n\t\"product\": \"\",\n\t\"statement_descriptor\": \"sample\",\n\t\"transaction\": {\n\t\t\"timezone\": \"UTC+03:00\",\n\t\t\"created\": \"1652628832666\",\n\t\t\"url\": \"https://sandbox.payments.tap.company/test_gosell/v2/payment/response.aspx?tap_auth=qU%2fYHoOr4blXyIfDLNpJrPnvbvtHyf4yqjGjChH5aTk%3d&sess=6mXrG%2fSKpa0%3d&token=qU%2fYHoOr4blXyIfDLNpJrPnvbvtHyf4yee5pNiSxqVQ28X2kDyKgPg%3d%3d\",\n\t\t\"expiry\": {\n\t\t\t\"period\": 30,\n\t\t\t\"type\": \"MINUTE\"\n\t\t},\n\t\t\"asynchronous\": false,\n\t\t\"amount\": 1,\n\t\t\"currency\": \"KWD\"\n\t},\n\t\"reference\": {\n\t\t\"transaction\": \"txn_0001\",\n\t\t\"order\": \"ord_0001\"\n\t},\n\t\"response\": {\n\t\t\"code\": \"100\",\n\t\t\"message\": \"Initiated\"\n\t},\n\t\"receipt\": {\n\t\t\"email\": true,\n\t\t\"sms\": true\n\t},\n\t\"customer\": {\n\t\t\"first_name\": \"Test\",\n\t\t\"last_name\": \"Test\",\n\t\t\"email\": \"test@test.com\",\n\t\t\"phone\": {\n\t\t\t\"country_code\": \"965\",\n\t\t\t\"number\": \"50000000\"\n\t\t}\n\t},\n\t\"source\": {\n\t\t\"object\": \"source\",\n\t\t\"id\": \"src_card\"\n\t},\n\t\"redirect\": {\n\t\t\"status\": \"PENDING\",\n\t\t\"url\": \"http://your_website.com/redirecturl\"\n\t},\n\t\"post\": {\n\t\t\"status\": \"PENDING\",\n\t\t\"url\": \"http://your_website.com/posturl\"\n\t},\n\t\"auto\": {\n\t\t\"status\": \"PENDING\",\n\t\t\"type\": \"VOID\",\n\t\t\"time\": 100\n\t},\n\t\"metadata\": {\n\t\t\"udf1\": \"test_data_1\",\n\t\t\"udf2\": \"test_data_2\",\n\t\t\"udf3\": \"test_data_3\"\n\t}\n}"
                  },
                  "initiated with payment agreement": {
                    "value": "{\n\t\"id\": \"auth_TS02A3120230103t5BD1406164\",\n\t\"object\": \"authorize\",\n\t\"customer_initiated\": true,\n\t\"live_mode\": false,\n\t\"api_version\": \"V2\",\n\t\"method\": \"CREATE\",\n\t\"status\": \"INITIATED\",\n\t\"amount\": 100,\n\t\"currency\": \"KWD\",\n\t\"threeDSecure\": true,\n\t\"save_card\": true,\n\t\"merchant_id\": \"\",\n\t\"product\": \"GOSELL\",\n\t\"statement_descriptor\": \"sample\",\n\t\"transaction\": {\n\t\t\"timezone\": \"UTC+03:00\",\n\t\t\"created\": \"1686704611242\",\n\t\t\"url\": \"https://sandbox.payments.tap.company/test_gosell/v2/payment/tap_process.aspx?auth=qU%2fYHoOr4bn05rJaqU%2b%2fQCLvSZTftYoZXK0LVCOi3yI%3d\",\n\t\t\"expiry\": {\n\t\t\t\"period\": 30,\n\t\t\t\"type\": \"MINUTE\"\n\t\t},\n\t\t\"asynchronous\": false,\n\t\t\"amount\": 100,\n\t\t\"currency\": \"KWD\"\n\t},\n\t\"reference\": {\n\t\t\"transaction\": \"txn_0001\",\n\t\t\"order\": \"ord_0001\"\n\t},\n\t\"response\": {\n\t\t\"code\": \"100\",\n\t\t\"message\": \"Initiated\"\n\t},\n\t\"card\": {\n\t\t\"object\": \"card\",\n\t\t\"first_six\": \"424242\",\n\t\t\"last_four\": \"4242\"\n\t},\n\t\"receipt\": {\n\t\t\"email\": true,\n\t\t\"sms\": true\n\t},\n\t\"customer\": {\n\t\t\"id\": \"cus_TS01A4620230032p4KP1406279\",\n\t\t\"first_name\": \"Test\",\n\t\t\"last_name\": \"Test\",\n\t\t\"email\": \"test@test.com\",\n\t\t\"phone\": {\n\t\t\t\"country_code\": \"965\",\n\t\t\t\"number\": \"50000000\"\n\t\t}\n\t},\n\t\"source\": {\n\t\t\"object\": \"token\",\n\t\t\"id\": \"tok_Om5q623220khi113ke54568\"\n\t},\n\t\"redirect\": {\n\t\t\"status\": \"PENDING\",\n\t\t\"url\": \"http://your_website.com/redirecturl\"\n\t},\n\t\"post\": {\n\t\t\"status\": \"PENDING\",\n\t\t\"url\": \"http://your_website.com/posturl\"\n\t},\n\t\"auto\": {\n\t\t\"status\": \"PENDING\",\n\t\t\"type\": \"VOID\",\n\t\t\"time\": 168\n\t},\n\t\"metadata\": {\n\t\t\"udf1\": \"test_data_1\",\n\t\t\"udf2\": \"test_data_2\",\n\t\t\"udf3\": \"test_data_3\"\n\t}\n}"
                  },
                  "authorized response with payment agreement": {
                    "value": "{\n\t\"id\": \"auth_TS02A3120230103t5BD1406164\",\n\t\"object\": \"authorize\",\n\t\"customer_initiated\": true,\n\t\"live_mode\": false,\n\t\"api_version\": \"V2\",\n\t\"method\": \"GET\",\n\t\"status\": \"AUTHORIZED\",\n\t\"amount\": 100,\n\t\"currency\": \"KWD\",\n\t\"threeDSecure\": true,\n\t\"save_card\": true,\n\t\"merchant_id\": \"\",\n\t\"product\": \"GOSELL\",\n\t\"statement_descriptor\": \"sample\",\n\t\"transaction\": {\n\t\t\"authorization_id\": \"101224\",\n\t\t\"timezone\": \"UTC+03:00\",\n\t\t\"created\": \"1686704611242\",\n\t\t\"expiry\": {\n\t\t\t\"period\": 30,\n\t\t\t\"type\": \"MINUTE\"\n\t\t},\n\t\t\"asynchronous\": false,\n\t\t\"amount\": 100,\n\t\t\"currency\": \"KWD\"\n\t},\n\t\"reference\": {\n\t\t\"track\": \"tck_TS03A3220230103Zi291406883\",\n\t\t\"payment\": \"3214230103068836721\",\n\t\t\"gateway\": \"123456789012345\",\n\t\t\"acquirer\": \"316422101224\",\n\t\t\"transaction\": \"txn_0001\",\n\t\t\"order\": \"ord_0001\"\n\t},\n\t\"response\": {\n\t\t\"code\": \"001\",\n\t\t\"message\": \"Authorized\"\n\t},\n\t\"security\": {\n\t\t\"threeDSecure\": {\n\t\t\t\"id\": \"3ds_TS05A3120230103Ym2q1406242\",\n\t\t\t\"status\": \"Y\"\n\t\t}\n\t},\n\t\"acquirer\": {\n\t\t\"response\": {\n\t\t\t\"code\": \"00\",\n\t\t\t\"message\": \"Approved\"\n\t\t}\n\t},\n\t\"card\": {\n\t\t\"object\": \"card\",\n\t\t\"first_six\": \"424242\",\n\t\t\"brand\": \"VISA\",\n\t\t\"last_four\": \"4242\"\n\t},\n\t\"receipt\": {\n\t\t\"id\": \"203214230103061154\",\n\t\t\"email\": true,\n\t\t\"sms\": true\n\t},\n\t\"customer\": {\n\t\t\"id\": \"cus_TS01A4620230032p4KP1406279\",\n\t\t\"first_name\": \"Test\",\n\t\t\"last_name\": \"Test\",\n\t\t\"email\": \"test@test.com\",\n\t\t\"phone\": {\n\t\t\t\"country_code\": \"965\",\n\t\t\t\"number\": \"50000000\"\n\t\t}\n\t},\n\t\"source\": {\n\t\t\"object\": \"token\",\n\t\t\"type\": \"CARD_NOT_PRESENT\",\n\t\t\"payment_type\": \"CREDIT\",\n\t\t\"payment_method\": \"VISA\",\n\t\t\"channel\": \"INTERNET\",\n\t\t\"id\": \"tok_Om5q623220khi113ke54568\"\n\t},\n\t\"redirect\": {\n\t\t\"status\": \"SUCCESS\",\n\t\t\"url\": \"http://your_website.com/redirecturl\"\n\t},\n\t\"post\": {\n\t\t\"status\": \"PENDING\",\n\t\t\"url\": \"http://your_website.com/posturl\"\n\t},\n\t\"auto\": {\n\t\t\"status\": \"SCHEDULED\",\n\t\t\"type\": \"VOID\",\n\t\t\"time\": 168\n\t},\n\t\"description\": \"\",\n\t\"metadata\": {\n\t\t\"udf1\": \"test_data_1\",\n\t\t\"udf2\": \"test_data_2\",\n\t\t\"udf3\": \"test_data_3\"\n\t},\n\t\"payment_agreement\": {\n\t\t\"id\": \"payment_agreement_TS05A1920230911b2K12105431\",\n\t\t\"total_payments_count\": 0\n\t}\n}"
                  }
                },
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "auth_TS065220221533k5FK1505634"
                        },
                        "object": {
                          "type": "string",
                          "example": "authorize"
                        },
                        "live_mode": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        },
                        "api_version": {
                          "type": "string",
                          "example": "V2"
                        },
                        "method": {
                          "type": "string",
                          "example": "CREATE"
                        },
                        "status": {
                          "type": "string",
                          "example": "INITIATED"
                        },
                        "amount": {
                          "type": "integer",
                          "example": 1,
                          "default": 0
                        },
                        "currency": {
                          "type": "string",
                          "example": "KWD"
                        },
                        "threeDSecure": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "save_card": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        },
                        "merchant_id": {
                          "type": "string",
                          "example": ""
                        },
                        "product": {
                          "type": "string",
                          "example": ""
                        },
                        "statement_descriptor": {
                          "type": "string",
                          "example": "sample"
                        },
                        "transaction": {
                          "type": "object",
                          "properties": {
                            "timezone": {
                              "type": "string",
                              "example": "UTC+03:00"
                            },
                            "created": {
                              "type": "string",
                              "example": "1652628832666"
                            },
                            "url": {
                              "type": "string",
                              "example": "https://sandbox.payments.tap.company/test_gosell/v2/payment/response.aspx?tap_auth=qU%2fYHoOr4blXyIfDLNpJrPnvbvtHyf4yqjGjChH5aTk%3d&sess=6mXrG%2fSKpa0%3d&token=qU%2fYHoOr4blXyIfDLNpJrPnvbvtHyf4yee5pNiSxqVQ28X2kDyKgPg%3d%3d"
                            },
                            "expiry": {
                              "type": "object",
                              "properties": {
                                "period": {
                                  "type": "integer",
                                  "example": 30,
                                  "default": 0
                                },
                                "type": {
                                  "type": "string",
                                  "example": "MINUTE"
                                }
                              }
                            },
                            "asynchronous": {
                              "type": "boolean",
                              "example": false,
                              "default": true
                            },
                            "amount": {
                              "type": "integer",
                              "example": 1,
                              "default": 0
                            },
                            "currency": {
                              "type": "string",
                              "example": "KWD"
                            }
                          }
                        },
                        "reference": {
                          "type": "object",
                          "properties": {
                            "transaction": {
                              "type": "string",
                              "example": "txn_0001"
                            },
                            "order": {
                              "type": "string",
                              "example": "ord_0001"
                            }
                          }
                        },
                        "response": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "100"
                            },
                            "message": {
                              "type": "string",
                              "example": "Initiated"
                            }
                          }
                        },
                        "receipt": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean",
                              "example": true,
                              "default": true
                            },
                            "sms": {
                              "type": "boolean",
                              "example": true,
                              "default": true
                            }
                          }
                        },
                        "customer": {
                          "type": "object",
                          "properties": {
                            "first_name": {
                              "type": "string",
                              "example": "Test"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Test"
                            },
                            "email": {
                              "type": "string",
                              "example": "test@test.com"
                            },
                            "phone": {
                              "type": "object",
                              "properties": {
                                "country_code": {
                                  "type": "string",
                                  "example": "965"
                                },
                                "number": {
                                  "type": "string",
                                  "example": "50000000"
                                }
                              }
                            }
                          }
                        },
                        "source": {
                          "type": "object",
                          "properties": {
                            "object": {
                              "type": "string",
                              "example": "source"
                            },
                            "id": {
                              "type": "string",
                              "example": "src_card"
                            }
                          }
                        },
                        "redirect": {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "example": "PENDING"
                            },
                            "url": {
                              "type": "string",
                              "example": "http://your_website.com/redirecturl"
                            }
                          }
                        },
                        "post": {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "example": "PENDING"
                            },
                            "url": {
                              "type": "string",
                              "example": "http://your_website.com/posturl"
                            }
                          }
                        },
                        "auto": {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "example": "PENDING"
                            },
                            "type": {
                              "type": "string",
                              "example": "VOID"
                            },
                            "time": {
                              "type": "integer",
                              "example": 100,
                              "default": 0
                            }
                          }
                        },
                        "metadata": {
                          "type": "object",
                          "properties": {
                            "udf1": {
                              "type": "string",
                              "example": "test_data_1"
                            },
                            "udf2": {
                              "type": "string",
                              "example": "test_data_2"
                            },
                            "udf3": {
                              "type": "string",
                              "example": "test_data_3"
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "initiated with payment agreement",
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "auth_TS02A3120230103t5BD1406164"
                        },
                        "object": {
                          "type": "string",
                          "example": "authorize"
                        },
                        "customer_initiated": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "live_mode": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        },
                        "api_version": {
                          "type": "string",
                          "example": "V2"
                        },
                        "method": {
                          "type": "string",
                          "example": "CREATE"
                        },
                        "status": {
                          "type": "string",
                          "example": "INITIATED"
                        },
                        "amount": {
                          "type": "integer",
                          "example": 100,
                          "default": 0
                        },
                        "currency": {
                          "type": "string",
                          "example": "KWD"
                        },
                        "threeDSecure": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "save_card": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "merchant_id": {
                          "type": "string",
                          "example": ""
                        },
                        "product": {
                          "type": "string",
                          "example": "GOSELL"
                        },
                        "statement_descriptor": {
                          "type": "string",
                          "example": "sample"
                        },
                        "transaction": {
                          "type": "object",
                          "properties": {
                            "timezone": {
                              "type": "string",
                              "example": "UTC+03:00"
                            },
                            "created": {
                              "type": "string",
                              "example": "1686704611242"
                            },
                            "url": {
                              "type": "string",
                              "example": "https://sandbox.payments.tap.company/test_gosell/v2/payment/tap_process.aspx?auth=qU%2fYHoOr4bn05rJaqU%2b%2fQCLvSZTftYoZXK0LVCOi3yI%3d"
                            },
                            "expiry": {
                              "type": "object",
                              "properties": {
                                "period": {
                                  "type": "integer",
                                  "example": 30,
                                  "default": 0
                                },
                                "type": {
                                  "type": "string",
                                  "example": "MINUTE"
                                }
                              }
                            },
                            "asynchronous": {
                              "type": "boolean",
                              "example": false,
                              "default": true
                            },
                            "amount": {
                              "type": "integer",
                              "example": 100,
                              "default": 0
                            },
                            "currency": {
                              "type": "string",
                              "example": "KWD"
                            }
                          }
                        },
                        "reference": {
                          "type": "object",
                          "properties": {
                            "transaction": {
                              "type": "string",
                              "example": "txn_0001"
                            },
                            "order": {
                              "type": "string",
                              "example": "ord_0001"
                            }
                          }
                        },
                        "response": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "100"
                            },
                            "message": {
                              "type": "string",
                              "example": "Initiated"
                            }
                          }
                        },
                        "card": {
                          "type": "object",
                          "properties": {
                            "object": {
                              "type": "string",
                              "example": "card"
                            },
                            "first_six": {
                              "type": "string",
                              "example": "424242"
                            },
                            "last_four": {
                              "type": "string",
                              "example": "4242"
                            }
                          }
                        },
                        "receipt": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "boolean",
                              "example": true,
                              "default": true
                            },
                            "sms": {
                              "type": "boolean",
                              "example": true,
                              "default": true
                            }
                          }
                        },
                        "customer": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "example": "cus_TS01A4620230032p4KP1406279"
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Test"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Test"
                            },
                            "email": {
                              "type": "string",
                              "example": "test@test.com"
                            },
                            "phone": {
                              "type": "object",
                              "properties": {
                                "country_code": {
                                  "type": "string",
                                  "example": "965"
                                },
                                "number": {
                                  "type": "string",
                                  "example": "50000000"
                                }
                              }
                            }
                          }
                        },
                        "source": {
                          "type": "object",
                          "properties": {
                            "object": {
                              "type": "string",
                              "example": "token"
                            },
                            "id": {
                              "type": "string",
                              "example": "tok_Om5q623220khi113ke54568"
                            }
                          }
                        },
                        "redirect": {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "example": "PENDING"
                            },
                            "url": {
                              "type": "string",
                              "example": "http://your_website.com/redirecturl"
                            }
                          }
                        },
                        "post": {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "example": "PENDING"
                            },
                            "url": {
                              "type": "string",
                              "example": "http://your_website.com/posturl"
                            }
                          }
                        },
                        "auto": {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "example": "PENDING"
                            },
                            "type": {
                              "type": "string",
                              "example": "VOID"
                            },
                            "time": {
                              "type": "integer",
                              "example": 168,
                              "default": 0
                            }
                          }
                        },
                        "metadata": {
                          "type": "object",
                          "properties": {
                            "udf1": {
                              "type": "string",
                              "example": "test_data_1"
                            },
                            "udf2": {
                              "type": "string",
                              "example": "test_data_2"
                            },
                            "udf3": {
                              "type": "string",
                              "example": "test_data_3"
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "authorized response with payment agreement",
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "auth_TS02A3120230103t5BD1406164"
                        },
                        "object": {
                          "type": "string",
                          "example": "authorize"
                        },
                        "customer_initiated": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "live_mode": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        },
                        "api_version": {
                          "type": "string",
                          "example": "V2"
                        },
                        "method": {
                          "type": "string",
                          "example": "GET"
                        },
                        "status": {
                          "type": "string",
                          "example": "AUTHORIZED"
                        },
                        "amount": {
                          "type": "integer",
                          "example": 100,
                          "default": 0
                        },
                        "currency": {
                          "type": "string",
                          "example": "KWD"
                        },
                        "threeDSecure": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "save_card": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "merchant_id": {
                          "type": "string",
                          "example": ""
                        },
                        "product": {
                          "type": "string",
                          "example": "GOSELL"
                        },
                        "statement_descriptor": {
                          "type": "string",
                          "example": "sample"
                        },
                        "transaction": {
                          "type": "object",
                          "properties": {
                            "authorization_id": {
                              "type": "string",
                              "example": "101224"
                            },
                            "timezone": {
                              "type": "string",
                              "example": "UTC+03:00"
                            },
                            "created": {
                              "type": "string",
                              "example": "1686704611242"
                            },
                            "expiry": {
                              "type": "object",
                              "properties": {
                                "period": {
                                  "type": "integer",
                                  "example": 30,
                                  "default": 0
                                },
                                "type": {
                                  "type": "string",
                                  "example": "MINUTE"
                                }
                              }
                            },
                            "asynchronous": {
                              "type": "boolean",
                              "example": false,
                              "default": true
                            },
                            "amount": {
                              "type": "integer",
                              "example": 100,
                              "default": 0
                            },
                            "currency": {
                              "type": "string",
                              "example": "KWD"
                            }
                          }
                        },
                        "reference": {
                          "type": "object",
                          "properties": {
                            "track": {
                              "type": "string",
                              "example": "tck_TS03A3220230103Zi291406883"
                            },
                            "payment": {
                              "type": "string",
                              "example": "3214230103068836721"
                            },
                            "gateway": {
                              "type": "string",
                              "example": "123456789012345"
                            },
                            "acquirer": {
                              "type": "string",
                              "example": "316422101224"
                            },
                            "transaction": {
                              "type": "string",
                              "example": "txn_0001"
                            },
                            "order": {
                              "type": "string",
                              "example": "ord_0001"
                            }
                          }
                        },
                        "response": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "001"
                            },
                            "message": {
                              "type": "string",
                              "example": "Authorized"
                            }
                          }
                        },
                        "security": {
                          "type": "object",
                          "properties": {
                            "threeDSecure": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "example": "3ds_TS05A3120230103Ym2q1406242"
                                },
                                "status": {
                                  "type": "string",
                                  "example": "Y"
                                }
                              }
                            }
                          }
                        },
                        "acquirer": {
                          "type": "object",
                          "properties": {
                            "response": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "example": "00"
                                },
                                "message": {
                                  "type": "string",
                                  "example": "Approved"
                                }
                              }
                            }
                          }
                        },
                        "card": {
                          "type": "object",
                          "properties": {
                            "object": {
                              "type": "string",
                              "example": "card"
                            },
                            "first_six": {
                              "type": "string",
                              "example": "424242"
                            },
                            "brand": {
                              "type": "string",
                              "example": "VISA"
                            },
                            "last_four": {
                              "type": "string",
                              "example": "4242"
                            }
                          }
                        },
                        "receipt": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "example": "203214230103061154"
                            },
                            "email": {
                              "type": "boolean",
                              "example": true,
                              "default": true
                            },
                            "sms": {
                              "type": "boolean",
                              "example": true,
                              "default": true
                            }
                          }
                        },
                        "customer": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "example": "cus_TS01A4620230032p4KP1406279"
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Test"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Test"
                            },
                            "email": {
                              "type": "string",
                              "example": "test@test.com"
                            },
                            "phone": {
                              "type": "object",
                              "properties": {
                                "country_code": {
                                  "type": "string",
                                  "example": "965"
                                },
                                "number": {
                                  "type": "string",
                                  "example": "50000000"
                                }
                              }
                            }
                          }
                        },
                        "source": {
                          "type": "object",
                          "properties": {
                            "object": {
                              "type": "string",
                              "example": "token"
                            },
                            "type": {
                              "type": "string",
                              "example": "CARD_NOT_PRESENT"
                            },
                            "payment_type": {
                              "type": "string",
                              "example": "CREDIT"
                            },
                            "payment_method": {
                              "type": "string",
                              "example": "VISA"
                            },
                            "channel": {
                              "type": "string",
                              "example": "INTERNET"
                            },
                            "id": {
                              "type": "string",
                              "example": "tok_Om5q623220khi113ke54568"
                            }
                          }
                        },
                        "redirect": {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "example": "SUCCESS"
                            },
                            "url": {
                              "type": "string",
                              "example": "http://your_website.com/redirecturl"
                            }
                          }
                        },
                        "post": {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "example": "PENDING"
                            },
                            "url": {
                              "type": "string",
                              "example": "http://your_website.com/posturl"
                            }
                          }
                        },
                        "auto": {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "example": "SCHEDULED"
                            },
                            "type": {
                              "type": "string",
                              "example": "VOID"
                            },
                            "time": {
                              "type": "integer",
                              "example": 168,
                              "default": 0
                            }
                          }
                        },
                        "description": {
                          "type": "string",
                          "example": ""
                        },
                        "metadata": {
                          "type": "object",
                          "properties": {
                            "udf1": {
                              "type": "string",
                              "example": "test_data_1"
                            },
                            "udf2": {
                              "type": "string",
                              "example": "test_data_2"
                            },
                            "udf3": {
                              "type": "string",
                              "example": "test_data_3"
                            }
                          }
                        },
                        "payment_agreement": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "example": "payment_agreement_TS05A1920230911b2K12105431"
                            },
                            "total_payments_count": {
                              "type": "integer",
                              "example": 0,
                              "default": 0
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"errors\": [\n\t\t{\n\t\t\t\"code\": \"1125\",\n\t\t\t\"description\": \"We were unable to process your payment. Please verify your payment method or card details and try again.\"\n\t\t}\n\t]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "example": "1125"
                          },
                          "description": {
                            "type": "string",
                            "example": "We were unable to process your payment. Please verify your payment method or card details and try again."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "parameters": [
          {
            "in": "header",
            "name": "lang_code",
            "schema": {
              "type": "string",
              "default": "en"
            },
            "description": "change the language in the redirection page to \"en\" or \"ar\""
          }
        ]
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```