curl --request POST \
--url https://api-sandbox.revolv3.com/api/Invoices/payment \
--header 'Content-Type: application/json-patch+json' \
--header 'x-revolv3-token: <api-key>' \
--data '
{
"customerId": 1,
"firstName": null,
"lastName": null,
"merchantCustomerRefId": null,
"email": null,
"invoice": {
"merchantInvoiceRefId": "123456789",
"invoiceLineItems": [
{
"name": "LineItem1",
"description": "Line Item 1 Description",
"value": 10,
"valueType": "Standard"
},
{
"name": "LineItem2",
"description": "Line Item 2 Description",
"value": 20,
"valueType": "Standard"
},
{
"name": "LineItem3",
"description": "Line Item 3 Description",
"value": 30,
"valueType": "Standard"
}
]
},
"dynamicDescriptor": {
"subMerchantId": null,
"subMerchantName": "REV*revolv3",
"subMerchantPhone": "00442030513031",
"countryCode": null,
"city": null
},
"paymentMethod": {
"billingAddress": {
"addressId": null,
"addressLine1": "100 Main",
"addressLine2": null,
"city": "Santa Ana",
"state": "CA",
"postalCode": "91111",
"phoneNumber": null,
"email": null,
"country": "US"
},
"creditCard": {
"paymentAccountNumber": "4111111111111111",
"expirationDate": "1025",
"securityCode": null,
"networkToken": null
},
"ach": null,
"googlePay": null,
"applePay": null,
"merchantPaymentMethodRefId": "payment-method-ref-id_hgays-213-4rf4",
"billingFirstName": "Joe",
"billingLastName": "Doe",
"billingFullName": null
},
"paymentMethodAuthorizationId": null,
"paymentMethodId": null
}
'import requests
url = "https://api-sandbox.revolv3.com/api/Invoices/payment"
payload = {
"customerId": 1,
"firstName": None,
"lastName": None,
"merchantCustomerRefId": None,
"email": None,
"invoice": {
"merchantInvoiceRefId": "123456789",
"invoiceLineItems": [
{
"name": "LineItem1",
"description": "Line Item 1 Description",
"value": 10,
"valueType": "Standard"
},
{
"name": "LineItem2",
"description": "Line Item 2 Description",
"value": 20,
"valueType": "Standard"
},
{
"name": "LineItem3",
"description": "Line Item 3 Description",
"value": 30,
"valueType": "Standard"
}
]
},
"dynamicDescriptor": {
"subMerchantId": None,
"subMerchantName": "REV*revolv3",
"subMerchantPhone": "00442030513031",
"countryCode": None,
"city": None
},
"paymentMethod": {
"billingAddress": {
"addressId": None,
"addressLine1": "100 Main",
"addressLine2": None,
"city": "Santa Ana",
"state": "CA",
"postalCode": "91111",
"phoneNumber": None,
"email": None,
"country": "US"
},
"creditCard": {
"paymentAccountNumber": "4111111111111111",
"expirationDate": "1025",
"securityCode": None,
"networkToken": None
},
"ach": None,
"googlePay": None,
"applePay": None,
"merchantPaymentMethodRefId": "payment-method-ref-id_hgays-213-4rf4",
"billingFirstName": "Joe",
"billingLastName": "Doe",
"billingFullName": None
},
"paymentMethodAuthorizationId": None,
"paymentMethodId": None
}
headers = {
"x-revolv3-token": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-revolv3-token': '<api-key>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
customerId: 1,
firstName: null,
lastName: null,
merchantCustomerRefId: null,
email: null,
invoice: {
merchantInvoiceRefId: '123456789',
invoiceLineItems: [
{
name: 'LineItem1',
description: 'Line Item 1 Description',
value: 10,
valueType: 'Standard'
},
{
name: 'LineItem2',
description: 'Line Item 2 Description',
value: 20,
valueType: 'Standard'
},
{
name: 'LineItem3',
description: 'Line Item 3 Description',
value: 30,
valueType: 'Standard'
}
]
},
dynamicDescriptor: {
subMerchantId: null,
subMerchantName: 'REV*revolv3',
subMerchantPhone: '00442030513031',
countryCode: null,
city: null
},
paymentMethod: {
billingAddress: {
addressId: null,
addressLine1: '100 Main',
addressLine2: null,
city: 'Santa Ana',
state: 'CA',
postalCode: '91111',
phoneNumber: null,
email: null,
country: 'US'
},
creditCard: {
paymentAccountNumber: '4111111111111111',
expirationDate: '1025',
securityCode: null,
networkToken: null
},
ach: null,
googlePay: null,
applePay: null,
merchantPaymentMethodRefId: 'payment-method-ref-id_hgays-213-4rf4',
billingFirstName: 'Joe',
billingLastName: 'Doe',
billingFullName: null
},
paymentMethodAuthorizationId: null,
paymentMethodId: null
})
};
fetch('https://api-sandbox.revolv3.com/api/Invoices/payment', 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/Invoices/payment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customerId' => 1,
'firstName' => null,
'lastName' => null,
'merchantCustomerRefId' => null,
'email' => null,
'invoice' => [
'merchantInvoiceRefId' => '123456789',
'invoiceLineItems' => [
[
'name' => 'LineItem1',
'description' => 'Line Item 1 Description',
'value' => 10,
'valueType' => 'Standard'
],
[
'name' => 'LineItem2',
'description' => 'Line Item 2 Description',
'value' => 20,
'valueType' => 'Standard'
],
[
'name' => 'LineItem3',
'description' => 'Line Item 3 Description',
'value' => 30,
'valueType' => 'Standard'
]
]
],
'dynamicDescriptor' => [
'subMerchantId' => null,
'subMerchantName' => 'REV*revolv3',
'subMerchantPhone' => '00442030513031',
'countryCode' => null,
'city' => null
],
'paymentMethod' => [
'billingAddress' => [
'addressId' => null,
'addressLine1' => '100 Main',
'addressLine2' => null,
'city' => 'Santa Ana',
'state' => 'CA',
'postalCode' => '91111',
'phoneNumber' => null,
'email' => null,
'country' => 'US'
],
'creditCard' => [
'paymentAccountNumber' => '4111111111111111',
'expirationDate' => '1025',
'securityCode' => null,
'networkToken' => null
],
'ach' => null,
'googlePay' => null,
'applePay' => null,
'merchantPaymentMethodRefId' => 'payment-method-ref-id_hgays-213-4rf4',
'billingFirstName' => 'Joe',
'billingLastName' => 'Doe',
'billingFullName' => null
],
'paymentMethodAuthorizationId' => null,
'paymentMethodId' => 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/Invoices/payment"
payload := strings.NewReader("{\n \"customerId\": 1,\n \"firstName\": null,\n \"lastName\": null,\n \"merchantCustomerRefId\": null,\n \"email\": null,\n \"invoice\": {\n \"merchantInvoiceRefId\": \"123456789\",\n \"invoiceLineItems\": [\n {\n \"name\": \"LineItem1\",\n \"description\": \"Line Item 1 Description\",\n \"value\": 10,\n \"valueType\": \"Standard\"\n },\n {\n \"name\": \"LineItem2\",\n \"description\": \"Line Item 2 Description\",\n \"value\": 20,\n \"valueType\": \"Standard\"\n },\n {\n \"name\": \"LineItem3\",\n \"description\": \"Line Item 3 Description\",\n \"value\": 30,\n \"valueType\": \"Standard\"\n }\n ]\n },\n \"dynamicDescriptor\": {\n \"subMerchantId\": null,\n \"subMerchantName\": \"REV*revolv3\",\n \"subMerchantPhone\": \"00442030513031\",\n \"countryCode\": null,\n \"city\": null\n },\n \"paymentMethod\": {\n \"billingAddress\": {\n \"addressId\": null,\n \"addressLine1\": \"100 Main\",\n \"addressLine2\": null,\n \"city\": \"Santa Ana\",\n \"state\": \"CA\",\n \"postalCode\": \"91111\",\n \"phoneNumber\": null,\n \"email\": null,\n \"country\": \"US\"\n },\n \"creditCard\": {\n \"paymentAccountNumber\": \"4111111111111111\",\n \"expirationDate\": \"1025\",\n \"securityCode\": null,\n \"networkToken\": null\n },\n \"ach\": null,\n \"googlePay\": null,\n \"applePay\": null,\n \"merchantPaymentMethodRefId\": \"payment-method-ref-id_hgays-213-4rf4\",\n \"billingFirstName\": \"Joe\",\n \"billingLastName\": \"Doe\",\n \"billingFullName\": null\n },\n \"paymentMethodAuthorizationId\": null,\n \"paymentMethodId\": null\n}")
req, _ := http.NewRequest("POST", 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.post("https://api-sandbox.revolv3.com/api/Invoices/payment")
.header("x-revolv3-token", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"customerId\": 1,\n \"firstName\": null,\n \"lastName\": null,\n \"merchantCustomerRefId\": null,\n \"email\": null,\n \"invoice\": {\n \"merchantInvoiceRefId\": \"123456789\",\n \"invoiceLineItems\": [\n {\n \"name\": \"LineItem1\",\n \"description\": \"Line Item 1 Description\",\n \"value\": 10,\n \"valueType\": \"Standard\"\n },\n {\n \"name\": \"LineItem2\",\n \"description\": \"Line Item 2 Description\",\n \"value\": 20,\n \"valueType\": \"Standard\"\n },\n {\n \"name\": \"LineItem3\",\n \"description\": \"Line Item 3 Description\",\n \"value\": 30,\n \"valueType\": \"Standard\"\n }\n ]\n },\n \"dynamicDescriptor\": {\n \"subMerchantId\": null,\n \"subMerchantName\": \"REV*revolv3\",\n \"subMerchantPhone\": \"00442030513031\",\n \"countryCode\": null,\n \"city\": null\n },\n \"paymentMethod\": {\n \"billingAddress\": {\n \"addressId\": null,\n \"addressLine1\": \"100 Main\",\n \"addressLine2\": null,\n \"city\": \"Santa Ana\",\n \"state\": \"CA\",\n \"postalCode\": \"91111\",\n \"phoneNumber\": null,\n \"email\": null,\n \"country\": \"US\"\n },\n \"creditCard\": {\n \"paymentAccountNumber\": \"4111111111111111\",\n \"expirationDate\": \"1025\",\n \"securityCode\": null,\n \"networkToken\": null\n },\n \"ach\": null,\n \"googlePay\": null,\n \"applePay\": null,\n \"merchantPaymentMethodRefId\": \"payment-method-ref-id_hgays-213-4rf4\",\n \"billingFirstName\": \"Joe\",\n \"billingLastName\": \"Doe\",\n \"billingFullName\": null\n },\n \"paymentMethodAuthorizationId\": null,\n \"paymentMethodId\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.revolv3.com/api/Invoices/payment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-revolv3-token"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"customerId\": 1,\n \"firstName\": null,\n \"lastName\": null,\n \"merchantCustomerRefId\": null,\n \"email\": null,\n \"invoice\": {\n \"merchantInvoiceRefId\": \"123456789\",\n \"invoiceLineItems\": [\n {\n \"name\": \"LineItem1\",\n \"description\": \"Line Item 1 Description\",\n \"value\": 10,\n \"valueType\": \"Standard\"\n },\n {\n \"name\": \"LineItem2\",\n \"description\": \"Line Item 2 Description\",\n \"value\": 20,\n \"valueType\": \"Standard\"\n },\n {\n \"name\": \"LineItem3\",\n \"description\": \"Line Item 3 Description\",\n \"value\": 30,\n \"valueType\": \"Standard\"\n }\n ]\n },\n \"dynamicDescriptor\": {\n \"subMerchantId\": null,\n \"subMerchantName\": \"REV*revolv3\",\n \"subMerchantPhone\": \"00442030513031\",\n \"countryCode\": null,\n \"city\": null\n },\n \"paymentMethod\": {\n \"billingAddress\": {\n \"addressId\": null,\n \"addressLine1\": \"100 Main\",\n \"addressLine2\": null,\n \"city\": \"Santa Ana\",\n \"state\": \"CA\",\n \"postalCode\": \"91111\",\n \"phoneNumber\": null,\n \"email\": null,\n \"country\": \"US\"\n },\n \"creditCard\": {\n \"paymentAccountNumber\": \"4111111111111111\",\n \"expirationDate\": \"1025\",\n \"securityCode\": null,\n \"networkToken\": null\n },\n \"ach\": null,\n \"googlePay\": null,\n \"applePay\": null,\n \"merchantPaymentMethodRefId\": \"payment-method-ref-id_hgays-213-4rf4\",\n \"billingFirstName\": \"Joe\",\n \"billingLastName\": \"Doe\",\n \"billingFullName\": null\n },\n \"paymentMethodAuthorizationId\": null,\n \"paymentMethodId\": null\n}"
response = http.request(request)
puts response.read_body{
"customerId": 1,
"invoiceId": 1,
"merchantInvoiceRefId": "123456789",
"invoiceStatus": "Paid",
"invoiceAttemptStatus": "Success",
"message": "Approve",
"subtotal": 11.97,
"taxAmount": 1.2,
"total": 13.17,
"paymentMethodId": 1
}{
"message": "Unable to perform the request action with provided data."
}{
"message": "Attempted to perform an unauthorized operation."
}{
"message": "PaymentMethodAuthorizationId is being processed in another request."
}{
"message": "Unable to process this operation."
}One Time Payment Without Subscription
Processes a one-time payment for a customer without requiring an active subscription. This endpoint is ideal for standalone transactions such as single purchases.
A one-time payment without a subscription allows you to both authorize and capture funds in a single transaction, as well as capture previously authorized amounts. You can also send a partial capture if needed. You must provide the invoice details, and payment method. The request supports credit cards, network tokens, ACH, Apple Pay, and Google Pay.
⚠️ Deprecated: This endpoint is still supported but is no longer recommended for new integrations. Please use the newer endpoints Sale With Payment Method Details, Sale With Payment Method Id or Capture instead, which provides extended functionality and improved error handling.
curl --request POST \
--url https://api-sandbox.revolv3.com/api/Invoices/payment \
--header 'Content-Type: application/json-patch+json' \
--header 'x-revolv3-token: <api-key>' \
--data '
{
"customerId": 1,
"firstName": null,
"lastName": null,
"merchantCustomerRefId": null,
"email": null,
"invoice": {
"merchantInvoiceRefId": "123456789",
"invoiceLineItems": [
{
"name": "LineItem1",
"description": "Line Item 1 Description",
"value": 10,
"valueType": "Standard"
},
{
"name": "LineItem2",
"description": "Line Item 2 Description",
"value": 20,
"valueType": "Standard"
},
{
"name": "LineItem3",
"description": "Line Item 3 Description",
"value": 30,
"valueType": "Standard"
}
]
},
"dynamicDescriptor": {
"subMerchantId": null,
"subMerchantName": "REV*revolv3",
"subMerchantPhone": "00442030513031",
"countryCode": null,
"city": null
},
"paymentMethod": {
"billingAddress": {
"addressId": null,
"addressLine1": "100 Main",
"addressLine2": null,
"city": "Santa Ana",
"state": "CA",
"postalCode": "91111",
"phoneNumber": null,
"email": null,
"country": "US"
},
"creditCard": {
"paymentAccountNumber": "4111111111111111",
"expirationDate": "1025",
"securityCode": null,
"networkToken": null
},
"ach": null,
"googlePay": null,
"applePay": null,
"merchantPaymentMethodRefId": "payment-method-ref-id_hgays-213-4rf4",
"billingFirstName": "Joe",
"billingLastName": "Doe",
"billingFullName": null
},
"paymentMethodAuthorizationId": null,
"paymentMethodId": null
}
'import requests
url = "https://api-sandbox.revolv3.com/api/Invoices/payment"
payload = {
"customerId": 1,
"firstName": None,
"lastName": None,
"merchantCustomerRefId": None,
"email": None,
"invoice": {
"merchantInvoiceRefId": "123456789",
"invoiceLineItems": [
{
"name": "LineItem1",
"description": "Line Item 1 Description",
"value": 10,
"valueType": "Standard"
},
{
"name": "LineItem2",
"description": "Line Item 2 Description",
"value": 20,
"valueType": "Standard"
},
{
"name": "LineItem3",
"description": "Line Item 3 Description",
"value": 30,
"valueType": "Standard"
}
]
},
"dynamicDescriptor": {
"subMerchantId": None,
"subMerchantName": "REV*revolv3",
"subMerchantPhone": "00442030513031",
"countryCode": None,
"city": None
},
"paymentMethod": {
"billingAddress": {
"addressId": None,
"addressLine1": "100 Main",
"addressLine2": None,
"city": "Santa Ana",
"state": "CA",
"postalCode": "91111",
"phoneNumber": None,
"email": None,
"country": "US"
},
"creditCard": {
"paymentAccountNumber": "4111111111111111",
"expirationDate": "1025",
"securityCode": None,
"networkToken": None
},
"ach": None,
"googlePay": None,
"applePay": None,
"merchantPaymentMethodRefId": "payment-method-ref-id_hgays-213-4rf4",
"billingFirstName": "Joe",
"billingLastName": "Doe",
"billingFullName": None
},
"paymentMethodAuthorizationId": None,
"paymentMethodId": None
}
headers = {
"x-revolv3-token": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-revolv3-token': '<api-key>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
customerId: 1,
firstName: null,
lastName: null,
merchantCustomerRefId: null,
email: null,
invoice: {
merchantInvoiceRefId: '123456789',
invoiceLineItems: [
{
name: 'LineItem1',
description: 'Line Item 1 Description',
value: 10,
valueType: 'Standard'
},
{
name: 'LineItem2',
description: 'Line Item 2 Description',
value: 20,
valueType: 'Standard'
},
{
name: 'LineItem3',
description: 'Line Item 3 Description',
value: 30,
valueType: 'Standard'
}
]
},
dynamicDescriptor: {
subMerchantId: null,
subMerchantName: 'REV*revolv3',
subMerchantPhone: '00442030513031',
countryCode: null,
city: null
},
paymentMethod: {
billingAddress: {
addressId: null,
addressLine1: '100 Main',
addressLine2: null,
city: 'Santa Ana',
state: 'CA',
postalCode: '91111',
phoneNumber: null,
email: null,
country: 'US'
},
creditCard: {
paymentAccountNumber: '4111111111111111',
expirationDate: '1025',
securityCode: null,
networkToken: null
},
ach: null,
googlePay: null,
applePay: null,
merchantPaymentMethodRefId: 'payment-method-ref-id_hgays-213-4rf4',
billingFirstName: 'Joe',
billingLastName: 'Doe',
billingFullName: null
},
paymentMethodAuthorizationId: null,
paymentMethodId: null
})
};
fetch('https://api-sandbox.revolv3.com/api/Invoices/payment', 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/Invoices/payment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customerId' => 1,
'firstName' => null,
'lastName' => null,
'merchantCustomerRefId' => null,
'email' => null,
'invoice' => [
'merchantInvoiceRefId' => '123456789',
'invoiceLineItems' => [
[
'name' => 'LineItem1',
'description' => 'Line Item 1 Description',
'value' => 10,
'valueType' => 'Standard'
],
[
'name' => 'LineItem2',
'description' => 'Line Item 2 Description',
'value' => 20,
'valueType' => 'Standard'
],
[
'name' => 'LineItem3',
'description' => 'Line Item 3 Description',
'value' => 30,
'valueType' => 'Standard'
]
]
],
'dynamicDescriptor' => [
'subMerchantId' => null,
'subMerchantName' => 'REV*revolv3',
'subMerchantPhone' => '00442030513031',
'countryCode' => null,
'city' => null
],
'paymentMethod' => [
'billingAddress' => [
'addressId' => null,
'addressLine1' => '100 Main',
'addressLine2' => null,
'city' => 'Santa Ana',
'state' => 'CA',
'postalCode' => '91111',
'phoneNumber' => null,
'email' => null,
'country' => 'US'
],
'creditCard' => [
'paymentAccountNumber' => '4111111111111111',
'expirationDate' => '1025',
'securityCode' => null,
'networkToken' => null
],
'ach' => null,
'googlePay' => null,
'applePay' => null,
'merchantPaymentMethodRefId' => 'payment-method-ref-id_hgays-213-4rf4',
'billingFirstName' => 'Joe',
'billingLastName' => 'Doe',
'billingFullName' => null
],
'paymentMethodAuthorizationId' => null,
'paymentMethodId' => 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/Invoices/payment"
payload := strings.NewReader("{\n \"customerId\": 1,\n \"firstName\": null,\n \"lastName\": null,\n \"merchantCustomerRefId\": null,\n \"email\": null,\n \"invoice\": {\n \"merchantInvoiceRefId\": \"123456789\",\n \"invoiceLineItems\": [\n {\n \"name\": \"LineItem1\",\n \"description\": \"Line Item 1 Description\",\n \"value\": 10,\n \"valueType\": \"Standard\"\n },\n {\n \"name\": \"LineItem2\",\n \"description\": \"Line Item 2 Description\",\n \"value\": 20,\n \"valueType\": \"Standard\"\n },\n {\n \"name\": \"LineItem3\",\n \"description\": \"Line Item 3 Description\",\n \"value\": 30,\n \"valueType\": \"Standard\"\n }\n ]\n },\n \"dynamicDescriptor\": {\n \"subMerchantId\": null,\n \"subMerchantName\": \"REV*revolv3\",\n \"subMerchantPhone\": \"00442030513031\",\n \"countryCode\": null,\n \"city\": null\n },\n \"paymentMethod\": {\n \"billingAddress\": {\n \"addressId\": null,\n \"addressLine1\": \"100 Main\",\n \"addressLine2\": null,\n \"city\": \"Santa Ana\",\n \"state\": \"CA\",\n \"postalCode\": \"91111\",\n \"phoneNumber\": null,\n \"email\": null,\n \"country\": \"US\"\n },\n \"creditCard\": {\n \"paymentAccountNumber\": \"4111111111111111\",\n \"expirationDate\": \"1025\",\n \"securityCode\": null,\n \"networkToken\": null\n },\n \"ach\": null,\n \"googlePay\": null,\n \"applePay\": null,\n \"merchantPaymentMethodRefId\": \"payment-method-ref-id_hgays-213-4rf4\",\n \"billingFirstName\": \"Joe\",\n \"billingLastName\": \"Doe\",\n \"billingFullName\": null\n },\n \"paymentMethodAuthorizationId\": null,\n \"paymentMethodId\": null\n}")
req, _ := http.NewRequest("POST", 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.post("https://api-sandbox.revolv3.com/api/Invoices/payment")
.header("x-revolv3-token", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"customerId\": 1,\n \"firstName\": null,\n \"lastName\": null,\n \"merchantCustomerRefId\": null,\n \"email\": null,\n \"invoice\": {\n \"merchantInvoiceRefId\": \"123456789\",\n \"invoiceLineItems\": [\n {\n \"name\": \"LineItem1\",\n \"description\": \"Line Item 1 Description\",\n \"value\": 10,\n \"valueType\": \"Standard\"\n },\n {\n \"name\": \"LineItem2\",\n \"description\": \"Line Item 2 Description\",\n \"value\": 20,\n \"valueType\": \"Standard\"\n },\n {\n \"name\": \"LineItem3\",\n \"description\": \"Line Item 3 Description\",\n \"value\": 30,\n \"valueType\": \"Standard\"\n }\n ]\n },\n \"dynamicDescriptor\": {\n \"subMerchantId\": null,\n \"subMerchantName\": \"REV*revolv3\",\n \"subMerchantPhone\": \"00442030513031\",\n \"countryCode\": null,\n \"city\": null\n },\n \"paymentMethod\": {\n \"billingAddress\": {\n \"addressId\": null,\n \"addressLine1\": \"100 Main\",\n \"addressLine2\": null,\n \"city\": \"Santa Ana\",\n \"state\": \"CA\",\n \"postalCode\": \"91111\",\n \"phoneNumber\": null,\n \"email\": null,\n \"country\": \"US\"\n },\n \"creditCard\": {\n \"paymentAccountNumber\": \"4111111111111111\",\n \"expirationDate\": \"1025\",\n \"securityCode\": null,\n \"networkToken\": null\n },\n \"ach\": null,\n \"googlePay\": null,\n \"applePay\": null,\n \"merchantPaymentMethodRefId\": \"payment-method-ref-id_hgays-213-4rf4\",\n \"billingFirstName\": \"Joe\",\n \"billingLastName\": \"Doe\",\n \"billingFullName\": null\n },\n \"paymentMethodAuthorizationId\": null,\n \"paymentMethodId\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.revolv3.com/api/Invoices/payment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-revolv3-token"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"customerId\": 1,\n \"firstName\": null,\n \"lastName\": null,\n \"merchantCustomerRefId\": null,\n \"email\": null,\n \"invoice\": {\n \"merchantInvoiceRefId\": \"123456789\",\n \"invoiceLineItems\": [\n {\n \"name\": \"LineItem1\",\n \"description\": \"Line Item 1 Description\",\n \"value\": 10,\n \"valueType\": \"Standard\"\n },\n {\n \"name\": \"LineItem2\",\n \"description\": \"Line Item 2 Description\",\n \"value\": 20,\n \"valueType\": \"Standard\"\n },\n {\n \"name\": \"LineItem3\",\n \"description\": \"Line Item 3 Description\",\n \"value\": 30,\n \"valueType\": \"Standard\"\n }\n ]\n },\n \"dynamicDescriptor\": {\n \"subMerchantId\": null,\n \"subMerchantName\": \"REV*revolv3\",\n \"subMerchantPhone\": \"00442030513031\",\n \"countryCode\": null,\n \"city\": null\n },\n \"paymentMethod\": {\n \"billingAddress\": {\n \"addressId\": null,\n \"addressLine1\": \"100 Main\",\n \"addressLine2\": null,\n \"city\": \"Santa Ana\",\n \"state\": \"CA\",\n \"postalCode\": \"91111\",\n \"phoneNumber\": null,\n \"email\": null,\n \"country\": \"US\"\n },\n \"creditCard\": {\n \"paymentAccountNumber\": \"4111111111111111\",\n \"expirationDate\": \"1025\",\n \"securityCode\": null,\n \"networkToken\": null\n },\n \"ach\": null,\n \"googlePay\": null,\n \"applePay\": null,\n \"merchantPaymentMethodRefId\": \"payment-method-ref-id_hgays-213-4rf4\",\n \"billingFirstName\": \"Joe\",\n \"billingLastName\": \"Doe\",\n \"billingFullName\": null\n },\n \"paymentMethodAuthorizationId\": null,\n \"paymentMethodId\": null\n}"
response = http.request(request)
puts response.read_body{
"customerId": 1,
"invoiceId": 1,
"merchantInvoiceRefId": "123456789",
"invoiceStatus": "Paid",
"invoiceAttemptStatus": "Success",
"message": "Approve",
"subtotal": 11.97,
"taxAmount": 1.2,
"total": 13.17,
"paymentMethodId": 1
}{
"message": "Unable to perform the request action with provided data."
}{
"message": "Attempted to perform an unauthorized operation."
}{
"message": "PaymentMethodAuthorizationId is being processed in another request."
}{
"message": "Unable to process this operation."
}Authorizations
Body
Show child attributes
Show child attributes
Show child attributes
Show child attributes
1 <= x <= 10000000001 <= x <= 10000000001 <= x <= 1000000000150150100Show child attributes
Show child attributes
Response
OK
1 <= x <= 10000000001 <= x <= 10000000001001001005000 <= x <= 100000000 <= x <= 100000000 <= x <= 100000001 <= x <= 10000000001 <= x <= 1000000000100
