curl --request PATCH \
--url https://api-sandbox.revolv3.com/api/PaymentMethod/{paymentMethodId} \
--header 'Content-Type: application/json-patch+json' \
--header 'x-revolv3-token: <api-key>' \
--data '
{
"billingAddress": {
"addressId": null,
"addressLine1": "100 Main Street",
"addressLine2": null,
"city": "Santa Ana",
"state": "CA",
"postalCode": "90000",
"phoneNumber": null,
"email": null,
"country": "US"
},
"creditCard": {
"expirationDate": "1035"
},
"billingFirstName": "John",
"billingLastName": null,
"billingFullName": null
}
'import requests
url = "https://api-sandbox.revolv3.com/api/PaymentMethod/{paymentMethodId}"
payload = {
"billingAddress": {
"addressId": None,
"addressLine1": "100 Main Street",
"addressLine2": None,
"city": "Santa Ana",
"state": "CA",
"postalCode": "90000",
"phoneNumber": None,
"email": None,
"country": "US"
},
"creditCard": { "expirationDate": "1035" },
"billingFirstName": "John",
"billingLastName": None,
"billingFullName": None
}
headers = {
"x-revolv3-token": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-revolv3-token': '<api-key>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
billingAddress: {
addressId: null,
addressLine1: '100 Main Street',
addressLine2: null,
city: 'Santa Ana',
state: 'CA',
postalCode: '90000',
phoneNumber: null,
email: null,
country: 'US'
},
creditCard: {expirationDate: '1035'},
billingFirstName: 'John',
billingLastName: null,
billingFullName: null
})
};
fetch('https://api-sandbox.revolv3.com/api/PaymentMethod/{paymentMethodId}', 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.revolv3.com/api/PaymentMethod/{paymentMethodId}",
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([
'billingAddress' => [
'addressId' => null,
'addressLine1' => '100 Main Street',
'addressLine2' => null,
'city' => 'Santa Ana',
'state' => 'CA',
'postalCode' => '90000',
'phoneNumber' => null,
'email' => null,
'country' => 'US'
],
'creditCard' => [
'expirationDate' => '1035'
],
'billingFirstName' => 'John',
'billingLastName' => null,
'billingFullName' => null
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+json",
"x-revolv3-token: <api-key>"
],
]);
$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.revolv3.com/api/PaymentMethod/{paymentMethodId}"
payload := strings.NewReader("{\n \"billingAddress\": {\n \"addressId\": null,\n \"addressLine1\": \"100 Main Street\",\n \"addressLine2\": null,\n \"city\": \"Santa Ana\",\n \"state\": \"CA\",\n \"postalCode\": \"90000\",\n \"phoneNumber\": null,\n \"email\": null,\n \"country\": \"US\"\n },\n \"creditCard\": {\n \"expirationDate\": \"1035\"\n },\n \"billingFirstName\": \"John\",\n \"billingLastName\": null,\n \"billingFullName\": null\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-revolv3-token", "<api-key>")
req.Header.Add("Content-Type", "application/json-patch+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.revolv3.com/api/PaymentMethod/{paymentMethodId}")
.header("x-revolv3-token", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"billingAddress\": {\n \"addressId\": null,\n \"addressLine1\": \"100 Main Street\",\n \"addressLine2\": null,\n \"city\": \"Santa Ana\",\n \"state\": \"CA\",\n \"postalCode\": \"90000\",\n \"phoneNumber\": null,\n \"email\": null,\n \"country\": \"US\"\n },\n \"creditCard\": {\n \"expirationDate\": \"1035\"\n },\n \"billingFirstName\": \"John\",\n \"billingLastName\": null,\n \"billingFullName\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.revolv3.com/api/PaymentMethod/{paymentMethodId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-revolv3-token"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"billingAddress\": {\n \"addressId\": null,\n \"addressLine1\": \"100 Main Street\",\n \"addressLine2\": null,\n \"city\": \"Santa Ana\",\n \"state\": \"CA\",\n \"postalCode\": \"90000\",\n \"phoneNumber\": null,\n \"email\": null,\n \"country\": \"US\"\n },\n \"creditCard\": {\n \"expirationDate\": \"1035\"\n },\n \"billingFirstName\": \"John\",\n \"billingLastName\": null,\n \"billingFullName\": null\n}"
response = http.request(request)
puts response.read_body{
"paymentMethodId": 1,
"billingAddressId": 1,
"billingAddress": {
"addressId": 1,
"addressLine1": "123 Main",
"addressLine2": null,
"city": "Santa Ana",
"state": "CA",
"postalCode": "90000",
"phoneNumber": null,
"email": null,
"country": "US"
},
"billingFirstName": "John",
"billingLastName": "Smith",
"merchantPaymentMethodRefId": "payment-method-ref-id_hgays-213-4rf4",
"paymentMethodAchDetails": null,
"paymentMethodCreditCardDetails": {
"binNumber": "411111",
"paymentLast4Digit": "1111",
"paymentExpirationDate": "1025",
"accountUpdateMessage": null,
"accountUpdateDateTime": null,
"accountUpdateCode": null
}
}{
"message": "Unable to perform the request action with provided data."
}{
"message": "Attempted to perform an unauthorized operation."
}{
"message": "Unable to find an entity with the provided data."
}Update Payment Method
curl --request PATCH \
--url https://api-sandbox.revolv3.com/api/PaymentMethod/{paymentMethodId} \
--header 'Content-Type: application/json-patch+json' \
--header 'x-revolv3-token: <api-key>' \
--data '
{
"billingAddress": {
"addressId": null,
"addressLine1": "100 Main Street",
"addressLine2": null,
"city": "Santa Ana",
"state": "CA",
"postalCode": "90000",
"phoneNumber": null,
"email": null,
"country": "US"
},
"creditCard": {
"expirationDate": "1035"
},
"billingFirstName": "John",
"billingLastName": null,
"billingFullName": null
}
'import requests
url = "https://api-sandbox.revolv3.com/api/PaymentMethod/{paymentMethodId}"
payload = {
"billingAddress": {
"addressId": None,
"addressLine1": "100 Main Street",
"addressLine2": None,
"city": "Santa Ana",
"state": "CA",
"postalCode": "90000",
"phoneNumber": None,
"email": None,
"country": "US"
},
"creditCard": { "expirationDate": "1035" },
"billingFirstName": "John",
"billingLastName": None,
"billingFullName": None
}
headers = {
"x-revolv3-token": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-revolv3-token': '<api-key>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
billingAddress: {
addressId: null,
addressLine1: '100 Main Street',
addressLine2: null,
city: 'Santa Ana',
state: 'CA',
postalCode: '90000',
phoneNumber: null,
email: null,
country: 'US'
},
creditCard: {expirationDate: '1035'},
billingFirstName: 'John',
billingLastName: null,
billingFullName: null
})
};
fetch('https://api-sandbox.revolv3.com/api/PaymentMethod/{paymentMethodId}', 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.revolv3.com/api/PaymentMethod/{paymentMethodId}",
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([
'billingAddress' => [
'addressId' => null,
'addressLine1' => '100 Main Street',
'addressLine2' => null,
'city' => 'Santa Ana',
'state' => 'CA',
'postalCode' => '90000',
'phoneNumber' => null,
'email' => null,
'country' => 'US'
],
'creditCard' => [
'expirationDate' => '1035'
],
'billingFirstName' => 'John',
'billingLastName' => null,
'billingFullName' => null
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json-patch+json",
"x-revolv3-token: <api-key>"
],
]);
$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.revolv3.com/api/PaymentMethod/{paymentMethodId}"
payload := strings.NewReader("{\n \"billingAddress\": {\n \"addressId\": null,\n \"addressLine1\": \"100 Main Street\",\n \"addressLine2\": null,\n \"city\": \"Santa Ana\",\n \"state\": \"CA\",\n \"postalCode\": \"90000\",\n \"phoneNumber\": null,\n \"email\": null,\n \"country\": \"US\"\n },\n \"creditCard\": {\n \"expirationDate\": \"1035\"\n },\n \"billingFirstName\": \"John\",\n \"billingLastName\": null,\n \"billingFullName\": null\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-revolv3-token", "<api-key>")
req.Header.Add("Content-Type", "application/json-patch+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.revolv3.com/api/PaymentMethod/{paymentMethodId}")
.header("x-revolv3-token", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"billingAddress\": {\n \"addressId\": null,\n \"addressLine1\": \"100 Main Street\",\n \"addressLine2\": null,\n \"city\": \"Santa Ana\",\n \"state\": \"CA\",\n \"postalCode\": \"90000\",\n \"phoneNumber\": null,\n \"email\": null,\n \"country\": \"US\"\n },\n \"creditCard\": {\n \"expirationDate\": \"1035\"\n },\n \"billingFirstName\": \"John\",\n \"billingLastName\": null,\n \"billingFullName\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.revolv3.com/api/PaymentMethod/{paymentMethodId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-revolv3-token"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"billingAddress\": {\n \"addressId\": null,\n \"addressLine1\": \"100 Main Street\",\n \"addressLine2\": null,\n \"city\": \"Santa Ana\",\n \"state\": \"CA\",\n \"postalCode\": \"90000\",\n \"phoneNumber\": null,\n \"email\": null,\n \"country\": \"US\"\n },\n \"creditCard\": {\n \"expirationDate\": \"1035\"\n },\n \"billingFirstName\": \"John\",\n \"billingLastName\": null,\n \"billingFullName\": null\n}"
response = http.request(request)
puts response.read_body{
"paymentMethodId": 1,
"billingAddressId": 1,
"billingAddress": {
"addressId": 1,
"addressLine1": "123 Main",
"addressLine2": null,
"city": "Santa Ana",
"state": "CA",
"postalCode": "90000",
"phoneNumber": null,
"email": null,
"country": "US"
},
"billingFirstName": "John",
"billingLastName": "Smith",
"merchantPaymentMethodRefId": "payment-method-ref-id_hgays-213-4rf4",
"paymentMethodAchDetails": null,
"paymentMethodCreditCardDetails": {
"binNumber": "411111",
"paymentLast4Digit": "1111",
"paymentExpirationDate": "1025",
"accountUpdateMessage": null,
"accountUpdateDateTime": null,
"accountUpdateCode": null
}
}{
"message": "Unable to perform the request action with provided data."
}{
"message": "Attempted to perform an unauthorized operation."
}{
"message": "Unable to find an entity with the provided data."
}Authorizations
Path Parameters
Unique identifier for the customer's payment information.
1 <= x <= 1000000000Body
Conditional: either both BillingFirstName and BillingLastName or BillingFullName must be provided.
The customers’s first name associated with a payment method that is used for billing purposes.
100Conditional: either both BillingFirstName and BillingLastName or BillingFullName must be provided.
The customers’s last name associated with a payment method that is used for billing purposes.
100Conditional: either BillingFullName or both BillingFirstName and BillingLastName must be provided.
The customers’s full name associated with a payment method that is used for billing purposes.
200Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
OK
The unique identifier for the payment method information.
1 <= x <= 1000000000The unique identifier of the address.
1 <= x <= 1000000000Show child attributes
Show child attributes
100100Merchant's unique identifier for the payment method.
100ACH account information.
Show child attributes
Show child attributes
The details of credit card payment method.
Show child attributes
Show child attributes

