Last updated 2 years ago

Customer Response

We created our customer.

Now let's inspect that API response.

You can note that the payment token resulted in the creation of a payment card, and setting it as the default payment instrument for the customer.

The customer has an id, and that's should match what we supplied in the path parameter of the PUT request to upsert the customer.

Next, we'll create the order.

Finding the API Logs

The response:

{
    "id": "ben-1706",
    "createdTime": "2019-01-25T03:16:46+00:00",
    "updatedTime": "2019-01-25T03:16:46+00:00",
    "customFields": [],
    "defaultPaymentInstrument": {
        "method": "payment-card",
        "paymentCardId": "afe59704-8d59-413b-8f89-790d377a605b"
    },
    "primaryAddress": {
        "country": null,
        "firstName": "Benjamin",
        "lastName": "Franklin",
        "organization": null,
        "address": null,
        "address2": null,
        "city": null,
        "region": null,
        "postalCode": null,
        "phoneNumbers": [],
        "emails": [],
        "hash": "986f11c3e682fe9893400dd52df6ba5091bb18af"
    },
    "lifetimeRevenue": {
        "currency": "USD",
        "amount": 0,
        "amountUsd": 0
    },
    "invoiceCount": "0",
    "averageValue": {
        "currency": "USD",
        "amount": 0,
        "amountUsd": 0
    },
    "paymentCount": 0,
    "lastPaymentTime": null,
    "tags": [],
    "_links": [
        {
            "rel": "self",
            "href": "https://api-sandbox.rebilly.com/v2.1/customers/ben-1706"
        },
        {
            "rel": "attachments",
            "href": "https://api-sandbox.rebilly.com/v2.1/attachments?filter=relatedType%3Acustomer%3BrelatedId%3Aben-1706"
        },
        {
            "rel": "defaultPaymentInstrument",
            "href": "https://api-sandbox.rebilly.com/v2.1/payment-cards/afe59704-8d59-413b-8f89-790d377a605b"
        }
    ]
}

The response, as documented in our reference, as a combination of properties that you may edit, as well as read-only informational properties.

The customer will relate to almost everything you will do within your Rebilly integrations.