Secure Payments API VersaPay Process Payment

General

This article covers processing a payment using a VersaPay payment processor. You may also be interested in:

Creating a VersaPay Payment Processor

processors/versa/process/{id}

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'authorization: YOUR AUTH' --header 'secret: YOUR SECRET' -d '{ \
"transaction": { \
"amount_in_cents": 100, \
"transaction_type": "direct_debit", \
"first_name": "Sample", \
"last_name": "Customer", \
"business_name": "Sample Company LLC" \
}, \
"checking-account": { \
"token": "CUSTOMER CHECKING TOKEN" \
}, \
"metadata": {} \
}' 'https://pciwallet.simnang.com/api/processors/versa/process/73'

Response:

{
"transaction": {
"amount": 1.00,
"raw_response": "{\"to_fund\":\"VersaPay Balance\",\"amount_in_cents\":1002,\"link_url\":null,\"email\":null,\"to_account\":\"Autopal\",\"process_on\":null,\"created_by_user\":\"USER\",\"from_account\":\"XLane Motors\",\"type\":\"transaction\",\"state\":\"in_progress\",\"transaction_type\":\"direct_debit\",\"token\":\"1D4265NKMJTG\",\"auto_withdraw\":false,\"unique_reference\":null,\"transaction_reference\":null,\"from_fund_token\":\"BA6SFU92P5KG\",\"auto_withdrawal_token\":null,\"message\":null}",
"operation": "process",
"operation_success": true,
"created": "2017-6-09 17:46:31",
"token": "TOKEN",
"status": "submitted",
"id": 279,
"sec_code": "WEB",
"raw_http_code": 200,
"processor": "versapay",
"metadata": "{}",
"customer_name": "",
"customer_id": null
},
"processor": {
"to_fund": "VersaPay Balance",
"amount_in_cents": 1002,
"link_url": null,
"email": null,
"to_account": "Autopal",
"process_on": null,
"created_by_user": "USER",
"from_account": "XLane Motors",
"type": "transaction",
"state": "in_progress",
"transaction_type": "direct_debit",
"token": "1D4265NKMJTG",
"auto_withdraw": false,
"unique_reference": null,
"transaction_reference": null,
"from_fund_token": "BA6SFU92P5KG",
"auto_withdrawal_token": null,
"message": null
}
}


How did we do?


Powered by HelpDocs (opens in a new tab)