Check out our API guide and tutorial.  The first two steps of the tutorial cover creating a customer and payment instrument.  

A Customer is a central concept within Rebilly. The Customer may have one or more contacts (addresses), payment instruments, payments, invoices, and subscriptions (aka orders).

A Customer has only an "id" field which must be unique within your Rebilly account. If you wish, you can specify the ID to match an ID from your system, if you have one. This is handy, as it becomes easy to sync data from Rebilly to your system, or vice versa.  It also prevents data duplication within Rebilly.

A Payment Instrument represents a financial instrument that is used to transfer money, such as: cash, check, payment cards (which includes debit and credit cards), ACH (which is electronic check in the US and Canada), PayPal, and more. A Customer may have a designated default payment instrument, which is used when collecting payments for recurring subscriptions.

Each integration, no matter how different, typically starts with the creation of a Customer.

FramePay Token

We recommend using FramePay to minimize your PCI exposure when capturing payment card information.  FramePay, which uses Rebilly.js, is a javascript snippet you'll include on your payment form, and then you'll adjust some of the fields on your payment form, as recommended in this documentation: https://rebilly.github.io/framepay-docs/. FramePay will submit the payment instrument details to Rebilly's API directly from the browser, and return a token, which would then be submitted to your server app from the browser form submission. Use that token to create a payment instrument using the shortcut by supplying the "paymentToken" to the create/update customers endpoint.

Create/Update Customer

We create a customer when the customer submits a form. If a purchase sequence contains multiple stages, we highly recommend making the API requests to capture the data ASAP, because you may be able to recover partial submits via customer service efforts, in case your customer abandons your signup process.

When a customer signs up, we first check to see if they are already a customer. Assuming they are not a customer, we'll receive an empty array back as a response from the API. Then, we'll create the customer, using the POST (if we want Rebilly to create a unique id), or the PUT (if we want to specify our own id).  We will include the "paymentToken" generated by FramePay.

At this point, your first customer is created. Congratulations!

What's next?

From here, it's easy to make subscription orders or one-time orders. Also, if you do advertising or have an affiliate program, you will want to create a lead source associated with the customer, so that you can further report on activity by lead segment. This activity would be very useful for your marketing team, as they could report not only on cost per acquisition, but also on retained value over time. This data may also be useful to a risk team, who may evaluate the risks per campaign, including chargeback rates.

Did this answer your question?