# Conekta

# 1. Generar link de pago

El método devuelve un link que redirige al medio de pago.

POST /pagos

REQUEST

  • provider: (Tipo de dato: string). Nombre del Servicio de Pagos ("conekta"). Campo obligatorio.

  • action: (Tipo de dato: string). Tipo de acción a ejecutar ("create"). Campo obligatorio.

  • amount: (Tipo de dato: integer). Monto a cobrar con punto y dos decimales. Campo obligatorio.

  • reference_id: (Tipo de dato: string). Id de la orden. Campo obligatorio.

  • return_url: (Tipo de dato: string). Dominio del sitio al cual se enviará la notificación del pago. Campo obligatorio.

  • notification_url: (Tipo de dato: string). Url al la cual se va a notificar el resultado de la transacción. Campo obligatorio.

  • secret: (Tipo de dato: string). Api secret provista por Conekta. Campo obligatorio.

  • first_name: (Tipo de dato: string). Primer nombre. Campo obligatorio.

  • last_name: (Tipo de dato: string). Apellido. Campo obligatorio.

  • email: (Tipo de dato: string). Email del cliente. Campo obligatorio.

{
    "provider": "conekta",
    "action": "create",
    "reference_id": "6588",
    "secret": "key_xxjg4bsD9nohnMjwaTGytA",
    "first_name": "andres",
    "last_name": "jaro",
    "amount": 1000,
    "return_url": "http://template.pow.la",
    "email": "andres.jaromezuk@gmail.com"
}

RESPONSE

  • checkout.url: url para redirigir al usuario al sitio de Conekta para efectuar el pago.
{
    "livemode": false,
    "amount": 100000,
    "currency": "MXN",
    "amount_refunded": 0,
    "customer_info": {
        "email": "andres.jaromezuk@gmail.com",
        "name": "andres jaro",
        "corporate": false,
        "customer_id": "cus_2uDDh4UtYCmRLNA3P",
        "object": "customer_info"
    },
    "shipping_contact": {
        "receiver": "andres jaro",
        "phone": "+5215555555555",
        "address": {
            "street1": "Nuevo Leon 4",
            "country": "mx",
            "residential": true,
            "object": "shipping_address",
            "postal_code": "06100"
        },
        "id": "ship_cont_2uDDh4hPw6TYWyewH",
        "object": "shipping_contact",
        "created_at": 1689366274
    },
    "channel": {
        "segment": "Checkout",
        "checkout_request_id": "616ba38f-c415-4d1f-9c5c-70b9c2752f3d",
        "checkout_request_type": "HostedPayment",
        "id": "channel_2uDDh4hPw6TYWyewK"
    },
    "checkout": {
        "id": "616ba38f-c415-4d1f-9c5c-70b9c2752f3d",
        "name": "ord-2uDDh4hPw6TYWyewJ",
        "livemode": false,
        "emails_sent": 0,
        "success_url": "http://template.pow.la/conekta/conekta_order",
        "failure_url": "http://template.pow.la/conekta/conekta_order",
        "paid_payments_count": 0,
        "sms_sent": 0,
        "status": "Issued",
        "type": "HostedPayment",
        "recurrent": false,
        "starts_at": 1689314400,
        "expires_at": 1689573599,
        "allowed_payment_methods": [
            "cash",
            "card",
            "bank_transfer"
        ],
        "exclude_card_networks": [],
        "needs_shipping_contact": false,
        "monthly_installments_options": [
            3,
            6,
            9,
            12
        ],
        "monthly_installments_enabled": true,
        "is_redirect_on_failure": true,
        "redirection_time": 4,
        "force_3ds_flow": false,
        "metadata": {},
        "can_not_expire": false,
        "object": "checkout",
        "slug": "616ba38fc4154d1f9c5c70b9c2752f3d",
        "url": "https://pay.conekta.com/checkout/616ba38fc4154d1f9c5c70b9c2752f3d"
    },
    "object": "order",
    "id": "ord_2uDDh4hPw6TYWyewJ",
    "metadata": {},
    "is_refundable": false,
    "created_at": 1689366274,
    "updated_at": 1689366274,
    "line_items": {
        "object": "list",
        "has_more": false,
        "total": 1,
        "data": [
            {
                "name": "6588",
                "unit_price": 100000,
                "quantity": 1,
                "object": "line_item",
                "id": "line_item_2uDDh4hPw6TYWyewE",
                "parent_id": "ord_2uDDh4hPw6TYWyewJ",
                "metadata": {},
                "antifraud_info": {}
            }
        ]
    },
    "shipping_lines": {
        "object": "list",
        "has_more": false,
        "total": 1,
        "data": [
            {
                "amount": 0,
                "object": "shipping_line",
                "id": "ship_lin_2uDDh4hPw6TYWyewF",
                "parent_id": "ord_2uDDh4hPw6TYWyewJ"
            }
        ]
    }
}