POST: ADD PAYMENT
Type:
POST
Method:
payment
Parameters:
n/a
URL Example:
https://www.bizstim.com/api/payment
ELEMENT | TYPE | DESCRIPTION |
---|---|---|
client_id |
integer | required if new client information not provided |
revenue_amount |
float | required *** IMPORTANT: this field must be in the format: 1052.45. Do NOT use commas or depict currencies. This number will be converted to pence if a token is provided *** |
send_email |
integer | required (0=no, 1=yes) |
service_id |
integer | optional (required if discount code is service specific OR a service package is purchased) |
revenue_note |
string | optional |
discount |
string | optional |
token |
string | optional (If you would like us to initiate a payment via Stripe for the customer use stripe.js tokenization process within the browser. Get a secure, one-time use token from Stripe and pass it on via this API endpoint. A more secure process would be to charge the customer's account via your website and the customers browser. ***Creating a token uses Stripe v2 that is deprecated*** |
qb_customer_id |
integer | optional |
timezone |
string | optional |
first_name |
string | required if no client id present |
last_name |
string | required if no client id present |
state |
string | required if no client id present |
country |
string | required if no client id present |
status |
string | required if no client id present |
city |
string | optional |
text_phone |
string | optional |
email |
string | optional |
address1 |
string | optional |
address2 |
string | optional |
zipcode |
string | optional |
p_phone |
string | optional |
s_phone |
string | optional |
password |
string | optional |
password2 |
string | optional (confirm password) |
username |
string | optional (must be unique) |
inactive_date |
string | optional (YYYY-MM-DD) |
notes |
string | optional |
mAvailf |
string | optional (Monday Start Time - HH:MM) |
mAvailt |
string | optional (Monday End Time - HH:MM) |
tAvailf |
string | optional (Tuesday Start Time - HH:MM) |
tAvailt |
string | optional (Tuesday End Time - HH:MM) |
wAvailf |
string | optional (Wednesday Start Time - HH:MM) |
wAvailt |
string | optional (Wednesday End Time - HH:MM) |
rAvailf |
string | optional (Thursday Start Time - HH:MM) |
rAvailt |
string | optional (Thursday End Time - HH:MM) |
fAvailf |
string | optional (Friday Start Time - HH:MM) |
fAvailt |
string | optional (Friday End Time - HH:MM) |
satAvailf |
string | optional (Saturday Start Time - HH:MM) |
satAvailt |
string | optional (Saturday End Time - HH:MM) |
sunAvailf |
string | optional (Sunday Start Time - HH:MM) |
sunAvailt |
string | optional (Sunday End Time - HH:MM) |
- * For the
timezone
field use the Timezone get method and select an appropriate value from theTimeZone
field. - * If the
timezone
is unrecognized or empty, America/New_York will be applied as default. - * When a
service_id
is present and the service is part of a group of tiered services (service package), a package payment will be recorded as long as the service has a group_num greater than 1 (the service is a lower cost service in a service package).
{ "status": "success", "code": 12, "response": "Payment added successfully." }
HTTP Response:
ELEMENT | TYPE | DESCRIPTION |
---|---|---|
status |
string | success or failure |
code |
integer |
0 failure: validation errors 1 failure: required fields missing 2 failure: client already exists 3 failure: passwords do not match 4 failure: username is not unique 5 failure: unable to create client 6 failure: client id not found 7 failure: discount errors 8 failure: payment error 9 failure: payment package error 10 failure: unknown service id 11 failure: Payment gateway errors 12 success |
response |
string |
Possible responses are:
|