Authorize

The Authorize API is used to reserve a specified amount of funds on the customer's payment method. It returns a payment link for the customer to complete the card details and confirms the authorization request.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Request Model

The request is a POST request with the following parameters:

Input ParameterTypeLengthDescription
productsArray of Products (Product Model)-Details of the items being purchased.
orderObject (Order Model)-Order details including amount and currency for authorization.
paymentGatewayObject (PaymentGateway Model)-Payment gateway configuration.
languageString5Preferred language for the payment page (e.g., "en").
reference.idString50Unique reference ID for the specific authorization request.
customerObject (Customer Model)-Customer contact and identifier information.
returnUrlString (URL)255URL to redirect to upon successful payment completion.
cancelUrlString (URL)255URL to redirect to if the customer cancels the payment.
notificationUrlString (URL)255Merchant endpoint for receiving asynchronous status updates (webhook).
{
    "products": [
        {
            "name": "Logitech K380",
            "description": "Easy-Switch for Up to 3 Devices, Slim Bluetooth Tablet Keyboard",
            "price": 0.005,
            "quantity": 1
        },
        {
            "name": "Logitech M171 Wireless Optical Mouse",
            "description": "2.4GHz Wireless, Blue Grey",
            "price": 0.005,
            "quantity": 1
        }
    ],
    "order": {
        "id": "202210101255255144669",
        "reference": "11111991",
        "description": "Purchase order received for Logitech K380 Keyboard",
        "currency": "KWD",
        "amount": 65
    },
    "paymentGateway": {
        "src": "cc"
    },
    "language" : "en",
    "reference": {
        "id": "202210101202210101"
    },
    "customer": {
        "uniqueId": "2129879243767881",
        "name": "Juliette Bonilla",
        "email": "[email protected]",
        "mobile": "+96566336537"
    },
    "returnUrl": "https://upayments.com/en/",
    "cancelUrl": "https://error.com",
    "notificationUrl": "https://webhook.site/2547b895-5899-4a21-a6f2-ed34c4228216"
}

Response Model

Input ParameterTypeMax LengthDescription
statusBoolean100true if the request was successfully processed (not necessarily authorized, but a link was generated).
messageString100A descriptive message regarding the operation.
data.linkString (URL)100The payment URL to which the customer must be redirected to complete the authorization.
data.trackIdString20A unique tracking ID for the authorization session.
{
    "status": true,
    "message": "Payment link generated successfully",
    "data": {
        "link": "https://sandboxapi.upayments.com/merchant/?session_id=20250815013010856737489181515769970363960300194",
        "trackId": "019a338a6f59089a392ac76862130dbf"
    }
}

Responses
200

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json