Skip to content

Create payment link

To create a payment link, you can use the following endpoint:

POST https://[base_url]/v2/links/schedule/

Body parameters

PARAMETER TYPE REQ. DESCRIPTION
hotel_id Integer Yes Hotel ID associated with the reservation. Refer to List hotels
guest_name String Yes Guest's full name
email String Yes Guest's email
phone String Yes Guest's phone
amount String Yes Amount to be paid by the guest
booking_dates String No Booking dates in format "YYYY-MM-DD - YYYY-MM-DD"
description String Yes Payment link description
available_hours Integer Yes Validity of the payment link in hours
source String No Payment link source. Please contact [email protected] to get your source string
external_ref_id String No External identification ID for future payment references
temp_webhook_url String No Url of the webhook to which the payment notification will be sent by Autocore. It must be an endpoint that receives POST requests.
redirect.success_url String No URL to which the redirect is made when the payment is successful.
redirect.failure_url String No URL to which the redirect is made when the payment fails.
allowed_payment_options Array No List of supported payment methods that can be displayed at checkout. Accepted values are: 'nequi', 'daviplata', 'pse', 'credit_card', 'sinpe_movil', 'preloaded_balance', 'gift_cards'.
reservation_id String No Reference to the associated reservation, if available.

Body example

{
    "hotel_id": 5,
    "guest_name": "Laura Pelaez",
    "email": "[email protected]",
    "phone": "3012104512",
    "amount": 1200100,
    "booking_dates": "2024-12-31 - 2020-01-29",
    "description": "Reserva de 3 dias en Hotel A",
    "available_hours": 100,
    "source": "Bitrix24 GehSuites",
    "reservation_id": "BK-00230690",
    "external_ref_id": "#45645",
    "temp_webhook_url":"https://195.ngrok-free.app/payment",
    "redirect": {
        "success_url": "https://app-dev.autocore.pro/main/link/success",
        "failure_url": "https://app-dev.autocore.pro/main/link/failure"
    }
}

Status code: 200

{
    "msg": "Link de pago generado exitosamente",
    "url": "https://app-dev.autocore.pro/payment?id=2267b24f-49db-4ea3-94c1-de40ed98370f"
}

Endpoint response

Status code: 200

{
    "msg": "Link de pago generado exitosamente",
    "url": "https://app-dev.autocore.pro/payment?id=2267b24f-49db-4ea3-94c1-de40ed98370f"
}

Status code: 401, 403, 404

{
 "code": "Status code",
 "message":"Error description",
 "detail": "Error details"
}