Skip to content

Confirm payment by ID

POST- payments/{paymentId}/confirm(1)

AUTHORIZATIONS (2)

  1. Sandbox server (uses test data)
    https://api.sandbox.payerly.tech/v1/payments/{paymentId}/confirm
    Production server (uses live data)
    https://api.payerly.tech/v1/payments/{paymentId}/confirm

  2. BearerAuth

PATH PARAMETERS
Parameter Type Description
paymentIdrequired string Merchant payment id (must be unique within the merchant site)
RESPONSE HEADERS:
Parameter Type Description
Date string(date-time) The Date header indicates the server time.
RESPONSE SCHEMA: application/json
Parameter Type Description
type string Object type (PAYMENT). Value PAYMENT
object object - paymentId: Merchant payment id
- txnId: Unique transaction id
- orderId: Merchant order id
- createdAt: Payment created at
- description: Payment description
- autoConfirm: Do auto payment confirmation (single message system)
- returnUrl: Merchant's URL for customer return (in case of additional verification actions)
- callbackUrl: Merchant's URL for callback
- amount:
    - value: Amount value.
    - currency: Amount currency (e.g., "USD", "EUR")
- convAmount:
    - value: Amount value.
    - currency: Amount currency (e.g., "USD", "EUR")
- paymentMethod: Value card,sbp,sbpp2p, cardp2p,pix,picpay,spei,boleto,banktransfer,banktransferars,pse,iban,mobile.
- paymentData:
    - type: Payment method type
    - object:cardResponse (object) or sbpResponse (object) or sbpp2pResponse (object) or cardp2pResponse (object) or pixResponse (object) or picpayResponse (object) or speiResponse (object) or tedResponse (object) or boletoResponse (object) or pseResponse (object) or banktransferarsResponse (object) or ibanResponse (object) or mobile (object).(see the parameters below)
- paymentToken: Payment token response object.(see the parameters below)
- customFields:
    - cf1: Additional field 1
    - cf2: Additional field 2
    - cf3: Additional field 3
    - cf4: Additional field 4
    - cf5: Additional field 5
- status:
    - changedAt: Status changed
    - value: Status value
    - description: Status description
-additionalAction-Additional payment actions (additional customer verification)
    -action:Action type.Value redirect
    -value:Action type value (e.g. customer redirect URL)
error object Error object:
- code: Error code
- description: Error description
- traceId: Unique request trace id (for support requests)
- details: Errors details array
    - value: Error brief
    - description: Error description
    - fields: Errors fields array
        - name: Field name
        - type: Location of field (body, header)
        - value: Field value

Payment token response

Parameter Type Description
type string Object type (TOKEN). Value TOKEN
object object - tokenId: Token id
- expireAt: Token expires at
- customer:
    - accountId: Unique customer account id
    - fingerprint: Unique customer device fingerprint
    - ip: Customer IP address    - phone: Customer phone (only numbers, with country code)
    - email: Customer e-mail address
    - fullName: Customer full name
    - DocumentType: Customer document type
    - Document: Customer document
    - country: Customer country (ISO 3166-1 alpha-3)
    - address: Customer address
    - city: Customer city
    - state: Customer state
    - postalCode: Customer postal code
    - neighborhood: Customer neighborhood address
    - birthdate: Customer birthdate
    - browserData: Object with browser data:
        - acceptHeader
        - colorDepth
        - language
        - screenHeight
        - screenWidth
        - timezone
        - userAgent
        - javaEnabled
        - windowHeight
        - windowWidth
-paymentMethod:Value card.Payment method
.paymentData:
    - type: Value cardResponse.Payment method type
    -object:
        -maskedPan-Masked primary account number
        -expiryDate:Expiration date.
        -cardHolder:Cardholder name
        -cardInfo:Card information
-additionalAction-Additional payment actions (additional customer verification)
    -action:Action type.Value redirect
    -value:Action type value (e.g. customer redirect URL)

Payment Data

* maskedPan - Masked primary account number 
* expiryDate - Expiration date
* cardHolder -  Cardholder name
* cardInfo - Card information object
    * issuerCountry - Card issuer country (ISO 3166-1 alpha-3) 
    * issuerName - Card issuer name
* qrData - Source data for QR-code 
* credentials - Payment credentials
* description - Additional description
* credentials - Payment credentials
* bank - Destination bank for transfer
* description - Additional description
* url  - Payment url
* qrData - Source data for QR-code
* url  - Payment url
* qrData - Source data for QR-code
* url  - Payment url
* qrData - Source data for QR-code
* url  - Payment url
* name  - Bank name
* code  - Bank code 
* agency - Bank agency
* account  - Bank account
* accountOperation - Bank account operation
* document  - Bank document
* beneficiary -Bank beneficiary
* url  - Payment url
* code - Source data for barcode
* url  - Payment url
* url  - Payment url
* iban  - IBAN
* fullName  - Recipient full name        
* phone - Phone number
200
{
  "type": "PAYMENT",
  "object": {
    "paymentId": "string",
    "txnId": "string",
    "orderId": "string",
    "createdAt": "2019-08-24T14:15:22Z",
    "description": "string",
    "autoConfirm": true,
    "returnUrl": "string",
    "callbackUrl": "string",
    "amount": {
      "value": "7635.01",
      "currency": "USD"
    },
    "convAmount": {
      "value": "7635.01",
      "currency": "USD"
    },
    "paymentMethod": "mobile",
    "paymentData": {
      "type": "mobile",
      "object": {
        "phone": "79999999999"
      }
    },
    "paymentToken": {
      "type": "TOKEN",
      "object": {
        "tokenId": "string",
        "expireAt": "2019-08-24T14:15:22Z",
        "customer": {
          "accountId": "df1a2c9e-bc2b-11ed-8332-811eecb5ec73",
          "fingerprint": "30faf01ebf161c7c7673b776820b3517|1ea851ab5b0e311ed9c690828f8dc7c6|eyJEZXZpY2VGaW5nZXJwcmludCI6IjMwZmFmMDFlYmYxNjFjN2M3NjczYjc3NjgyMGIzNTE3In0=",
          "ip": "123.123.123.223",
          "phone": "18001002030",
          "email": "[email protected]",
          "fullName": "John Doe",
          "documentType": "string",
          "document": "string",
          "country": "USA",
          "address": "Av. da Liberdade, 87",
          "city": "Sao Paulo",
          "state": "SP",
          "postalCode": "05907",
          "neighborhood": "6587 Roller Derby Lane, Toronto, ON M1R-0E9, Canada",
          "birthdate": "1960-02-25",
          "browserData": {
            "acceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
            "colorDepth": 32,
            "language": "en",
            "screenHeight": 667,
            "screenWidth": 375,
            "timezone": -60,
            "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 15_7_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.4 Mobile/15E148 Safari/604.1",
            "javaEnabled": true,
            "windowHeight": 850,
            "windowWidth": 375
          }
        },
        "paymentMethod": "card",
        "paymentData": {
          "type": "cardResponse",
          "object": {
            "maskedPan": "string",
            "expiryDate": "string",
            "cardHolder": "string",
            "cardInfo": {
              "issuerCountry": "USA",
              "issuerName": "string"
            }
          }
        }
      }
    },
    "customFields": {
      "cf1": "string",
      "cf2": "string",
      "cf3": "string",
      "cf4": "string",
      "cf5": "string"
    },
    "status": {
      "changedAt": "2019-08-24T14:15:22Z",
      "value": "string",
      "description": "string"
    },
    "additionalAction": {
      "action": "redirect",
      "value": "string"
    }
  },
  "error": {
    "code": 65535,
    "description": "string",
    "traceId": "string",
    "details": [
      {
        "value": "string",
        "description": "string",
        "fields": [
          {
            "name": "string",
            "type": "string",
            "value": "string"
          }
        ]
      }
    ]
  }
}
400
  {
    "error": {
      "code": 65535,
      "description": "string",
      "traceId": "string",
      "details": [
        {
          "value": "string",
          "description": "string",
          "fields": [
            {
              "name": "string",
              "type": "string",
              "value": "string"
            }
          ]
        }
      ]      
    }
  }
401
  {
    "error": {
      "code": 65535,
      "description": "string",
      "traceId": "string",
      "details": [
        {
          "value": "string",
          "description": "string",
          "fields": [
            {
              "name": "string",
              "type": "string",
              "value": "string"
            }
          ]
        }
      ]      
    }
  }
402
  {
    "error": {
      "code": 65535,
      "description": "string",
      "traceId": "string",
      "details": [
        {
          "value": "string",
          "description": "string",
          "fields": [
            {
              "name": "string",
              "type": "string",
              "value": "string"
            }
          ]
        }
      ]      
    }
  }
403
  {
    "error": {
      "code": 65535,
      "description": "string",
      "traceId": "string",
      "details": [
        {
          "value": "string",
          "description": "string",
          "fields": [
            {
              "name": "string",
              "type": "string",
              "value": "string"
            }
          ]
        }
      ]      
    }
  }
404
  {
    "error": {
      "code": 65535,
      "description": "string",
      "traceId": "string",
      "details": [
        {
          "value": "string",
          "description": "string",
          "fields": [
            {
              "name": "string",
              "type": "string",
              "value": "string"
            }
          ]
        }
      ]      
    }
  }
405
  {
    "error": {
      "code": 65535,
      "description": "string",
      "traceId": "string",
      "details": [
        {
          "value": "string",
          "description": "string",
          "fields": [
            {
              "name": "string",
              "type": "string",
              "value": "string"
            }
          ]
        }
      ]      
    }
  }
429
  {
    "error": {
      "code": 65535,
      "description": "string",
      "traceId": "string",
      "details": [
        {
          "value": "string",
          "description": "string",
          "fields": [
            {
              "name": "string",
              "type": "string",
              "value": "string"
            }
          ]
        }
      ]      
    }
  }
default
  {
    "error": {
      "code": 65535,
      "description": "string",
      "traceId": "string",
      "details": [
        {
          "value": "string",
          "description": "string",
          "fields": [
            {
              "name": "string",
              "type": "string",
              "value": "string"
            }
          ]
        }
      ]      
    }
  }