Skip to main content
Skip table of contents

Card Authorization API

Request

Method_details object for cards inside the authorization frame: Authorization API.

Field

Description

Accepted Value

Type

Madatory

pan

Card number

Numeric

String

YES

expiry_date

Card expiration date in the format MMYY

Numeric

String

YES

security_code

Card Security Code (CVV)

Numeric

String

YES

card_holder

Object containing cardholder information

Object

YES

card_holder.first_name

Cardholder's first name

Alfanumeric

String

YES

card_holder.last_name

Cardholder's last name

Alfanumeric

String

YES

card_holder.email

Cardholder's e-mail address

Alfanumeric

String

YES

card_holder.phone

Object with card holder's phone information

Object

YES

card_holder.phone.prefix

Cellphone country code

Numeric

String

YES

card_holder.phone.number

Cellphone number

Numeric

String

YES

redirect_url

URL where the redirect will be made when the authorization is finished.

*Application for Merchants with 3DS Authentication for card in a single API.

Alfanumeric

String

NO*

callback_url

URL where the host to host (server to server) notification will be made.

*Application for Merchants with 3DS Authentication for card in a single API when it is variable.

Alfanumeric

String

NO*

authentication_result.3ds_secure

Object with information on the 3D Secure authentication result

Object

NO

authentication_result.3ds_secure.version

Protocol version

Alfanumeric

String

NO

authentication_result.3ds_secure.electronic_commerce_indicator

ECI value

Alfanumeric

String

NO

authentication_result.3ds_secure.cardholder_authentication_verification_value

CAVV value

Alfanumeric

String

NO

authentication_result.3ds_secure.ds_transaction_id

Directory server transaction id

Alfanumeric

String

NO

authentication_result.3ds_secure.tds_transaction_id

3DS server transaction id

Alfanumeric

String

NO

authentication_result.3ds_secure.verifika_commerce_indicator

VCI value

Alfanumeric

String

NO

service.installments

Object with information about installments

Object

NO

service.installments.plan

Plan ID to be used for authorization

Numeric

String

NO

service.installments.number

Number of installments to be used for authorization

Numeric

String

NO

Example 1 (without Authentication)

Request to authorize Card without Authentication.

JSON
{
    "action": "authorize",
    "channel": "ecommerce",
    "merchant_code":"b0deb6f3-e51a-48a7-9268-f1441d46f7bd",
    "merchant_operation_number": "2391645",
    "payment_method": {
        "method_name": "CARD",
        "method_details": {
            "pan": "4051420006041115",
            "expiry_date": "1231",
            "security_code": "123",
            "card_holder": {
                "first_name": "Pedro",
                "last_name": "Miranda",
                "email": "pedro@pay-me.com",
                "phone": {
                    "prefix": "51",
                    "number": "999835685"
                }
            },
            "installments": {
                "plan": "01",
                "number": "03"
            }
        }
    },
    "payment_details": {
        "amount": "15000",
        "currency": "604",
        "billing": {
            "first_name": "Pedro",
            "last_name": "Miranda",
            "email": "pedro@pay-me.com",
            "phone": {
                "country_code": "+51",
                "subscriber": "999835685"
            },
            "location": {
                "line_1": "Av. Casimiro Ulloa 333",
                "line_2": "Miraflores",
                "city": "Lima",
                "state": "Lima",
                "country": "Peru"
            }
        },
        "shipping": {
            "first_name": "Pedro",
            "last_name": "Miranda",
            "email": "pedro@pay-me.com",
            "phone": {
                "country_code": "+51",
                "subscriber": "999835685"
            },
            "location": {
                "line_1": "Av. Casimiro Ulloa 333",
                "line_2": "Miraflores",
                "city": "Lima",
                "state": "Lima",
                "country": "Peru"
            }
        },
        "customer": {
            "first_name": "Pedro",
            "last_name": "Miranda",
            "email": "pedro@pay-me.com",
            "phone": {
                "country_code": "+51",
                "subscriber": "999835685"
            },
            "location": {
                "line_1": "Av. Casimiro Ulloa 333",
                "line_2": "Miraflores",
                "city": "Lima",
                "state": "Lima",
                "country": "Peru"
            }
        },
        "product_details": []
        }
    }
}

Example 2 (with Redirect Authentication)

Request to authorize Card with Redirect for a single Authorization + 3DS Authentication API.

To receive the final Authorization response with Redirect Authentication take into consideration the Considerations for Redirect methods.

JSON
{
    "action": "authorize",
    "channel": "ecommerce",
    "merchant_code":"b0deb6f3-e51a-48a7-9268-f1441d46f7bd",
    "merchant_operation_number": "2391645",
    "payment_method": {
        "method_name": "CARD",
        "method_details": {
            "pan": "4051420006041115",
            "expiry_date": "1231",
            "security_code": "123",
            "card_holder": {
                "first_name": "Pedro",
                "last_name": "Miranda",
                "email": "pedro@pay-me.com",
                "phone": {
                    "prefix": "51",
                    "number": "999835685"
                }
            },
            "redirect_url": "https://pay-me.com",
            "callback_url": "https://pay-me.com/callback",
            "installments": {
                "plan": "01",
                "number": "03"
            }
        }
    },
    "payment_details": {
        "amount": "15000",
        "currency": "604",
        "billing": {
            "first_name": "Pedro",
            "last_name": "Miranda",
            "email": "pedro@pay-me.com",
            "phone": {
                "country_code": "+51",
                "subscriber": "999835685"
            },
            "location": {
                "line_1": "Av. Casimiro Ulloa 333",
                "line_2": "Miraflores",
                "city": "Lima",
                "state": "Lima",
                "country": "Peru"
            }
        },
        "shipping": {
            "first_name": "Pedro",
            "last_name": "Miranda",
            "email": "pedro@pay-me.com",
            "phone": {
                "country_code": "+51",
                "subscriber": "999835685"
            },
            "location": {
                "line_1": "Av. Casimiro Ulloa 333",
                "line_2": "Miraflores",
                "city": "Lima",
                "state": "Lima",
                "country": "Peru"
            }
        },
        "customer": {
            "first_name": "Pedro",
            "last_name": "Miranda",
            "email": "pedro@pay-me.com",
            "phone": {
                "country_code": "+51",
                "subscriber": "999835685"
            },
            "location": {
                "line_1": "Av. Casimiro Ulloa 333",
                "line_2": "Miraflores",
                "city": "Lima",
                "state": "Lima",
                "country": "Peru"
            }
        },
        "product_details": []
        }
    }
}

Example 3 (with Authentication Data)

Request to authorize Card with 3DS Authentication result data, previously consumed by another 3DS API.

JSON
{
    "action": "authorize",
    "channel": "ecommerce",
    "merchant_code":"b0deb6f3-e51a-48a7-9268-f1441d46f7bd",
    "merchant_operation_number": "2391645",
    "payment_method": {
        "method_name": "CARD",
        "method_details": {
            "pan": "4051420006041115",
            "expiry_date": "1231",
            "security_code": "123",
            "card_holder": {
                "first_name": "Pedro",
                "last_name": "Miranda",
                "email": "pedro@pay-me.com",
                "phone": {
                    "prefix": "51",
                    "number": "999835685"
                }
            },
            "authentication_result": {
                "3d_secure": {
                    "version": "2.1.0",
                    "electronic_commerce_indicator": "05",
                    "cardholder_authentication_verification_value": "AJkBB5NBeQAAAD3MYENQdAAAAAA=",
                    "ds_transaction_id": "ABC123",
                    "three_ds_server_transaction_id": "ABC123",
                    "verifika_commerce_indicator": "TSY"
                }
            },
            "installments": {
                "plan": "01",
                "number": "03"
            }
        }
    },
    "payment_details": {
        "amount": "15000",
        "currency": "604",
        "billing": {
            "first_name": "Pedro",
            "last_name": "Miranda",
            "email": "pedro@pay-me.com",
            "phone": {
                "country_code": "+51",
                "subscriber": "999835685"
            },
            "location": {
                "line_1": "Av. Casimiro Ulloa 333",
                "line_2": "Miraflores",
                "city": "Lima",
                "state": "Lima",
                "country": "Peru"
            }
        },
        "shipping": {
            "first_name": "Pedro",
            "last_name": "Miranda",
            "email": "pedro@pay-me.com",
            "phone": {
                "country_code": "+51",
                "subscriber": "999835685"
            },
            "location": {
                "line_1": "Av. Casimiro Ulloa 333",
                "line_2": "Miraflores",
                "city": "Lima",
                "state": "Lima",
                "country": "Peru"
            }
        },
        "customer": {
            "first_name": "Pedro",
            "last_name": "Miranda",
            "email": "pedro@pay-me.com",
            "phone": {
                "country_code": "+51",
                "subscriber": "999835685"
            },
            "location": {
                "line_1": "Av. Casimiro Ulloa 333",
                "line_2": "Miraflores",
                "city": "Lima",
                "state": "Lima",
                "country": "Peru"
            }
        },
        "product_details": []
        }
    }
}

Response

processor_response object for card payments within the response frame: Authorization API.

This field is variable and modifiable over time, take it as a reference.

Field

Description

Accepted Value

Type

date

Date and time at which the authorization was made

Date and Time

String

authorization_code

Authorization code provided by the processor.

Numeric

String

result_message

Object with information on the result of the authorization

 

Object

result_message.code

Authorization result code

Numeric

String

result_message.description

Description of the result of the authorization

Alfanumeric

String

Example 1 (without Authentication)

Response to authorize Card without Authentication.

JSON
{
    "success": "true",
    "action": "authorize",
    "merchant_code":"b0deb6f3-e51a-48a7-9268-f1441d46f7bd",
    "merchant_operation_number": "2391645",
    "transaction": {
        "transaction_id": "5hk8rwa3h3cq9oyfs3a28v1ms",
        "state": "AUTORIZADO",
        "redirect_url": null,
        "amount": "15000",
        "currency": "604",
        "expiration": null,
        "processor_response": {
            "date": "17-01-2024 12:27:46",
            "authorization_code": "055552",
            "result_message": {
                "code": "00",
                "description": "Approval and completed successfully"
            }
        }
    },
    "meta": {
        "status": {
            "code": "00",
            "message_ilgn": [
                {
                    "locale": "es_PE",
                    "value": "Procesado correctamente"
                }
            ]
        }
    }
}

Example 2 (with Redirect Authentication)

Response to authorize Card with Redirect for a unique Authorization + 3DS Authentication API.

To receive the final Authorization response with Redirect Authentication take into consideration the Considerations for Redirect methods.

JSON
{
    "success": "true",
    "action": "authorize",
    "merchant_code":"b0deb6f3-e51a-48a7-9268-f1441d46f7bd",
    "merchant_operation_number": "2391645",
    "transaction": {
        "transaction_id": "5hk8rwa3h3cq9oyfs3a28v1ms",
        "state": "PENDIENTE",
        "redirect_url": "http://paymentapi.alignet.io/payment/redirect/cuotealo/2be5s7xu4i6fzrmbvp167inb2",
        "amount": "15000",
        "currency": "604",
        "expiration": {
            "date": {
                "day": "2024-01-14",
                "time": "22:32:47",
                "timezone": "America/Lima"
                },
            "unix_time": 1705548767
        },
        "processor_response": null
        }
    },
    "meta": {
        "status": {
            "code": "00",
            "message_ilgn": [
                {
                    "locale": "es_PE",
                    "value": "Procesado correctamente"
                }
            ]
        }
    }
}

Example 3 (with Authentication Data)

Response to authorize Card with 3DS Authentication result data, previously consumed by another 3DS API.

JSON
{
    "success": "true",
    "action": "authorize",
    "merchant_code":"b0deb6f3-e51a-48a7-9268-f1441d46f7bd",
    "merchant_operation_number": "2391645",
    "transaction": {
        "transaction_id": "5hk8rwa3h3cq9oyfs3a28v1ms",
        "state": "AUTORIZADO",
        "redirect_url": null,
        "amount": "15000",
        "currency": "604",
        "expiration": null,
        "processor_response": {
            "date": "17-01-2024 12:27:46",
            "authorization_code": "055552",
            "result_message": {
                "code": "00",
                "description": "Approval and completed successfully"
            }
        }
    },
    "meta": {
        "status": {
            "code": "00",
            "message_ilgn": [
                {
                    "locale": "es_PE",
                    "value": "Procesado correctamente"
                }
            ]
        }
    }
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.