Retrieve a customer
GET/v2/customers/:cus_id
Retrieves the details of an existing customer. You need only supply the unique customer identifier that was returned upon customer creation.
Request
Path Parameters
Responses
- 200
- 422
Successful Response
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
The type of object, in this case charge
A unique ID for this charge. usually starts with cus_
, followed by an alphanumeric string.
Customer's email
Customer's mobile number
Customer description.
sources
object[]
required
The customer’s payment sources, if any.
String representing the object's type. Objects of the same type share the same value.
A unique ID for this source, usually starts with src_
, followed by an alphanumeric string.
Possible values: [card
, gcash
, paymaya
, wechat
, alipay
, unionpay
, grabpay
, instapay
, qrph
, bpi
, unionbank
, metrobank
, bdo
, pnb
, rcbc
]
An enumeration.
card
object
String representing the object's type. Objects of the same type share the same value.
A unique ID for this card, usually starts with card_
, followed by an alphanumeric string.
Full name of cardholder
The last 4 digits of the credit card number
Expiration month of the card.
Four-digit number expiration year of the card.
bank_account
object
Reference Id we used in connecting to debit api
Token's bank type
Specific bank's code
redirect
object
Possible values: non-empty
and <= 2083 characters
The URL where we redirect after successful payment.
Possible values: non-empty
and <= 2083 characters
The URL where we redirect after failed payment.
Possible values: non-empty
and <= 2083 characters
The URL where we will call repeatedly, until a proper response was received.
owner
object
billing
object
Possible values: non-empty
and <= 50 characters
, Value must match regular expression ^[A-Za-z0-9\s\'#_\.\-,]+$
Full name of account holder
Possible values: non-empty
and <= 50 characters
, Value must match regular expression ^[A-Za-z0-9\s\'#_\.\-,]+$
Possible values: non-empty
and <= 255 characters
, Value must match regular expression ^[A-Za-z0-9\s\'#_\.\-,]+$
Possible values: non-empty
and <= 255 characters
, Value must match regular expression ^[A-Za-z0-9\s\'#_\.\-,]+$
Possible values: non-empty
and <= 100 characters
, Value must match regular expression ^[A-Za-z0-9\s\'#_\.\-,]+$
Possible values: non-empty
and <= 50 characters
, Value must match regular expression ^[A-Za-z0-9\s\'#_\.\-,]+$
Possible values: non-empty
and <= 50 characters
, Value must match regular expression ^[A-Za-z0-9\s\'#_\.\-,]+$
Possible values: non-empty
and <= 50 characters
, Value must match regular expression ^[A-Za-z0-9\s\'#_\.\-,]+$
shipping
object
Possible values: non-empty
and <= 50 characters
, Value must match regular expression ^[A-Za-z0-9\s\'#_\.\-,]+$
Full name of account holder
Possible values: non-empty
and <= 50 characters
, Value must match regular expression ^[A-Za-z0-9\s\'#_\.\-,]+$
Possible values: non-empty
and <= 255 characters
, Value must match regular expression ^[A-Za-z0-9\s\'#_\.\-,]+$
Possible values: non-empty
and <= 255 characters
, Value must match regular expression ^[A-Za-z0-9\s\'#_\.\-,]+$
Possible values: non-empty
and <= 100 characters
, Value must match regular expression ^[A-Za-z0-9\s\'#_\.\-,]+$
Possible values: non-empty
and <= 50 characters
, Value must match regular expression ^[A-Za-z0-9\s\'#_\.\-,]+$
Possible values: non-empty
and <= 50 characters
, Value must match regular expression ^[A-Za-z0-9\s\'#_\.\-,]+$
Possible values: non-empty
and <= 50 characters
, Value must match regular expression ^[A-Za-z0-9\s\'#_\.\-,]+$
Possible values: <= 50 characters
Full name of account holder
Possible values: non-empty
and <= 50 characters
, Value must match regular expression ^[A-Za-z0-9\s\'#_\.\-,]+$
Whether this source has been securely saved for later reuse.
Whether this source has already been used.
Has the value true if the object exists in live mode or the value false if the object exists in test mode.
Time at which the object was created in ISO 8601 format.
Time at which the object was updated in ISO 8601 format.
Will be true if the secret key used was the live key, false if the test key was used
Time at which the object was created in ISO 8601 format.
Time at which the object was updated in ISO 8601 format.
Default value: [object Object]
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
{
"object": "charge",
"id": "cus_01786de4d9d69ad1369bfd56b098ccd9",
"email": "[email protected]",
"mobile_number": "+639171234567",
"description": "Juan dela Cruz (created by PayTerminal)",
"sources": [
{
"object": "source",
"id": "src_01786de4d9d69ad1369bfd56b098ccd9",
"card": {
"object": "source",
"id": "card_01786e96b17d197aacd0de4e1f01ac5f",
"name": "Gerry Isaac",
"last4": "1112",
"exp_month": "12",
"exp_year": "2025",
"address_line1": "string",
"address_line2": "string",
"address_city": "string",
"address_state": "string",
"address_country": "string",
"address_zip": "string",
"brand": "string",
"country": "string",
"cvc_checked": "string",
"funding": "string",
"issuing_bank": "string"
},
"bank_account": {
"reference_id": "cus_123123123",
"bank_type": "BPI",
"bank_code": "magpiebpi",
"account_name": "",
"account_number": "",
"account_type": "",
"expires_at": "",
"metadata": {}
},
"redirect": {
"success": "https://magpie.im/?status=success",
"fail": "https://magpie.im/?status=failed",
"notify": "https://magpie.im/?status=notification"
},
"owner": {
"billing": {
"name": "Gerry Isaac",
"phone_number": "639175511222",
"email": "[email protected]",
"line1": "#123 JP Rizal St.",
"line2": "Brgy. Aguinaldo",
"city": "Quezon City",
"state": "Metro Manila",
"country": "PH",
"zip_code": "1100"
},
"shipping": {
"name": "Gerry Isaac",
"phone_number": "639175511222",
"email": "[email protected]",
"line1": "#123 JP Rizal St.",
"line2": "Brgy. Aguinaldo",
"city": "Quezon City",
"state": "Metro Manila",
"country": "PH",
"zip_code": "1100"
},
"name": "Gerry Isaac",
"address_country": "PH"
},
"vaulted": false,
"used": false,
"livemode": true,
"created_at": "2021-03-26T17:36:57.828847+08:00",
"updated_at": "2021-03-26T17:36:57.828847+08:00",
"metadata": {}
}
],
"livemode": true,
"created_at": "2021-04-12T13:55:54.194136+08:00",
"updated_at": "2021-04-12T13:55:55.194136+08:00",
"metadata": {
"address": "#123 JP Rizal St., Quezon City"
}
}
Validation Error
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
- MOD1
- MOD2
]
]
detail
object[]
loc
object[]
required
anyOf
string
integer
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}