Payment Processing
To process payments add the Payment block to the order POST.
The requested amount is not required. The amount is calculated internally and matched against the amount passed by the user. If this parameter is excluded the calculated amount will be charged to the credit card on file by way of the provided payment token. Please note that “requested_amount” must be excluded from payment block for this to work correctly. If this parameter is present with 0 or null value the order will fail.
Orders Payment using Credit Card Processing
POST /orders
Input Parameters
These are in addition to order parameters above.
@param profile_token.
html
https://api.4over.com/orders
Sample Request Body
JSON
{ "order_id": "test001", "is_test_order": "true", "coupon_code": "PRC5PKS", "skip_conformation": "true", "jobs": [ { "product_uuid": "91efff4d-de64-410a-8794-fc547022a7f2", "runsize_uuid": "52e3d710-0e8f-4d4d-8560-7d4d8655be69", "option_uuids": [], "turnaroundtime_uuid": "50979118-b3a2-4556-9f46-d1da268f2354", "colorspec_uuid": "13abbda7-1d64-4f25-8bb2-c179b224825d", "dropship": "true", "sets": 2, "files": { "set_001": { "job_name": "job001-001", "files": { "fr": "5a2e207c-8a97-42a3-9b17-1e4899eae9ac", "bk": "d044410f-003e-4b32-8039-f6d590728f5b" } }, "set_002": { "job_name": "job001-002", "files": { "fr": "8b0fd851-7f13-4700-a35a-baff123eecfe", "bk": "3d71bf4a-a799-4dfb-ac90-8fea5f97b608" } } }, "ship_to": { "company": "My Print Company", "firstname": "James", "lastname": "Doe", "email": "james.doe@abcd_company.com", "phone": "888-888-8888", "address": "8900 Executive Park Drive", "address2": "", "city": "Knoxville", "state": "TN", "zipcode": "37923", "country": "US" }, "ship_from": { "company": "My Print Company", "firstname": "Mike", "lastname": "Doe", "email": null, "phone": "888-888-8888", "address": "100 CUMMINGS CTR", "address2": null, "city": "BEVERLY", "state": "MA", "zipcode": "01915", "country": "US" }, "shipper": { "shipping_method": "FREE UPS Ground", "shipping_code": "03f" }, "ship_from_facility": "DAY" }, { "product_uuid": "91efff4d-de64-410a-8794-fc547022a7f2", "runsize_uuid": "52e3d710-0e8f-4d4d-8560-7d4d8655be69", "option_uuids": [], "turnaroundtime_uuid": "50979118-b3a2-4556-9f46-d1da268f2354", "colorspec_uuid": "13abbda7-1d64-4f25-8bb2-c179b224825d", "dropship": "true", "sets": 3, "files": { "set_001": { "job_name": "job002-001", "files": { "fr": "62a7d70a-3b38-45a8-9327-e10a9c4057df", "bk": "ef45e3ff-2f3c-415c-8c63-4f5e3f290e8d" } }, "set_002": { "job_name": "job002-002", "files": { "fr": "bad3efad7-2e72-4a5e-87ec-d8bad3ef0359", "bk": "f9ead3ef0-b0de-4033-ad6d-aa15aa8c2555" } }, "set_003": { "job_name": "job002-003", "files": { "fr": "3830c3ee-72e4-46d7-8d0d-aad3ef77ccf1", "bk": "bd380570-135d-47fd-9411-b3ead3ef99d8" } } }, "ship_to": { "company": "My Test Company", "firstname": "Maria", "lastname": "Doe", "email": "maria.doe@abcd_company.com", "phone": "888-888-8888", "address": "8900 Executive Park Drive", "address2": null, "city": "Knoxville", "state": "TN", "zipcode": "37923", "country": "US" }, "ship_from": { "company": "My Print Company", "firstname": "Mike", "lastname": "Doe", "email": null, "phone": "888-888-8888", "address": "100 CUMMINGS CTR", "address2": null, "city": "BEVERLY", "state": "MA", "zipcode": "01915", "country": "US" }, "shipper": { "shipping_method": "FREE UPS Ground", "shipping_code": "03f" }, "ship_from_facility": "DAY" } ], "payment": { "profile_token": "xxxxxxxxxx" } }
Sample Response
JSON
{ "order_status": "Success", "customer_order_id": "test001", "job_ids": { "X8291118499-001": { "customer_job_id": "job001-001", "status": 200, "messages": [] }, "X8291118499-002": { "customer_job_id": "job001-002", "status": 200, "messages": [] }, "X8291118499-003": { "customer_job_id": "job002-001", "status": 200, "messages": [] }, "X8291118499-004": { "customer_job_id": "job002-002", "status": 200, "messages": [] }, "X8291118499-005": { "customer_job_id": "job002-003", "status": 200, "messages": [] } }, "payment_response": { "payment_uuid": "e58bee7f-0b57-4214-9e2a-33d683e7fe9f", "payment_provider": { "payment_provider_uuid": "6b0e699e-bdaf-4d1e-af4c-bc422ad21761", "payment_provider": "Authorizenet", "created_at": "2013-11-05 11:33:51-08" }, "requested_amount": "119.70", "requested_currency": { "currency_code": "USD", "currency": "United States dollar", "currency_number": "840", "created_at": "2013-09-30 09:27:22.689216-07" }, "request_transaction_code": "12345678920", "request_data": "", "requested_at": "2018-10-18T18:06:19+0000", "response_transaction_code": "12345678920", "response_data": { "card_number": "XXXX1111", "card_type": "Visa", "response_message": "This transaction has been approved." }, "responded_at": "2018-10-18T18:06:19+0000", "authorization_code": "ABCDEF", "authorized_at": "2018-10-18T18:06:19+0000", "authorized_payment_amount": "119.70", "authorized_refund_amount": 0, "authorized_currency": { "currency_code": "USD", "currency": "United States dollar", "currency_number": "840", "created_at": "2013-09-30 09:27:22.689216-07" }, "paying_organization": { "organization_uuid": "a4377724-8819-4a96-bc2b-3877b269f989", "organization_name": "4over", "organization_description": "4over Website - Trade Ultra", "job_code_prefix": "K", "is_public_organization": true, "primary_contact_user": { "user_uuid": "d44fa923-d567-48ed-aa3a-9c02a98bcee6", "first_name": "Admin User", "last_name": "API", "email": "", "user_notes": "admin user", "created_at": "2014-03-18 12:33:43.387423-07", "updated_at": "2015-07-06 10:29:18.338875-07", "deleted_at": "", "organizations": "https://sandbox-api.4over.com/users/d44fa923-d567-48ed-aa3a-9c02a98bcee6/organizations", "logins": "https://sandbox-api.4over.com/users/d44fa923-d567-48ed-aa3a-9c02a98bcee6/logins", "token": "5ec64e96d3877374fd35c2aae94cea3d07b83e10", "timestamp": "0.09669000 1539885980", "current_organization_uuid": "a4377724-8819-4a96-bc2b-3877b269f989" }, "parent_organization": { "organization_uuid": "8a17ef16-d997-4544-9f7c-d313febf9c40", "organization_name": "4over root", "organization_description": "4over root", "job_code_prefix": "Z", "is_public_organization": true, "primary_contact_user": { "user_uuid": "cb51b9fc-6a6e-4b98-885f-5d21041c1403", "first_name": "Jane", "last_name": "Doe", "email": "fake@4over.com", "user_notes": "test", "created_at": "2012-09-10 07:00:00.000000+0000", "updated_at": "2018-05-31 15:48:19.140525-07", "deleted_at": "", "organizations": "https://sandbox-api.4over.com/users/cb51b9fc-6a6e-4b98-885f-5d21041c1403/organizations", "logins": "https://sandbox-api.4over.com/users/cb51b9fc-6a6e-4b98-885f-5d21041c1403/logins", "token": "47a11796c675bbde6e3215239cd1a4c76255e854", "timestamp": "0.09683600 1539885980", "current_organization_uuid": "a4377724-8819-4a96-bc2b-3877b269f989" } } }, "paying_user": { "user_uuid": "0e153dc0-9b7b-47e8-8cfd-e50d88817ffb", "first_name": "Test", "last_name": "Tester", "email": "fake@4over.com", "user_notes": "testing ", "created_at": "2013-08-26 07:00:00.000000+0000", "updated_at": "2018-05-31 15:48:19.773569-07", "deleted_at": "", "organizations": "https://sandbox-api.4over.com/users/0e153dc0-9b7b-47e8-8cfd-e50d88817ffb/organizations", "logins": "https://sandbox-api.4over.com/users/0e153dc0-9b7b-47e8-8cfd-e50d88817ffb/logins", "token": "19253d572c2e5db795b4a8c846135218587c065b", "timestamp": "0.09695700 1539885980", "current_organization_uuid": "a4377724-8819-4a96-bc2b-3877b269f989" }, "created_at": "2018-10-18T18:06:19+0000" }, "payment_type": "authnet" }
Orders Payment using Credit Card Profiles
Get customer's payment profiles:
GET /paymentprofiles
Sample Response:
JSON
{ "entities": [{ "profile_token": "xxxxxxxxxx", "last_four": "xxxx", "type": "Visa" }, { "profile_token": "yyyyyyyyyyy", "last_four": "yyyy", "type": "Master" } ] }
Save the desired payment profile and post the order:
POST /orders
https://api.4over.com/orders
Sample Request Body
JSON
{ "order_id": "13358", "is_test_order": true, "skip_conformation": true, "jobs":[ { "job_name":"my order", "product_uuid":"bc3758a8-8f6c-4e24-8fb5-99d1a95ac01e", "runsize_uuid":"52e3d710-0e8f-4d4d-8560-7d4d8655be69", "option_uuids":["12b85fea-3513-46fd-932f-b2b9c1c17dbf"], "turnaroundtime_uuid":"e04b099b-4ac3-4a35-84d0-c530df7b7aff", "colorspec_uuid": "13abbda7-1d64-4f25-8bb2-c179b224825d", "dropship":"true", "files":{ "fr":"file1_front.pdf", "bk":"file1_back.pdf" }, "ship_to": { "company":"Your Company", "firstname":"John", "lastname":"Doe", "email":"johnd@qwe.com", "phone":"2129457896", "address": "1263 Broadway Ave.", "address2": "", "city": "Atlanta", "state": "GA", "zipcode": "30024", "country": "US" }, "ship_from":{ "company":"My Company", "firstname":"Bill", "lastname":"Smith", "email":"bills@try.com", "phone":"7144356789", "address": "456 asdf", "address2": "#3", "city":"glendale", "state": "CA", "zipcode":"91202", "country":"US" }, "shipper":{ "shipping_method":"UPS 3 Day Select", "shipping_code":"12" }, "ship_from_facility":"GLN" }, { "job_name":"her order", "product_uuid":"bc3758a8-8f6c-4e24-8fb5-99d1a95ac01e", "runsize_uuid":"52e3d710-0e8f-4d4d-8560-7d4d8655be69", "option_uuids":["12b85fea-3513-46fd-932f-b2b9c1c17dbf"], "turnaroundtime_uuid":"e04b099b-4ac3-4a35-84d0-c530df7b7aff", "colorspec_uuid": "13abbda7-1d64-4f25-8bb2-c179b224825d", "dropship":"false", "files":{ "fr":"file2_front.pdf", "bk":"file2_back.pdf" }, "shipper":{ "shipping_method":"UPS 3 Day Select", "shipping_code":"12" }, "ship_from_facility":"GLN" } ], "payment": { "requested_amount": "100.00", "requested_currency": { "currency_code": "USD" }, "profile_token": "xxxxxxxxxx" } }
Sample Response
JSON
{ "order_status": "Success", "job_ids": [ "Z32023437161-001", "Z32023437161-002" ], "payment_response": { "payment_uuid": "7dc51ecf-4e30-49eb-b27b-49f27123a33c", "payment_provider": { "payment_provider_uuid": "6b0e699e-bdaf-4d1e-af4c-bc4123d21761", "payment_provider": "Authorizenet", "created_at": "2013-11-05 11:33:51-08" }, "requested_amount": "100.00", "requested_currency": { "currency_code": "USD", "currency": "United States dollar", "currency_number": "840", "created_at": "2013-09-30 09:27:22.689216-07" }, "request_data": "", "requested_at": "2014-03-27T18:52:59-0700", "response_transaction_code": "9322095275", "response_data": { "card_number": "XXXX1111", "card_type": "Visa", "expiration_date": "2020 04", "response_message": "This transaction has been approved." }, "responded_at": "2014-03-27T18:53:00-0700", "authorization_code": "4D43UG", "authorized_at": "2014-03-27T18:53:00-0700", "authorized_payment_amount": "100.00", "authorized_refund_amount": 0, "authorized_currency": { "currency_code": "USD", "currency": "United States dollar", "currency_number": "840", "created_at": "2013-09-30 09:27:22.689216-07" }, "paying_organization": { "organization_uuid": "4a96-bc2b-a4269f374-8819-3871237b989", "organization_name": "Some Printer, Inc.", "organization_description": "Best Printer", "is_public_organization": true, "parent_organization": { "organization_uuid": "9c4084-9f7c-d313febf-a112316-d997-454", "organization_name": "Some Org, Inc.", "organization_description": "Test Org", "is_public_organization": true, "users": "http://api.4over.com/organizations/4a96-bc2b-a4269f374-8819-3812327b989/users", "primary_contact_user": "", "job_code_prefix": "Z", "created_at": "2013-09-29 22:11:43.194599-07", "updated_at": "", "deleted_at": "" }, "users": "http://api.4over.com/organizations/4a96-bc2b-a4269f374-8819-3812327b989/users", "primary_contact_user": { "user_uuid": "1badc49d-8a13-4282-8c05-1a1238149409", "first_name": "test", "last_name": "api", "email": "api_testuser1@1someprint.com", "user_notes": "", "created_at": "2017-07-13 10:51:46.864528-07", "updated_at": "2017-07-13 10:51:46.864528-07", "deleted_at": "", "organizations": "https:\/\/api.4over.com\/users\/1badc49d-8a13-4282-8c05-1a3412349409\/organizations", "logins": "https:\/\/api.4over.com\/users\/1badc49d-8a13-4282-8c05-1a1238149409\/logins", "token": "e708b16083be6926fa56df723f6e8db8238180d0", "timestamp": "0.66507900 1501783282", "current_organization_uuid": "f8225aa4-7367-4227-be85-a12329dc2f11" }, "job_code_prefix": "Z", "created_at": "2013-09-29 22:11:43.194599-07", "updated_at": "2014-02-14 17:50:45.136891-08", "deleted_at": "" }, "paying_user": { "user_uuid": "4be8-89f6-4db0df415-21233488--0947f1d", "first_name": "John", "last_name": "Doe", "email": "abcdefg@someprinter.com", "user_notes": "1234", "created_at": "2013-08-07 12:59:59.886226-07", "updated_at": "", "deleted_at": "", "organizations": "http://api.4over.com/users/4be8-89f6-4db0df415-21233488-0947f1d/organizations", "logins": "http://api.4over.com/users/4be8-89f6-4db0df415-23412388-0947f1d/logins", "token": "2ac11d830375281d7436dc3c569ec7386da28bf8", "timestamp": "0.07353800 1395971580", "current_organization_uuid": "4a96-bc2b-a4269f374-8819-3877727b989" }, "created_at": "2014-03-27T18:52:59-0700" }, "payment_type": "authnet" }