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": "[email protected]",
"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:
Approval
Completed transactions. Digital Asset is actively being generated.
Refused
Transactions that have been declined/refused. Responses will include refusal reasons in the
reasonfield and also potentially provide additional error codes in theadditionalErrorCodefield.
Error
A problem has occurred with the request. You can utilize information in the
errorfield response to troubleshoot the error. Additionally, refer to the Error Code Table to identify errors by their HTTP status code.
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 responses will have along with a HTTP status code that is between 400 and 600. Refer to the Authorize Transaction Error Codes page for more information.
{
"error": "paymentData.cardNumber is a required field"
}Last updated