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.
| Field | Notes |
|---|---|
name | min 3, max 100 |
email | RFC 5322 |
phone | E.164 |
capabilities | partial replace of {charge, transfer, payout} |
address | append-history — inserts a NEW customer_addresses row with address_type="billing". Synced to Stripe address[*]. |
shipping | append-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
| Name | Value | Description |
|---|---|---|
| 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
| Name | Type | Value |
|---|---|---|
| name | string | John A. Doe |
| string | <string> | |
| phone | string | +66800000001 |
| business_name | string | <string> |
| tax_ids | array | [1] |
| address | object | {…} |
| shipping | object | {…} |
| capabilities | object | {…} |
| preferred_locales | array | [1] |
| labels | array | [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
| Name | Value |
|---|---|
| Content-Type | application/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
| Name | Value |
|---|---|
| Content-Type | application/json |
Body
{
"object": "error",
"code": "<string>",
"key": "<string>",
"i18n_key": "<string>",
"message": "<string>",
"request_id": "<string>"
}