Paytec Asset Gateway API
  • Introduction
  • Initial Setup
  • Integration and Function Flow
    • 1. Request a Quote
      • Get Quote Error Codes
    • 2. Authorize Transaction
      • Simulating Refused Transactions
      • Authorize Transaction Error Codes
    • 4. Get Details (Optional)
      • Get Details Error Codes
  • Webhooks
    • Setting up Webhooks
      • Provision an endpoint
      • Receiving and Acknowledging webhooks
      • Testing Webhooks
    • Example Callbacks
      • 3D Secure Webhooks
  • Direct Deposit
Powered by GitBook
On this page
  • Request Information
  • JSON Body Interface:
  • Example JSON Body:
  • Response Information
  • Successful Responses:
  • Error Responses

Direct Deposit

POST Request to {Endpoint}/pay/deposit

The deposit endpoint enables direct card purchase. Use this single endpoint to charge a payment card.

Request Information

JSON Body Interface:

{
    "deposit": {
        "amount": number,
        "currency": string
    },
    "client": {
      "first": string,
      "last": string,
      "referenceID": string,
      "browseragent": string,
      "ipAddress": string
    },
    "contact": {
      "email": string,
      "phone": string // include country code
    },
    "billingAddress": {
      "address": string,
      "addressLine2": string,
      "city": string,
      "state": string,
      "postalCode": string,
      "country": string // two letter country code
    },
    "paymentData": {
        "cardNumber": string,
        "monthExpire": string,
        "yearExpire": string,
        "cvv": string
    },
    "3D":{
        "redirectURL": string // only for 3D transactions
    }
}

Example JSON Body:

{
    "deposit": {
        "amount": 10,
        "currency": "USD"
    },
    "client": {
      "first": "John",
      "last": "Doe",
      "referenceID": "Jdoe1234",
      "browseragent": "test",
      "ipAddress": "127.0.0.1"
    },
    "contact": {
      "email": "john@doe.com",
      "phone": "+11234567890"
    },
    "billingAddress": {
      "address": "123 Main St",
      "addressLine2": "Unit 1A",
      "city": "City",
      "state": "WY",
      "postalCode": "11234",
      "country": "US"
    },
    "paymentData": {
        "cardNumber": "4111111111111111",
        "monthExpire": "02",
        "yearExpire": "2028",
        "cvv": "123"
    },
    "3D":{
        "redirectURL": "https://google.com"
    }
}

Response Information

There are 4 possible categories of responses for this request. You can determine the category by referring to the state field. The categories are the following:

  1. Approval

    • Completed transactions. Digital Asset is actively being generated.

  2. Refused

    • Transactions that have been declined/refused. Responses will include refusal reasons in the reason field and also potentially provide additional error codes in the additionalErrorCode field.

  3. Error

  4. Pending

    • If enrolled in 3D, the transaction will return a pending state, until the customer accesses the 3DSecureURL

Successful Responses:

Approval Response Example (2D)

{
    "success": true,
    "state": "APPROVED",
    "trxID": "1029249",
    "time": "2024-06-27T04:11:26.459Z",
    "details": {
        "amount": 10,
        "currency": "USD"
    }
}

Approval Response Example (3D)

{
    "success": true,
    "state": "PENDING",
    "trxID": "1028464",
    "details": {
        "amount": 0,
        "currency": "USD",
        "3D": true,
        "3DSecureURL": "{endpoint}/secure3d/VTJGc2RHVmtYMS8yYzhlZWwxT3ZHYXd0d1NPTnZac1U1aWJsQ1FUNVRHRFFVOVlSdktkeS9UNE1wdnZyMHNYcw=="
    },
    "time": "2024-06-25T04:49:37.026Z"
}

Refused Response Example

{
    "success": false,
    "state": "REFUSED",
    "time": "2024-06-27T04:09:02.585Z",
    "details": {
        "reason": "REFUSED",
        "error": "5 - REFUSED",
        "additionalErrorCode": "5"
    },
    "trxID": "1029247"
}

Refused transactions will include a reason field in the object, which will provide information with regards why a transaction was refused.

Error Responses

{
    "error": "paymentData.cardNumber is a required field"
}
Previous3D Secure Webhooks

Last updated 11 months ago

A problem has occurred with the request. You can utilize information in the error field response to troubleshoot the error. Additionally, refer to the to identify errors by their HTTP status code.

Error responses will have along with a HTTP status code that is between 400 and 600. Refer to the page for more information.

Error Code Table
Authorize Transaction Error Codes