Paycose Docs
Customer
PATCH/customers/{customer_id}

Update

Body — 1:1 with UpdateCustomerDTO (app/handlers/v1/customer/request.go). All fields optional; only supplied fields are updated.

FieldNotes
namemin 3, max 100
emailRFC 5322
phoneE.164
capabilitiespartial replace of {charge, transfer, payout}
addressappend-history — inserts a NEW customer_addresses row with address_type="billing". Synced to Stripe address[*].
shippingappend-history — inserts a NEW customer_addresses row with address_type="shipping". Synced to Stripe shipping[*]. Latest shipping row is the default shipping_details.address on subsequent quotes/invoices when no per-resource override is supplied.

Request

Example

curl -X PATCH 'https://api.paycose.com/api/v1/app1/platform/wallet/customers/{{customer_id}}' \
  -H 'X-Session-Token: {{session_token}}' \
  -H 'X-Country: {{country}}' \
  -H 'X-Test-Mode: {{x_test_mode}}' \
  -d '{
  "name": "John A. Doe",
  "email": "<string>",
  "phone": "+66800000001",
  "business_name": "<string>",
  "tax_ids": [
    {
      "type": "<string>",
      "value": "<string>",
      "country": "<string>"
    }
  ],
  "address": {
    "city": "New York",
    "country": "US",
    "line1": "123 Main Street",
    "line2": "Apt 4B",
    "postal_code": "10001",
    "state": "NY"
  },
  "shipping": {
    "name": "Jane Doe",
    "phone": "+15551234567",
    "address": {
      "city": "Brooklyn",
      "country": "US",
      "line1": "456 Shipping Ln",
      "line2": "Suite 200",
      "postal_code": "11201",
      "state": "NY"
    }
  },
  "capabilities": {
    "charge": true,
    "transfer": true,
    "payout": true
  },
  "preferred_locales": [
    "<string>"
  ],
  "labels": [
    "<string>"
  ]
}'

Headers

NameValueDescription
X-Session-Token{{session_token}}
X-Country{{country}}
X-Test-Mode{{x_test_mode}}true=wallet_test, false=wallet_live (default). Toggle the x_test_mode collection variable to flip every applicable request.

Body

NameTypeValue
namestringJohn A. Doe
emailstring<string>
phonestring+66800000001
business_namestring<string>
tax_idsarray[1]
addressobject{…}
shippingobject{…}
capabilitiesobject{…}
preferred_localesarray[1]
labelsarray[1]
{
  "name": "John A. Doe",
  "email": "<string>",
  "phone": "+66800000001",
  "business_name": "<string>",
  "tax_ids": [
    {
      "type": "<string>",
      "value": "<string>",
      "country": "<string>"
    }
  ],
  "address": {
    "city": "New York",
    "country": "US",
    "line1": "123 Main Street",
    "line2": "Apt 4B",
    "postal_code": "10001",
    "state": "NY"
  },
  "shipping": {
    "name": "Jane Doe",
    "phone": "+15551234567",
    "address": {
      "city": "Brooklyn",
      "country": "US",
      "line1": "456 Shipping Ln",
      "line2": "Suite 200",
      "postal_code": "11201",
      "state": "NY"
    }
  },
  "capabilities": {
    "charge": true,
    "transfer": true,
    "payout": true
  },
  "preferred_locales": [
    "<string>"
  ],
  "labels": [
    "<string>"
  ]
}

Responses

200200 OK

Headers

NameValue
Content-Typeapplication/json

Body

{
  "id": "<string>",
  "object": "<string>",
  "resource": "<string>",
  "created_at": "<RFC3339 timestamp>",
  "errors": [
    {
      "code": "<string>",
      "message": "<string>"
    }
  ],
  "next_action": [
    {
      "type": "<string>",
      "title": "<string>",
      "description": "<string>",
      "i18n_key": "<string>",
      "url": "<string>",
      "client_secret": "<string>",
      "payment_method": "<string>",
      "qr_data": "<string>"
    }
  ]
}
400400 Bad Request

Headers

NameValue
Content-Typeapplication/json

Body

{
  "object": "error",
  "code": "<string>",
  "key": "<string>",
  "i18n_key": "<string>",
  "message": "<string>",
  "request_id": "<string>"
}

On this page