Charge a Credit Card
curl --request POST \
--url https://app.dimepayments.com/api/transaction/charge-card \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"data": []
}'import requests
url = "https://app.dimepayments.com/api/transaction/charge-card"
payload = { "data": [] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({data: []})
};
fetch('https://app.dimepayments.com/api/transaction/charge-card', 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://app.dimepayments.com/api/transaction/charge-card",
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([
'data' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://app.dimepayments.com/api/transaction/charge-card"
payload := strings.NewReader("{\n \"data\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/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://app.dimepayments.com/api/transaction/charge-card")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dimepayments.com/api/transaction/charge-card")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": []\n}"
response = http.request(request)
puts response.read_body{
"data": {
"transaction_type": "Credit Card",
"transaction_status": "Success",
"transaction_status_description": "Transaction Successful",
"transaction_number": "1234567890",
"transaction_date": "2020-01-01",
"fund_date": "2020-01-01",
"settle_date": "2020-01-01",
"amount": "100.00",
"description": "a memo concerning this transaction",
"status_code": "00",
"status_text": "APPROVAL",
"email": "email@email.com",
"phone": "+17701234567",
"customer_uuid": "66f1c230-1337-5g59-b43c-1bcb83adfaaa",
"multi_use_token": "abcdefg123456790",
"pending": true,
"transaction_info_id": "1234567890",
"parent_transaction_info_id": "1234567890",
"billing_address": {
"first_name": "John",
"last_name": "Doe",
"addr1": "123 Main St",
"addr2": "Suite 100",
"city": "New York",
"state": "NY"
},
"shipping_address": {
"addr1": "12 Street Ave",
"addr2": "Suite 123",
"city": "Boulder",
"state": "CO",
"zip": "80302"
}
}
}{
"errors": {
"sid": [
"The sid is required."
]
}
}{
"message": "Permission Denied."
}Transaction management
Charge a Credit Card
This endpoint allows you to charge a credit card using the PAN Data or a Token. This endpoint will process the charge and return a token representing the card that can be used for transactions as well as the transactionId and the customerUUID if requested. If you pass a customer UUID or a customer phone number, then a customer record will be created or retrieved if it already exists, also making the customer UUID available for the purpose of associating charges to a customer. You must be PCI Compliant (have an AoC on file with Dime Payments) to process PAN Data. A token can optionally be provided to process charges without requiring PCI compliance as no PAN data is being sent.
POST
/
api
/
transaction
/
charge-card
Charge a Credit Card
curl --request POST \
--url https://app.dimepayments.com/api/transaction/charge-card \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"data": []
}'import requests
url = "https://app.dimepayments.com/api/transaction/charge-card"
payload = { "data": [] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({data: []})
};
fetch('https://app.dimepayments.com/api/transaction/charge-card', 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://app.dimepayments.com/api/transaction/charge-card",
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([
'data' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://app.dimepayments.com/api/transaction/charge-card"
payload := strings.NewReader("{\n \"data\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/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://app.dimepayments.com/api/transaction/charge-card")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dimepayments.com/api/transaction/charge-card")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": []\n}"
response = http.request(request)
puts response.read_body{
"data": {
"transaction_type": "Credit Card",
"transaction_status": "Success",
"transaction_status_description": "Transaction Successful",
"transaction_number": "1234567890",
"transaction_date": "2020-01-01",
"fund_date": "2020-01-01",
"settle_date": "2020-01-01",
"amount": "100.00",
"description": "a memo concerning this transaction",
"status_code": "00",
"status_text": "APPROVAL",
"email": "email@email.com",
"phone": "+17701234567",
"customer_uuid": "66f1c230-1337-5g59-b43c-1bcb83adfaaa",
"multi_use_token": "abcdefg123456790",
"pending": true,
"transaction_info_id": "1234567890",
"parent_transaction_info_id": "1234567890",
"billing_address": {
"first_name": "John",
"last_name": "Doe",
"addr1": "123 Main St",
"addr2": "Suite 100",
"city": "New York",
"state": "NY"
},
"shipping_address": {
"addr1": "12 Street Ave",
"addr2": "Suite 123",
"city": "Boulder",
"state": "CO",
"zip": "80302"
}
}
}{
"errors": {
"sid": [
"The sid is required."
]
}
}{
"message": "Permission Denied."
}⌘I

