Skip to main content
POST
/
customers
/
{id}
/
update
curl -X POST https://api.swervpay.co/api/v1/customers/{id}/update \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "user",
    "email": "[email protected]"
  }'
import { SwervpayClient } from '@swervpaydev/sdk';

const config = {
    secretKey: "<SECRET_KEY>",
    businessId: "<BUSINESS_ID>"
}

const swervpay = new SwervpayClient(config);

await swervpay.customer.update("<CUSTOMER_ID>", {
    phone_number: "user",
    email: "[email protected]"
})
use Swervpaydev\SDK\Swervpay;

$config = [
	'business_id' => '<BUSINESS_ID>',
	'secret_key' => '<SECRET_KEY>'
];

$client = new Swervpay($config);

$client->customer()->update("<CUSTOMER_ID>", [
    "phone_number" => "user",
    "email" => "[email protected]"
])->toArray();
package main

import (
	"context"
	"fmt"
	"github.com/swerv-ltd/swervpay-go"
	"log"
)

func main() {
	ctx := context.Background()

	client := swervpay.NewSwervpayClient(&swervpay.SwervpayClientOption{
        BusinessID: "<BUSINESS_ID>",
        SecretKey: "<SECRET_KEY>",
    })

    data := swervpay.UpdateCustomerBody{
        PhoneNumber: "user",
        Email: "[email protected]"
    }

	resp, err := client.Customer.Update(ctx, "<CUSTOMER_ID>", data)

	if err != nil {
		log.Fatal("error", err.Error())
		return
	}
}
{
  "message": "<string>"
}
{
"message": "<string>",
"values": {}
}
{
"message": "<string>",
"values": {}
}
{
"message": "<string>",
"values": {}
}
curl -X POST https://api.swervpay.co/api/v1/customers/{id}/update \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "user",
    "email": "[email protected]"
  }'
import { SwervpayClient } from '@swervpaydev/sdk';

const config = {
    secretKey: "<SECRET_KEY>",
    businessId: "<BUSINESS_ID>"
}

const swervpay = new SwervpayClient(config);

await swervpay.customer.update("<CUSTOMER_ID>", {
    phone_number: "user",
    email: "[email protected]"
})
use Swervpaydev\SDK\Swervpay;

$config = [
	'business_id' => '<BUSINESS_ID>',
	'secret_key' => '<SECRET_KEY>'
];

$client = new Swervpay($config);

$client->customer()->update("<CUSTOMER_ID>", [
    "phone_number" => "user",
    "email" => "[email protected]"
])->toArray();
package main

import (
	"context"
	"fmt"
	"github.com/swerv-ltd/swervpay-go"
	"log"
)

func main() {
	ctx := context.Background()

	client := swervpay.NewSwervpayClient(&swervpay.SwervpayClientOption{
        BusinessID: "<BUSINESS_ID>",
        SecretKey: "<SECRET_KEY>",
    })

    data := swervpay.UpdateCustomerBody{
        PhoneNumber: "user",
        Email: "[email protected]"
    }

	resp, err := client.Customer.Update(ctx, "<CUSTOMER_ID>", data)

	if err != nil {
		log.Fatal("error", err.Error())
		return
	}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Body

application/json
email
string
phone_number
string

Response

OK

message
string