In this tutorial we will show you how to leveage the Peoplevine API to process a payment for an order you synced with our platform (please note, the order must already be synced with our platform). This is used when you want to allow your members and/or customers to user their credit card on file for closing out a ticket at your POS.
To get started, please ensure you have setup your API account and key and have submitted for approval. Search API on help.peoplevine.com.
Request Object: this object will contain a few pieces of data:
authenticate_no - this ID is generated when your system is connected via our internal integrations
ticketID - this ID is the ID you use to reference the order in your system. It will be used for saving the order, retreiving the order and process payments against the order
business_location_no - this ID is the ID of the location your POS is integrated with
provider - please enter your integration's name (<= 25 chars)
default_customer_no - this ID should represent the customer_no used when no person is identified
payment_type - the type of transcation you're looking to processverify - used to verify if they have a card on file and a balancecardonfile - charge their card on filepaywithbalance - charge their digital currency (gift certificates)house - charge to their house account
amount - total amount to be charged (not including tip)
tip - total tip to be charged. If a tip is not provided, the payment will be authorized. Once the tip is provided on order-sync, the charge will automatically capture.
payment_id - this ID should reference the payment on your side. When you complete the transaction you will need to include the ID so we can assign the tip.
e.g. {authenticate_no: 1234, ticketID: '20190726-12345', business_location_no: 2345, provider: 'mypos', default_customer_no: 3456, payment_type: 'cardonfile', amount: 123.45, tip: 0, payment_id: '20190726-12345-9876'}
Response Object: Upon processing the payment, verifying or failing, the API method will provide a reply upon processing. Please allow proper processing time beforing timing out due to connecting to merchant provider's gateway for processing. The response will contain the following information:
transaction_no - this is the ID in PeopleVine to reference this transaction
transaction_id - this is the ID of the transaction from the merchant processor
processorResponse - this includes details on whether or not the charge or verification was successfulwasProcessed - true if it was processed, false if it was notcharge_amount - the amount that was charged, in case there wasn't enough balance on their house creditsresponse - a response message related to the success or failure of the chargeSuccessAPPROVED #1234 - when a transaction is approved we will include the transaction_noLAST NAME CC 0.00 - when verifying you will get back their last name, CC if they have a payment method on file and a decimal if they have a balance on their house creditsFailures**NOT A MEMBER** - when verifying and we couldn't find the member**NO PROCESSOR** - if no credit card processor is setup**PAYMENT FAILED** - if we werent' able to charge their card due to being declined**DECLINED** - if we werent' able to charge their card due to being declined**NO CARD ON FILE** - when we are unable to find a payment method on file**ADD MEMBER ID** - when we are unable to identify a person on the order
You will need to pass in the payment_id value along with the completed order when a tip is applied to the order.
An example of the flow on how we validate and/or respond to the payment being applied.