The payment360 Developer Hub

Welcome to the payment360 developer hub. You'll find comprehensive guides and documentation to help you start working with payment360 as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

API/Developer Q&A

1. Do you have an API?

Yes. blackthorn | payments has both Apex and REST APIs.

2. API Pricing:


3. Where is the repo?


4. Where is the latest package?

5. What's the difference between the Apex and REST APIs?

REST API: Provides you an HTTP endpoint. Send your data (which can be CC tokens obtained from Stripe, Transaction data, etc.) and receive a JSON response. The objects are recorded in Salesforce, and it's your responsibility to process and handle the results on the client side. You can use the REST API in any environment where you can make HTTP calls (website, mobile app, outer space).

Apex API: A global Apex class, which you can access in your org or a Community. You can initialize blackthorn | payments entities (like Stripe Customer, Payment Methods and Transactions) and do actions (like send data to Stripe, update, capture, authorize, delete, etc). You can integrate these actions into your custom Apex code, and it is you responsibility to handle the customer data.

6. When do I use the Apex API vs the REST API?

Use Cases:

  • Apex API: Visualforce website form
  • Apex API: Salesforce Community
  • Apex API: Your Salesforce internal app.
  • REST API: Non-Visualforce website form
  • REST API: Non-Salesforce custom portal
  • REST API: Mobile (Native or Hybrid) Application

7. What are the business applications of the API?

  • Payment form. Create and validate a payment method (credit/debit/ACH), create and capture (charge) for a transaction, display success and failure messages to the user.
  • Payment method management from a Community or custom portal. Display 'cards on file' (or ACH accounts), allow users to create new cards, update cards, and delete cards.
  • Historical and future transactions. Display all prior or future scheduled transactions related to the user.
  • Portal or Community. Because you already know who the authenticated user is (or even from a single payment or donation form), you can create (or update) an Account and/or Contact, create or update an Opportunity, and manage the payment process.

8. How do I handle credit card verification?

REST API: You can use Stripe.js, which returns an error if the card is bad, and can be processed on the front-end. See and

Apex API: The class returns the credit card status after committing it to Stripe. Data is pushed to the Apex back-end, which returns the result in the back-end, then you display it to the user.

9. How do I test credit card calls? Are there test codes?

Yes! See Make sure you have your Payment Gateway connected in Test Mode. You can do this by creating a Payment Gateway, checking the Test Mode checkbox, then click Connect to Stripe. Once you authenticate, your Payment Gateway will accept test cards (and only test cards).

10. I see you ask to approve 3rd party access to a Heroku app. Why?

The Connect to Stripe button utilizes OAuth to connect Salesforce with your Stripe account. After the authentication, Heroku helps us to redirect back to Salesforce, even when wildcard domains (custom domains) are enabled in customer orgs.

11. Unit tests for payment360 with our web services.

You'll likely run into issues with unit tests. We're working on a more comprehensive method to solution this, but for now, please use:
bt_stripeStripe_Settingsc settings = bt_stripeStripe_Settingsc.getOrgDefaults();
settings.bt_stripeDisable_All_Triggersc = true;
upsert settings;

This will stop any callouts being made on payment method insertion and your unit tests will go through.

API/Developer Q&A