Payment

A transaction made by the user within a payment session is identified as payment..


Refund

The refund endpoint allows to refund an approved transaction. See more in Refund

POST/api/reverse

Refund payment

Allows you to refund an approved payment with the internal reference code internalReference.

Request

  • Name
    auth
    Type
    Authentication
    is Required
    REQUIRED
    Description

    Site authentication. See more in Authentication

  • Name
    internalReference
    Type
    integer
    is Required
    REQUIRED
    Description

    Unique internal reference of the transaction

    e.g.: 543423

  • Name
    amount
    Type
    Amount
    is optional
    Description

    Amount Information. This property is sent when you want to make a reversal with a value less than the total amount of the transaction.

Request

POST
/api/reverse
curl -X "POST" https://checkout-test.placetopay.com/api/session/000000 \
-H "Content-Type: application/json" \
-d '{
    "auth": {
        "login": "aabbccdd1234567890aabbccdd123456",
        "tranKey": "ABC123example456trankey+789abc012def3456ABC=",
        "nonce": "NjE0OWVkODgwYjNhNw==",
        "seed": "2021-09-21T09:34:48-05:00"
    },
    "internalReference": 1
}'

Response

OK

  • Name
    status
    Type
    Status
    is optional
    Description

    Structure that contains the response information about a request or payment, and reports the current status of the same.

  • Name
    payment
    Type
    PaymentResponse
    is optional
    Description

Response

{
    "status": {
        "status": "APPROVED",
        "reason": "00",
        "message": "approved",
        "date": "2021-12-07T16:01:19-05:00"
    },
    "payment": {
        "status": {
        "status": "APPROVED",
        "reason": "00",
        "message": "approved",
        "date": "2021-12-07T16:01:18-05:00"
        },
        "internalReference": 1,
        "paymentMethod": "visa",
        "paymentMethodName": "Visa",
        "issuerName": "JPMORGAN CHASE BANK, N.A.",
        "amount": {
        "from": {
            "currency": "USD",
            "total": 100
        },
        "to": {
            "currency": "USD",
            "total": 100
        },
        "factor": 1
        },
        "authorization": "123456",
        "reference": "12345",
        "receipt": "230955511860",
        "franchise": "PS_VS",
        "refunded": false,
        "processorFields": [
        {
            "keyword": "merchantCode",
            "value": "1465675",
            "displayOn": "none"
        },
        {
            "keyword": "terminalNumber",
            "value": "00990099",
            "displayOn": "none"
        },
        {
            "keyword": "credit",
            "value": {
            "code": "1",
            "type": "00",
            "groupCode": "C",
            "installments": 1
            },
            "displayOn": "none"
        },
        {
            "keyword": "totalAmount",
            "value": 52,
            "displayOn": "none"
        },
        {
            "keyword": "interestAmount",
            "value": 0,
            "displayOn": "none"
        },
        {
            "keyword": "installmentAmount",
            "value": 0,
            "displayOn": "none"
        },
        {
            "keyword": "iceAmount",
            "value": 0,
            "displayOn": "none"
        },
        {
            "keyword": "bin",
            "value": "411111",
            "displayOn": "none"
        },
        {
            "keyword": "expiration",
            "value": "1223",
            "displayOn": "none"
        },
        {
            "keyword": "lastDigits",
            "value": "1111",
            "displayOn": "none"
        },
        {
            "keyword": "id",
            "value": "a10fe0690cfe557283310ba90746e159",
            "displayOn": "none"
        },
        {
            "keyword": "b24",
            "value": "00",
            "displayOn": "none"
        }
        ]
    }
}

POST/api/transaction

Transaction actions

It allows you to perform basic preauthorization operations such as checkout, reauthorization, (Does not apply to Puerto Rico) on the other hand it also allows you to reverse an approved payment with the internal reference code reverse.

Request

Structure that allows for preauthorization requests such as checkout, reauthorization and reverse

  • Name
    auth
    Type
    Authentication
    is Required
    REQUIRED
    Description

    Site authentication. See more in Authentication

  • Name
    action
    Type
    string
    is Required
    REQUIRED
    Description

    Type of operation to perform on the transaction

    reverse to reverse a transaction. reauthorization to modify a checkin transaction. checkout to close and collect a checkin transaction.

    Allowed values:checkoutreauthorizationreverse
    Example:checkout
  • Name
    internalReference
    Type
    integer
    is Required
    REQUIRED
    Description

    Unique internal reference of the transaction

    e.g.: 543423

  • Name
    amount
    Type
    Amount
    is optional
    Description

    Information on the amount to be collected

Request

POST
/api/transaction
curl -X "POST" https://checkout-test.placetopay.com/api/transaction \
    -H "Content-Type: application/json" \
    -d "{
        "auth": {
            "login": "aabbccdd1234567890aabbccdd123456",
            "tranKey": "ABC123example456trankey+789abc012def3456ABC=",
            "nonce": "NjE0OWVkODgwYjNhNw==",
            "seed": "2021-09-21T09:34:48-05:00"
        },
        "internalReference": 640,
        "amount": {
            "currency": "USD",
            "total": "500"
        },
        "action": "checkout"
    }"

Response

OK

  • Name
    reference
    Type
    string
    is Required
    REQUIRED
    Description

    Unique payment reference, consisting of up to 32 alphanumeric characters and permitted symbols e.g.: PAYMENT_0001_ABC, Venta_1234-ABCD#2024/03/15$500, Ord: 1001/2023

    Example:12345
  • Name
    description
    Type
    string
    is optional
    Description

    Description of the process to be performed, allowing up to 250 alphanumeric, accented characters, and common symbols e.g.: Cita con el Dr. Pérez a las 10:00 am. 5/12/2024, por $100.00

    Example:Consumo mes de Mayo
  • Name
    amount
    Type
    Amount
    is Required
    REQUIRED
    Description

    Information on the amount to be collected

  • Name
    allowPartial
    Type
    boolean
    is optional
    Description

    Defines if the amount to be charged can be paid in several transactions. When set to true the user will be able to complete the payment in multiple transactions.

    Default value:false
  • Name
    shipping
    Type
    Person
    is optional
    Description

    Structure to relate shipping information.

  • Name
    items
    Type
    array[Item]
    is optional
    Description

    Structure to relate products or items in the process.

  • Name
    fields
    Type
    array[NameValuePair]
    is optional
    Description

    Structure to relate additional information in the process. See more in Additional Fields

  • Name
    recurring
    Type
    object
    is optional
    Description

    Structure to indicate the frequency of a recurring charge.

  • Name
    subscribe
    Type
    boolean
    is optional
    Description

    When true is sent, a subscription payment session is generated.

    In the payment process, the user can choose whether or not to save his payment method to be used in future charges..

    Default value:false
  • Name
    dispersion
    Type
    array[DispersionDetail]
    is optional
    Description

    When defined, a scatter payment session is generated. The generated payment can be divided into different destinations according to the given conditions.

  • Name
    modifiers
    Type
    array[Modifiers]
    is optional
    Description

    Structure to define modifiers in the collection.

    Applies to tax laws in specific countries.

  • Name
    processorFields
    Type
    array[NameValuePair]
    is optional
    Description

    Structure that may vary over time depending on the information available for the means of payment. See more in Processor Fields


Response

{
    "reference": "12345",
    "description": "Prueba de pago",
    "amount": {
        "currency": "COP",
        "total": 2000,
        "taxes": [
        {
            "kind": "valueAddedTax",
            "amount": 1000,
            "base": 0
        }
        ],
        "details": [
        {
            "kind": "discount",
            "amount": 1000
        }
        ]
    },
    "allowPartial": false,
    "shipping": {
        "document": "1122334455",
        "documentType": "CC",
        "name": "John",
        "surname": "Doe",
        "company": "Evertec",
        "email": "[email protected]",
        "mobile": "+5731111111111",
        "address": {
            "street": "Calle falsa 123",
            "city": "Medellín",
            "state": "Poblado",
            "postalCode": "55555",
            "country": "CO",
            "phone": "+573111111111"
        }
    },
    "items": [
        {
        "sku": "12345",
        "name": "product_1",
        "category": "physical",
        "qty": "1",
        "price": 1000,
        "tax": 0
        }
    ],
    "fields": [
        {
        "keyword": "_test_field_value_",
        "value": "_test_field_",
        "displayOn": "approved"
        }
    ],
    "recurring": {
        "periodicity": "D",
        "interval": "1",
        "nextPayment": "2019-08-24",
        "maxPeriods": 1,
        "dueDate ": "2019-09-24",
        "notificationUrl ": "https://checkout.placetopay.com"
    },
    "subscribe": false,
    "dispersion": [
        {
        "agreement": "1299",
        "agreementType": "MERCHANT",
        "amount": {
            "currency": "USD",
            "total": 200
        }
        }
    ],
    "modifiers": [
        {
        "type": "FEDERAL_GOVERNMENT",
        "code": 17934,
        "additional": {
            "invoice": "123345"
        }
        }
    ]
}