Prerequisites: Authentication
A pricing intent is a template of fees that you apply to processing accounts when you board merchants. You can apply the same pricing intent to all processing accounts that you create or create multiple pricing intents to apply to different processing accounts. A pricing intent can include the following fee types:
Base fees: For monthly maintenance, chargebacks, and early contract termination. All pricing intents must include base fees.
Processor fees: For card payments and
Automated Clearing House (ACH)
payments. Processor fees also include the pricing model that you offer to the merchant, for example,
RewardPay
.
Gateway fees: For using our payment gateway.
Integration steps
- Create a pricing intent.
Before you begin
Authenticate your requests before making API calls. If your request fails, see Errors.
Create a pricing intent
Send a POST request to our Pricing Intents endpoint:
| Environment | URL |
|---|---|
| Test | https://api.uat.payroc.com/v1/pricing-intents |
| Production | https://api.payroc.com/v1/pricing-intents |
Request parameters
To create the body of your request, use the following parameters:
Schema (request.body)
Request body schema for POST /pricing-intents
Example request
Request
POST https://api.payroc.com/v1/pricing-intents
Created pricing intent
curl -X POST https://api.payroc.com/v1/pricing-intents \
-H "Idempotency-Key: 8e03978e-40d5-43e8-bc93-6894a57f9324" \
-H "Authorization: Bearer <token>"
Created pricing intent
import requests
url = "https://api.payroc.com/v1/pricing-intents"
headers = {
"Idempotency-Key": "8e03978e-40d5-43e8-bc93-6894a57f9324",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.json())
Created pricing intent
const url = 'https://api.payroc.com/v1/pricing-intents';
const options = {
method: 'POST',
headers: {
'Idempotency-Key': '8e03978e-40d5-43e8-bc93-6894a57f9324',
Authorization: 'Bearer <token>'
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
Created pricing intent
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.payroc.com/v1/pricing-intents"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Idempotency-Key", "8e03978e-40d5-43e8-bc93-6894a57f9324")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
Created pricing intent
require 'uri'
require 'net/http'
url = URI("https://api.payroc.com/v1/pricing-intents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '8e03978e-40d5-43e8-bc93-6894a57f9324'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body
Created pricing intent
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
HttpResponse<String> response = Unirest.post("https://api.payroc.com/v1/pricing-intents")
.header("Idempotency-Key", "8e03978e-40d5-43e8-bc93-6894a57f9324")
.header("Authorization", "Bearer <token>")
.asString();
Created pricing intent
<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://api.payroc.com/v1/pricing-intents', [
'headers' => [
'Authorization' => 'Bearer <token>',
'Idempotency-Key' => '8e03978e-40d5-43e8-bc93-6894a57f9324',
],
]);
echo $response->getBody();
Created pricing intent
using RestSharp;
var client = new RestClient("https://api.payroc.com/v1/pricing-intents");
var request = new RestRequest(Method.POST);
request.AddHeader("Idempotency-Key", "8e03978e-40d5-43e8-bc93-6894a57f9324");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
Created pricing intent
import Foundation
let headers = [
"Idempotency-Key": "8e03978e-40d5-43e8-bc93-6894a57f9324",
"Authorization": "Bearer <token>"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://api.payroc.com/v1/pricing-intents")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
Response fields
If your request is successful, our gateway creates the pricing intent. The response contains the following fields:
Schema (response.body)
Response body schema for POST /pricing-intents
Example response
Response (201)
{
"base": {
"addressVerification": 5,
"annualFee": {
"amount": 100,
"billInMonth": "june"
},
"batch": 1000,
"chargeback": 2500,
"earlyTermination": 57500,
"maintenance": 500,
"minimum": 100,
"pciNonCompliance": 4995,
"platinumSecurity": {
"amount": 1295,
"billingFrequency": "monthly"
},
"regulatoryAssistanceProgram": 15,
"retrieval": 1500,
"voiceAuthorization": 95
},
"country": "US",
"createdDate": "2024-07-02T09:00:00Z",
"gateway": {
"fees": {
"monthly": 2000,
"perDeviceMonthly": 10,
"perTransaction": 2000,
"setup": 5000
}
},
"id": "5",
"key": "Your-Unique-Identifier",
"lastUpdatedDate": "2024-07-02T09:00:00Z",
"metadata": {
"yourCustomField": "abc123"
},
"processor": {
"ach": {
"fees": {
"accountVerification": 100,
"batch": 1000,
"discountRateAbove10000": 10,
"discountRateUnder10000": 5.25,
"monthlyMinimum": 20000,
"returns": 400,
"statement": 800,
"transaction": 50,
"unauthorizedReturn": 1999
}
},
"card": {
"fees": {
"amex": {
"transaction": 5,
"type": "optBlue",
"volume": 1.25
},
"electronicBenefitsTransfer": {
"transaction": 10
},
"mastercardVisaDiscover": {
"transaction": 5,
"volume": 1.25
},
"pinDebit": {
"additionalDiscount": 1.25,
"monthlyAccess": 1200,
"transaction": 10
},
"specialityCards": {
"transaction": 10
}
},
"planType": "interchangePlus"
}
},
"services": [
{
"enabled": true,
"name": "hardwareAdvantagePlan"
}
],
"status": "pendingReview",
"version": "5.2"
}