Skip to main content
PATCH
/
api
/
user-api
/
address
/
payee
/
update
Update Payee Address
curl --request PATCH \
  --url https://api.sandbox.paywint.com/api/user-api/address/payee/update \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <x-api-key>' \
  --header 'X-Api-Secret: <x-api-secret>' \
  --data '
{
  "payee_id": "f47ac10b-****-****-****-0e02b2c3d479",
  "address_id": "2d8c5ca1-98cb-42f7-8c1e-70a2b0b8e8f1",
  "first_name": "<string>",
  "last_name": "<string>",
  "address_line_1": "<string>",
  "address_line_2": "<string>",
  "company_name": "<string>",
  "city": "<string>",
  "state": "<string>",
  "zipcode": "<string>",
  "country": "<string>",
  "is_default": true
}
'
import requests

url = "https://api.sandbox.paywint.com/api/user-api/address/payee/update"

payload = {
    "payee_id": "f47ac10b-****-****-****-0e02b2c3d479",
    "address_id": "2d8c5ca1-98cb-42f7-8c1e-70a2b0b8e8f1",
    "first_name": "<string>",
    "last_name": "<string>",
    "address_line_1": "<string>",
    "address_line_2": "<string>",
    "company_name": "<string>",
    "city": "<string>",
    "state": "<string>",
    "zipcode": "<string>",
    "country": "<string>",
    "is_default": True
}
headers = {
    "X-Api-Key": "<x-api-key>",
    "X-Api-Secret": "<x-api-secret>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'PATCH',
  headers: {
    'X-Api-Key': '<x-api-key>',
    'X-Api-Secret': '<x-api-secret>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    payee_id: 'f47ac10b-****-****-****-0e02b2c3d479',
    address_id: '2d8c5ca1-98cb-42f7-8c1e-70a2b0b8e8f1',
    first_name: '<string>',
    last_name: '<string>',
    address_line_1: '<string>',
    address_line_2: '<string>',
    company_name: '<string>',
    city: '<string>',
    state: '<string>',
    zipcode: '<string>',
    country: '<string>',
    is_default: true
  })
};

fetch('https://api.sandbox.paywint.com/api/user-api/address/payee/update', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.sandbox.paywint.com/api/user-api/address/payee/update",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'payee_id' => 'f47ac10b-****-****-****-0e02b2c3d479',
    'address_id' => '2d8c5ca1-98cb-42f7-8c1e-70a2b0b8e8f1',
    'first_name' => '<string>',
    'last_name' => '<string>',
    'address_line_1' => '<string>',
    'address_line_2' => '<string>',
    'company_name' => '<string>',
    'city' => '<string>',
    'state' => '<string>',
    'zipcode' => '<string>',
    'country' => '<string>',
    'is_default' => true
  ]),
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json",
    "X-Api-Key: <x-api-key>",
    "X-Api-Secret: <x-api-secret>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sandbox.paywint.com/api/user-api/address/payee/update"

	payload := strings.NewReader("{\n  \"payee_id\": \"f47ac10b-****-****-****-0e02b2c3d479\",\n  \"address_id\": \"2d8c5ca1-98cb-42f7-8c1e-70a2b0b8e8f1\",\n  \"first_name\": \"<string>\",\n  \"last_name\": \"<string>\",\n  \"address_line_1\": \"<string>\",\n  \"address_line_2\": \"<string>\",\n  \"company_name\": \"<string>\",\n  \"city\": \"<string>\",\n  \"state\": \"<string>\",\n  \"zipcode\": \"<string>\",\n  \"country\": \"<string>\",\n  \"is_default\": true\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("X-Api-Key", "<x-api-key>")
	req.Header.Add("X-Api-Secret", "<x-api-secret>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://api.sandbox.paywint.com/api/user-api/address/payee/update")
  .header("X-Api-Key", "<x-api-key>")
  .header("X-Api-Secret", "<x-api-secret>")
  .header("Content-Type", "application/json")
  .body("{\n  \"payee_id\": \"f47ac10b-****-****-****-0e02b2c3d479\",\n  \"address_id\": \"2d8c5ca1-98cb-42f7-8c1e-70a2b0b8e8f1\",\n  \"first_name\": \"<string>\",\n  \"last_name\": \"<string>\",\n  \"address_line_1\": \"<string>\",\n  \"address_line_2\": \"<string>\",\n  \"company_name\": \"<string>\",\n  \"city\": \"<string>\",\n  \"state\": \"<string>\",\n  \"zipcode\": \"<string>\",\n  \"country\": \"<string>\",\n  \"is_default\": true\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.paywint.com/api/user-api/address/payee/update")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<x-api-key>'
request["X-Api-Secret"] = '<x-api-secret>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"payee_id\": \"f47ac10b-****-****-****-0e02b2c3d479\",\n  \"address_id\": \"2d8c5ca1-98cb-42f7-8c1e-70a2b0b8e8f1\",\n  \"first_name\": \"<string>\",\n  \"last_name\": \"<string>\",\n  \"address_line_1\": \"<string>\",\n  \"address_line_2\": \"<string>\",\n  \"company_name\": \"<string>\",\n  \"city\": \"<string>\",\n  \"state\": \"<string>\",\n  \"zipcode\": \"<string>\",\n  \"country\": \"<string>\",\n  \"is_default\": true\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "message": "Operation completed.",
  "data": {
    "address_id": "a1b2c3d4-****-****-****-e5f6g7h8i9j0",
    "fist_name": "John",
    "last_name": "Doe",
    "address_line_1": "123 Main Street, Apt 4B",
    "address_line_2": "123 Main Street, Apt 4B",
    "company_name": "Meta Corp",
    "city": "New York",
    "state": "NY",
    "zipcode": "10001",
    "country": "United States",
    "is_default": false,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  },
  "queryGeneratedTime": 1718006400
}
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Headers

X-Api-Key
string
required

Your API Key (UUID format). Required to identify and authorize each request

X-Api-Secret
string
required

Secret associated with your API Key. Used for authenticating requests. Keep this secure.

Body

application/json
payee_id
string<uuid4>
required

Unique identifier for the payee whose addresses are being managed.

Example:

"f47ac10b-****-****-****-0e02b2c3d479"

address_id
string<uuid4>
required

Unique identifier for the payee address record.

Example:

"2d8c5ca1-98cb-42f7-8c1e-70a2b0b8e8f1"

first_name
string | null

Recipient's first name for the updated address (optional).

Required string length: 2 - 100
last_name
string | null

Last name for the updated address (optional).

Required string length: 1 - 100
address_line_1
string | null

Primary street line for the updated address (optional).

Maximum string length: 100
address_line_2
string | null

Secondary street line (optional).

Maximum string length: 100
company_name
string | null

Optional company name for the address.

Maximum string length: 100
city
string | null

City for the updated address (optional).

Maximum string length: 40
state
string | null

State or province (optional).

Maximum string length: 30
zipcode
string | null

Postal code (optional).

Maximum string length: 10
country
string | null

Country name (optional).

Maximum string length: 40
is_default
boolean | null

If true, makes this address the default; false leaves the default untouched.

Response

Successful Response

success
boolean
default:true

Indicates whether the request was processed successfully.

Example:

true

message
string
default:Success

A short, human-readable message describing the result of the request.

Example:

"Operation completed."

data
ExternalContactAddressRead · object | null

The main response payload, if applicable

queryGeneratedTime
number | null
default:1778161546.973489

The Unix timestamp (in seconds) indicating when the response was generated.

Example:

1718006400