Customer Resource

A Customer resource represents your customer in our database. This is useful for the card vaulting use case.

A Customer Resource

{
      "id": "cus_b9ENKVqcHBfQQmv26uDYDCsD",
      "type": "customer",
      "attributes": {
        "default_device": "phone",
        "default_payment_method_id": null,
        "email": "[email protected]",
        "first_name": "Lilly",
        "last_name": "McClure",
        "livemode": false,
        "organization_id": "org_hwqYTbRCnV9W5MwyS6BhaLuh",
        "phone": "+633359544302",
        "created_at": 1657187414,
        "updated_at": 1657187414
      }
}

id string
The unique identifier of the PayMongo customer. Prefix is cus_ . This is the reference id when doing some actions for a PayMongo customer such as retrieval, edit and deletion.


type string
Represents the resource type. Value is always customer.


default_device string
For future use in sending in authentication and notifications. Possible values are phone and email.


default_payment_method_id string
The default payment method of the customer. This is manually updated by editing the customer resource.


email string
E-mail address of the customer.


first_name string
First name of the customer.


last_name boolean
Last name of the customer.


livemode boolean
The value is true if the resource exists in live mode or the value is false if the resource exists in test mode.


organization_id string
The unique identifier of a PayMongo merchant. Prefix is org_ . This is an internal reference id to track a merchant account.


phone string
Phone number of the customer. Phone number accepts numbers and the plus sign only. Valid format must be area code followed by 10-digit number.


created_at timestamp
The timestamp when the customer has been created.


updated_at timestamp
The timestamp when the customer has been updated.

A Customer Payment Method resource

{
  "has_more": false,
  "data": [
    {
      "id": "cus_pm_2vzMHJhPdBAqnnZqGrCiHfE9",
      "type": "customer_payment_method",
      "attributes": {
        "customer_id": "cus_b9ENKVqcHBfQQmv26uDYDCsD",
        "livemode": false,
        "organization_id": "org_hwqYTbRCnV9W5MwyS6BhaLuh",
        "payment_method_id": "pm_HuhitULt2giYQQsEXmqAg1ik",
        "payment_method_type": "card",
        "session_type": "on_session",
        "created_at": 1657187430,
        "updated_at": 1657187430
      }
    }
  ]
}

id string
The unique identifier of the PayMongo customer payment method. Prefix is cus_pm_ .


has_more boolean
Boolean value indicating if there are more customer_payment_method available.


data dictionary array
Array of customer payment method.


data.id string
Array of customer payment method.


data.type string
Represents the resource type. Value is always customer_payment_method.


data.attributes.customer_id string
The unique identifier of the PayMongo customer. Prefix is cus_ .


data.attributes.livemode string
The value is true if the resource exists in live mode or the value is false if the resource exists in test mode.


data.attributes.organization_id string
The unique identifier of a PayMongo merchant. Prefix is org_ .


data.attributes.payment_method_id string
The unique identifier of a PayMongo payment method. Prefix is pm_ . This is attached to the payment intent to charge the customer's card.


data.attributes.payment_method_type string
The type of payment method. For now, the only possible value is card.


data.attributes.session_type string
Describes the behavior of card vaulting. For now, the only possible value is on_session.


data.attributes.created_at timestamp
The timestamp when the payment method has been created.


data.attributes.updated_at timestamp
The timestamp when the payment method has been updated.