Place the order
Now that we have approved your proofs, we are left to finish this journey and place an order. Once produced, these products will be held in our warehouse for you to send them on demand. We charge an amount for holding items in the warehouse, thus this charge will be included in the order invoice. We will charge a one-time warehouse fee of $5.00 per swag pack.
To get the final quote, make sure to make a GET a request to:
The response will include the total_plus_tax key with the updated value according to the current quantities changes.
Example response*:..."total_plus_tax": "2206.00",...* The response examples in this guide have been truncated to show less data.
❗ Note: Be aware that on top of total_plus_tax there will be a warehouse fee of $5.00 per swag pack (i.e. 200 * $5.00 = $ 1000.00)
Create a Payment Profile
If you want to place an order, pay an invoice, send swag, buy credits, or do any other payment-related action, you will need first to create a payment profile. This payment profile is going to be used to charge your card.
We don't keep sensitive payment profile information in our database. Instead, we use Authorize.net to provide a secure & private process. That means when you create a payment profile you need to connect to Authorize.net first to create this profile and then with the keys they return, you are able to connect them with our database, then later we can use their platform for the payment.
You can create several payment profiles, but only one of them is going to be the default one. The first one created will be that default payment method, then when others are created, the default one could be switched in between all the available profiles. We always use the default payment profile to charge, so if you want to be charged with a certain payment profile, be sure first that you have set that one as default.
All the documentation about this can be found here: https://developer.authorize.net/api/reference/index.html
The first request to Authorize.net can be done like this:
secureData = {
authData: {
clientKey: AUTHORIZE_API_PUBLIC_KEY,
apiLoginID: AUTHORIZE_API_LOGIN_KEY },
cardData = {
cardNumber: <value>,
fullName: <value>,
cardCode: <value>,
month: <value>,
year: <value> }
}
AUTHORIZE_API_PUBLIC_KEY and AUTHORIZE_API_LOGIN_KEY must be asked to the Authorize platform.
Then the request would be similar to:
const result = await new Promise(resolve => {
const responseHandler = ({ messages, opaqueData }) =>
resolve(messages.resultCode === 'Error' ? messages : opaqueData);
window.Accept.dispatchData(secureData, responseHandler);
});
return result;
After this connection with Authorize, you are going to receive a result response object that contains 2 keys: dataValue and dataDescriptor. Both are going to be used for creating the payment profile with our API through the next way:
You must make a POST request to:
Account_ID is the ID associated with your account when you have successfully finished the Sign-up process and you have an account with us.
{
"default": true,
"dataValue": "<value-returned-from-authorize>",
"dataDescriptor": "<value-returned-from-authorize>",
"bill_to": {
"first_name": "John",
"last_name": "Doe",
"email": "john@company.com",
"company": "John Company",
"force_address": true,
"address1": "<address1>",
"address2": "<address2-optional>",
"city": "<city>",
"state": "<state>",
"zip_code": "<code>",
"country": "<country>"
},
"payment_profile_name": "my custom Visa"
}
The response will be quite similar object to the payment profile information.
{
"default": true,
"customer_profile_id": "1518370292",
"customer_payment_profile_id": "504561212",
"payment_method": "Credit Card",
"bank_account": null,
"credit_card": {
"card_number": "XXXX1111",
"expiration_date": "XXXX",
"card_type": "Visa"
},
"bill_to": {
"first_name": "John",
"last_name": "Doe",
"company": "John Company",
"address1": "<address1>",
"address2": “<address2-optional>”,
"city": "<city>",
"state": "<state>",
"zip_code": "<code>",
"country": "<country>",
"phone_number": "<phone>"
},
"payment_profile_name": "my custom Visa"
}
If you want to get all the payment profiles you can make a GET request to:
Inside that response, you can find the field customer_payment_profile_id that can be used later for switching the default profile, in case you want to add several of them.
For switching profiles and setting a different default one, you must make a PATCH request to:
With the next payload:
{ default: true}