Last updated 2 years ago

2. Upsert the Customer

Requirements

You'll need:
  • secret API key
  • your token from the previous step
  • It's a best practice to upsert the customer.

    The id is the unique key of the customer.
    It is referenced as the customerId in other resources.

    We will use the token from the previous step to create the customer.

    Notice that all the data captured from the FramePay form is merged into the customer data. FramePay can capture the full name, address, phone, email, and lead source info.

    It makes the body of the request to create the customer simple:

    PUT customers/<id>
    {
        "paymentToken": "<paste the token here>"
    }

    Here is a 5-minute video demonstrating this request using our API docs "TRY IT" console.

    Our example customer is Benjamin Franklin.

    Next Step

    Next, move on to the documentation for that request, and try it yourself. Don't forget, you'll need your token from the first step.