Skip to main content
POST
/
api
/
Subscriptions
/
{subscriptionId}
/
payment
Create One Time Payment
curl --request POST \
  --url https://api-sandbox.revolv3.com/api/Subscriptions/{subscriptionId}/payment \
  --header 'Content-Type: application/json-patch+json' \
  --header 'x-revolv3-token: <api-key>' \
  --data '
{
  "merchantInvoiceRefId": "06a30ccd-ed68-44d1-bc46-f48681b6d095",
  "invoiceLineItems": [
    {
      "name": "Invoice Line Item 1",
      "description": null,
      "value": 10.99,
      "valueType": "Standard"
    },
    {
      "name": "Invoice Line Item 2",
      "description": null,
      "value": 11.99,
      "valueType": "Standard"
    },
    {
      "name": "Invoice Line Item 3",
      "description": null,
      "value": 12.99,
      "valueType": "Standard"
    }
  ]
}
'
import requests

url = "https://api-sandbox.revolv3.com/api/Subscriptions/{subscriptionId}/payment"

payload = {
"merchantInvoiceRefId": "06a30ccd-ed68-44d1-bc46-f48681b6d095",
"invoiceLineItems": [
{
"name": "Invoice Line Item 1",
"description": None,
"value": 10.99,
"valueType": "Standard"
},
{
"name": "Invoice Line Item 2",
"description": None,
"value": 11.99,
"valueType": "Standard"
},
{
"name": "Invoice Line Item 3",
"description": None,
"value": 12.99,
"valueType": "Standard"
}
]
}
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({
merchantInvoiceRefId: '06a30ccd-ed68-44d1-bc46-f48681b6d095',
invoiceLineItems: [
{
name: 'Invoice Line Item 1',
description: null,
value: 10.99,
valueType: 'Standard'
},
{
name: 'Invoice Line Item 2',
description: null,
value: 11.99,
valueType: 'Standard'
},
{
name: 'Invoice Line Item 3',
description: null,
value: 12.99,
valueType: 'Standard'
}
]
})
};

fetch('https://api-sandbox.revolv3.com/api/Subscriptions/{subscriptionId}/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/Subscriptions/{subscriptionId}/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([
'merchantInvoiceRefId' => '06a30ccd-ed68-44d1-bc46-f48681b6d095',
'invoiceLineItems' => [
[
'name' => 'Invoice Line Item 1',
'description' => null,
'value' => 10.99,
'valueType' => 'Standard'
],
[
'name' => 'Invoice Line Item 2',
'description' => null,
'value' => 11.99,
'valueType' => 'Standard'
],
[
'name' => 'Invoice Line Item 3',
'description' => null,
'value' => 12.99,
'valueType' => 'Standard'
]
]
]),
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/Subscriptions/{subscriptionId}/payment"

payload := strings.NewReader("{\n \"merchantInvoiceRefId\": \"06a30ccd-ed68-44d1-bc46-f48681b6d095\",\n \"invoiceLineItems\": [\n {\n \"name\": \"Invoice Line Item 1\",\n \"description\": null,\n \"value\": 10.99,\n \"valueType\": \"Standard\"\n },\n {\n \"name\": \"Invoice Line Item 2\",\n \"description\": null,\n \"value\": 11.99,\n \"valueType\": \"Standard\"\n },\n {\n \"name\": \"Invoice Line Item 3\",\n \"description\": null,\n \"value\": 12.99,\n \"valueType\": \"Standard\"\n }\n ]\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/Subscriptions/{subscriptionId}/payment")
.header("x-revolv3-token", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"merchantInvoiceRefId\": \"06a30ccd-ed68-44d1-bc46-f48681b6d095\",\n \"invoiceLineItems\": [\n {\n \"name\": \"Invoice Line Item 1\",\n \"description\": null,\n \"value\": 10.99,\n \"valueType\": \"Standard\"\n },\n {\n \"name\": \"Invoice Line Item 2\",\n \"description\": null,\n \"value\": 11.99,\n \"valueType\": \"Standard\"\n },\n {\n \"name\": \"Invoice Line Item 3\",\n \"description\": null,\n \"value\": 12.99,\n \"valueType\": \"Standard\"\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.revolv3.com/api/Subscriptions/{subscriptionId}/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 \"merchantInvoiceRefId\": \"06a30ccd-ed68-44d1-bc46-f48681b6d095\",\n \"invoiceLineItems\": [\n {\n \"name\": \"Invoice Line Item 1\",\n \"description\": null,\n \"value\": 10.99,\n \"valueType\": \"Standard\"\n },\n {\n \"name\": \"Invoice Line Item 2\",\n \"description\": null,\n \"value\": 11.99,\n \"valueType\": \"Standard\"\n },\n {\n \"name\": \"Invoice Line Item 3\",\n \"description\": null,\n \"value\": 12.99,\n \"valueType\": \"Standard\"\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "invoiceId": 1,
  "merchantInvoiceRefId": null,
  "invoiceStatus": 0,
  "invoiceAttemptStatus": "Success",
  "message": null,
  "subtotal": 10.99,
  "taxAmount": 0.98,
  "total": 11.97,
  "paymentMethodTypeId": 0,
  "processorRawResponse": null,
  "responseCode": 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

x-revolv3-token
string
header
required

Path Parameters

subscriptionId
integer<int64>
required
Required range: 1 <= x <= 1000000000

Body

invoiceLineItems
object[]
required
Required array length: 1 - 50 elements
merchantInvoiceRefId
string | null
Maximum string length: 100

Response

OK

invoiceId
integer<int64>
Required range: 1 <= x <= 1000000000
merchantInvoiceRefId
string | null
Maximum string length: 100
invoiceStatus
enum<string>
Available options:
Paid,
Void,
Pending,
Recycle,
Noncollectable,
Failed,
Refund,
MerchantPaid,
MerchantCancelled,
OneTimePaymentPending,
PartialRefund,
BatchPending,
CapturePending,
RefundPending,
RefundDeclined,
RefundFailed,
RetryPending,
RecurringPending,
MultiCardsPending,
RefundVoid,
PartialRefundVoid
invoiceAttemptStatus
string | null
Maximum string length: 100
message
string | null
Maximum string length: 500
subtotal
number<double>
Required range: 0 <= x <= 10000000
taxAmount
number<double>
Required range: 0 <= x <= 10000000
total
number<double>
Required range: 0 <= x <= 10000000
paymentMethodTypeId
integer<int32>
Required range: 1 <= x <= 1000000000
processorRawResponse
string | null
Maximum string length: 10000
transactionId
string | null
Maximum string length: 100
billInvoiceResponse
object
responseCode
string | null
Maximum string length: 10