API endpoints for processing payments in the Dime payment system.
API endpoints for processing payments in the Dime payment system.
A signed JWT containing the payment input details. Fields to include in the JWT payload:
currency
: Currency of the payment.id
: Unique payment identifier.subtotal
: Subtotal of the payment.total
: Total amount of the payment.email
: Customer's email.tax
: Tax applied to the payment.ipAddress
: IP address of the customer.fulfillmentStatus
: Order's fulfillment status.orderComments
: Any comments about the payment.discount
: Discount applied to the payment.items
: Array of items in the payment.billingPerson
: Billing address details.shippingPerson
: Shipping address details.referenceTransactionId
: Reference to a transaction ID.taxes
: Array of tax details.Example of unsigned payload:
{
"currency": "USD",
"id": "XJ12H",
"subtotal": 1076.64,
"total": 2014.97,
"email": "mscott@gmail.com",
"tax": 488.48,
"ipAddress": "195.151.247.241",
"fulfillmentStatus": "AWAITING_PROCESSING",
"orderComments": "555",
"discount": 4,
"items": [
{
"id": "xxxx-xxxx-xxxx-xxxx",
"price": 1060,
"sku": "ABCA-IAC",
"quantity": 1,
"shortDescription": "",
"name": "iMac",
"imageUrl": "https://example.com/images/xxxxxx.jpg",
"selectedOptions": [
{
"name": "Color",
"value": "red",
"type": "CHOICE"
}
]
}
],
"billingPerson": {
"name": "Michael Scott",
"companyName": "",
"street": "555 Lackawanna Ave",
"city": "Scranton",
"countryCode": "US",
"countryName": "United States",
"postalCode": "18508",
"stateOrProvinceCode": "PA",
"stateOrProvinceName": "Pennsylvania",
"phone": ""
},
"shippingPerson": {
"name": "Michael Scott",
"companyName": "",
"street": "555 Lackawanna Ave",
"city": "Scranton",
"countryCode": "US",
"countryName": "United States",
"postalCode": "18508",
"stateOrProvinceCode": "PA",
"stateOrProvinceName": "Pennsylvania",
"phone": ""
},
"referenceTransactionId": "transaction_65306446",
"taxes": [
{
"name": "New Tax 2",
"value": 12,
"total": 57.1
}
]
}
Example of signing the payload:
const jwt = require('jsonwebtoken');
const payload = { /* fields above */ };
const signedData = jwt.sign(payload, 'your_secret_key');
Final request payload:
{
"lang": "en",
"data": "<signed_jwt_token>"
}
curl -i -X POST \
https://docs.dimepay.net/_mock/openapi/payments/hosted-page \
-H 'Content-Type: application/json' \
-H 'client_key: YOUR_API_KEY_HERE' \
-d '{
"lang": "en",
"data": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}'
{ "order_url": "https://sandbox.dimepay.app/e-order/abcd1234" }
A signed JWT containing the payment input details. Fields to include in the JWT payload:
currency
: Currency of the payment.id
: Unique payment identifier.subtotal
: Subtotal of the payment.total
: Total amount of the payment.email
: Customer's email.tax
: Tax applied to the payment.ipAddress
: IP address of the customer.fulfillmentStatus
: Order's fulfillment status.orderComments
: Any comments about the payment.discount
: Discount applied to the payment.items
: Array of items in the payment.billingPerson
: Billing address details.shippingPerson
: Shipping address details.referenceTransactionId
: Reference to a transaction ID.taxes
: Array of tax details.paymentParams
: Details of the payment source. Fields:source
: Source of the payment (e.g., 'TOKEN').token
: Unique token representing the payment method.Example of unsigned payload:
{
"currency": "USD",
"id": "XJ12H",
"subtotal": 1076.64,
"total": 2014.97,
"email": "mscott@gmail.com",
"tax": 488.48,
"ipAddress": "195.151.247.241",
"fulfillmentStatus": "AWAITING_PROCESSING",
"orderComments": "555",
"discount": 4,
"items": [
{
"id": "xxxx-xxxx-xxxx-xxxx",
"price": 1060,
"sku": "ABCA-IAC",
"quantity": 1,
"shortDescription": "",
"name": "iMac",
"imageUrl": "https://example.com/images/xxxxxx.jpg",
"selectedOptions": [
{
"name": "Color",
"value": "red",
"type": "CHOICE"
}
]
}
],
"billingPerson": {
"name": "Michael Scott",
"companyName": "",
"street": "555 Lackawanna Ave",
"city": "Scranton",
"countryCode": "US",
"countryName": "United States",
"postalCode": "18508",
"stateOrProvinceCode": "PA",
"stateOrProvinceName": "Pennsylvania",
"phone": ""
},
"shippingPerson": {
"name": "Michael Scott",
"companyName": "",
"street": "555 Lackawanna Ave",
"city": "Scranton",
"countryCode": "US",
"countryName": "United States",
"postalCode": "18508",
"stateOrProvinceCode": "PA",
"stateOrProvinceName": "Pennsylvania",
"phone": ""
},
"referenceTransactionId": "transaction_65306446",
"taxes": [
{
"name": "New Tax 2",
"value": 12,
"total": 57.1
}
],
"paymentParams": {
"source": "TOKEN",
"token": "card_PX5n06I5XRue3QX"
}
}
Example of signing the payload:
const jwt = require('jsonwebtoken');
const payload = { /* fields above */ };
const signedData = jwt.sign(payload, 'your_secret_key');
Final request payload:
{
"lang": "en",
"data": "<signed_jwt_token>"
}
curl -i -X POST \
https://docs.dimepay.net/_mock/openapi/payments/auth \
-H 'Content-Type: application/json' \
-H 'client_key: YOUR_API_KEY_HERE' \
-d '{
"lang": "en",
"data": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}'
Payment authorized successfully
Primary key, unique ID for the payment
Final amount after adjustments, if applicable
Current status of the payment
Source of the payment (e.g., CARD, WALLET, POINTS)
UUID of the source account, if applicable
UUID of the entity associated with the payment
Display-friendly ID of the entity associated with the payment
Type of entity associated with the payment
UUID of the customer associated with the payment, if applicable
Customer details in JSON format
UUID of the brand associated with the payment, if applicable
UUID of the payment method used, if available
Details of the payment source in JSON format
{ "id": "550e8400-e29b-41d4-a716-446655440000", "amount": 1200.5, "final_amount": 1180.5, "consumer_fee": 20, "currency": "USD", "description": "Payment for Order #12345", "status": "COMPLETE", "source": "CARD", "source_account": "7db04ed8-cffc-4577-8b50-d3e4c95692aa", "external_transaction_id": "EXT123456789", "entity_id": "230e8400-e29b-41d4-a716-446655440999", "entity_display_id": "ORD123456", "entity_type": "ORDER", "customer_id": "8ec56a2e-2c9e-43a7-8e89-202a2b9497a3", "customer": { "name": "John Doe", "email": "johndoe@example.com", "phone": "+1234567890" }, "brand_id": "6ff8a7e2-4179-4d3e-9129-920ecb56c412", "payment_method_id": "4e8ff3b2-35f7-4e87-8a20-1cde38f4592c", "refunded": false, "settled": true, "source_details": { "card_number": "**** **** **** 4242", "card_brand": "Visa", "card_expiry": "12/25" }, "error_code": "ERR001", "error_message": "Insufficient funds" }
A signed JWT containing the payment input details. Fields to include in the JWT payload:
currency
: Currency of the payment.id
: Unique payment identifier.subtotal
: Subtotal of the payment.total
: Total amount of the payment.email
: Customer's email.tax
: Tax applied to the payment.ipAddress
: IP address of the customer.fulfillmentStatus
: Order's fulfillment status.orderComments
: Any comments about the payment.discount
: Discount applied to the payment.items
: Array of items in the payment.billingPerson
: Billing address details.shippingPerson
: Shipping address details.referenceTransactionId
: Reference to a transaction ID.taxes
: Array of tax details.paymentParams
: Details of the payment source. Fields:source
: Source of the payment (e.g., 'TOKEN').token
: Unique token representing the payment method.Example of unsigned payload:
{
"currency": "USD",
"id": "XJ12H",
"subtotal": 1076.64,
"total": 2014.97,
"email": "mscott@gmail.com",
"tax": 488.48,
"ipAddress": "195.151.247.241",
"fulfillmentStatus": "AWAITING_PROCESSING",
"orderComments": "555",
"discount": 4,
"items": [
{
"id": "xxxx-xxxx-xxxx-xxxx",
"price": 1060,
"sku": "ABCA-IAC",
"quantity": 1,
"shortDescription": "",
"name": "iMac",
"imageUrl": "https://example.com/images/xxxxxx.jpg",
"selectedOptions": [
{
"name": "Color",
"value": "red",
"type": "CHOICE"
}
]
}
],
"billingPerson": {
"name": "Michael Scott",
"companyName": "",
"street": "555 Lackawanna Ave",
"city": "Scranton",
"countryCode": "US",
"countryName": "United States",
"postalCode": "18508",
"stateOrProvinceCode": "PA",
"stateOrProvinceName": "Pennsylvania",
"phone": ""
},
"shippingPerson": {
"name": "Michael Scott",
"companyName": "",
"street": "555 Lackawanna Ave",
"city": "Scranton",
"countryCode": "US",
"countryName": "United States",
"postalCode": "18508",
"stateOrProvinceCode": "PA",
"stateOrProvinceName": "Pennsylvania",
"phone": ""
},
"referenceTransactionId": "transaction_65306446",
"taxes": [
{
"name": "New Tax 2",
"value": 12,
"total": 57.1
}
],
"paymentParams": {
"source": "TOKEN",
"token": "card_PX5n06I5XRue3QX"
}
}
Example of signing the payload:
const jwt = require('jsonwebtoken');
const payload = { /* fields above */ };
const signedData = jwt.sign(payload, 'your_secret_key');
Final request payload:
{
"lang": "en",
"data": "<signed_jwt_token>"
}
curl -i -X POST \
https://docs.dimepay.net/_mock/openapi/payments/sale \
-H 'Content-Type: application/json' \
-H 'client_key: YOUR_API_KEY_HERE' \
-d '{
"lang": "en",
"data": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}'
Payment sale processed successfully
Primary key, unique ID for the payment
Final amount after adjustments, if applicable
Current status of the payment
Source of the payment (e.g., CARD, WALLET, POINTS)
UUID of the source account, if applicable
UUID of the entity associated with the payment
Display-friendly ID of the entity associated with the payment
Type of entity associated with the payment
UUID of the customer associated with the payment, if applicable
Customer details in JSON format
UUID of the brand associated with the payment, if applicable
UUID of the payment method used, if available
Details of the payment source in JSON format
{ "id": "550e8400-e29b-41d4-a716-446655440000", "amount": 1200.5, "final_amount": 1180.5, "consumer_fee": 20, "currency": "USD", "description": "Payment for Order #12345", "status": "COMPLETE", "source": "CARD", "source_account": "7db04ed8-cffc-4577-8b50-d3e4c95692aa", "external_transaction_id": "EXT123456789", "entity_id": "230e8400-e29b-41d4-a716-446655440999", "entity_display_id": "ORD123456", "entity_type": "ORDER", "customer_id": "8ec56a2e-2c9e-43a7-8e89-202a2b9497a3", "customer": { "name": "John Doe", "email": "johndoe@example.com", "phone": "+1234567890" }, "brand_id": "6ff8a7e2-4179-4d3e-9129-920ecb56c412", "payment_method_id": "4e8ff3b2-35f7-4e87-8a20-1cde38f4592c", "refunded": false, "settled": true, "source_details": { "card_number": "**** **** **** 4242", "card_brand": "Visa", "card_expiry": "12/25" }, "error_code": "ERR001", "error_message": "Insufficient funds" }
A signed JWT containing the transaction input details. Fields to include in the JWT payload:
transaction_id
: Unique identifier for the transaction.Example of unsigned payload:
{
"transaction_id": "f45bb457-4eb5-40d3-b8df-8915180edfca"
}
Example of signing the payload:
const jwt = require('jsonwebtoken');
const payload = {
transaction_id: "f45bb457-4eb5-40d3-b8df-8915180edfca"
};
const signedData = jwt.sign(payload, 'your_secret_key');
Final request payload:
{
"lang": "en",
"data": "<signed_jwt_token>"
}
curl -i -X PUT \
https://docs.dimepay.net/_mock/openapi/payments/capture \
-H 'Content-Type: application/json' \
-H 'client_key: YOUR_API_KEY_HERE' \
-d '{
"lang": "en",
"data": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}'
Payment captured successfully
Primary key, unique ID for the payment
Final amount after adjustments, if applicable
Current status of the payment
Source of the payment (e.g., CARD, WALLET, POINTS)
UUID of the source account, if applicable
UUID of the entity associated with the payment
Display-friendly ID of the entity associated with the payment
Type of entity associated with the payment
UUID of the customer associated with the payment, if applicable
Customer details in JSON format
UUID of the brand associated with the payment, if applicable
UUID of the payment method used, if available
Details of the payment source in JSON format
{ "id": "550e8400-e29b-41d4-a716-446655440000", "amount": 1200.5, "final_amount": 1180.5, "consumer_fee": 20, "currency": "USD", "description": "Payment for Order #12345", "status": "COMPLETE", "source": "CARD", "source_account": "7db04ed8-cffc-4577-8b50-d3e4c95692aa", "external_transaction_id": "EXT123456789", "entity_id": "230e8400-e29b-41d4-a716-446655440999", "entity_display_id": "ORD123456", "entity_type": "ORDER", "customer_id": "8ec56a2e-2c9e-43a7-8e89-202a2b9497a3", "customer": { "name": "John Doe", "email": "johndoe@example.com", "phone": "+1234567890" }, "brand_id": "6ff8a7e2-4179-4d3e-9129-920ecb56c412", "payment_method_id": "4e8ff3b2-35f7-4e87-8a20-1cde38f4592c", "refunded": false, "settled": true, "source_details": { "card_number": "**** **** **** 4242", "card_brand": "Visa", "card_expiry": "12/25" }, "error_code": "ERR001", "error_message": "Insufficient funds" }
A signed JWT containing the transaction input details. Fields to include in the JWT payload:
transaction_id
: Unique identifier for the transaction.Example of unsigned payload:
{
"transaction_id": "f45bb457-4eb5-40d3-b8df-8915180edfca"
}
Example of signing the payload:
const jwt = require('jsonwebtoken');
const payload = {
transaction_id: "f45bb457-4eb5-40d3-b8df-8915180edfca"
};
const signedData = jwt.sign(payload, 'your_secret_key');
Final request payload:
{
"lang": "en",
"data": "<signed_jwt_token>"
}
curl -i -X PUT \
https://docs.dimepay.net/_mock/openapi/payments/void \
-H 'Content-Type: application/json' \
-H 'client_key: YOUR_API_KEY_HERE' \
-d '{
"lang": "en",
"data": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}'
Payment voided successfully
Primary key, unique ID for the payment
Final amount after adjustments, if applicable
Current status of the payment
Source of the payment (e.g., CARD, WALLET, POINTS)
UUID of the source account, if applicable
UUID of the entity associated with the payment
Display-friendly ID of the entity associated with the payment
Type of entity associated with the payment
UUID of the customer associated with the payment, if applicable
Customer details in JSON format
UUID of the brand associated with the payment, if applicable
UUID of the payment method used, if available
Details of the payment source in JSON format
{ "id": "550e8400-e29b-41d4-a716-446655440000", "amount": 1200.5, "final_amount": 1180.5, "consumer_fee": 20, "currency": "USD", "description": "Payment for Order #12345", "status": "COMPLETE", "source": "CARD", "source_account": "7db04ed8-cffc-4577-8b50-d3e4c95692aa", "external_transaction_id": "EXT123456789", "entity_id": "230e8400-e29b-41d4-a716-446655440999", "entity_display_id": "ORD123456", "entity_type": "ORDER", "customer_id": "8ec56a2e-2c9e-43a7-8e89-202a2b9497a3", "customer": { "name": "John Doe", "email": "johndoe@example.com", "phone": "+1234567890" }, "brand_id": "6ff8a7e2-4179-4d3e-9129-920ecb56c412", "payment_method_id": "4e8ff3b2-35f7-4e87-8a20-1cde38f4592c", "refunded": false, "settled": true, "source_details": { "card_number": "**** **** **** 4242", "card_brand": "Visa", "card_expiry": "12/25" }, "error_code": "ERR001", "error_message": "Insufficient funds" }
A signed JWT containing the transaction input details. Fields to include in the JWT payload:
transaction_id
: Unique identifier for the transaction.Example of unsigned payload:
{
"transaction_id": "f45bb457-4eb5-40d3-b8df-8915180edfca"
}
Example of signing the payload:
const jwt = require('jsonwebtoken');
const payload = {
transaction_id: "f45bb457-4eb5-40d3-b8df-8915180edfca"
};
const signedData = jwt.sign(payload, 'your_secret_key');
Final request payload:
{
"lang": "en",
"data": "<signed_jwt_token>"
}
curl -i -X PUT \
https://docs.dimepay.net/_mock/openapi/payments/refund \
-H 'Content-Type: application/json' \
-H 'client_key: YOUR_API_KEY_HERE' \
-d '{
"lang": "en",
"data": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}'
Payment refunded successfully
Primary key, unique ID for the payment
Final amount after adjustments, if applicable
Current status of the payment
Source of the payment (e.g., CARD, WALLET, POINTS)
UUID of the source account, if applicable
UUID of the entity associated with the payment
Display-friendly ID of the entity associated with the payment
Type of entity associated with the payment
UUID of the customer associated with the payment, if applicable
Customer details in JSON format
UUID of the brand associated with the payment, if applicable
UUID of the payment method used, if available
Details of the payment source in JSON format
{ "id": "550e8400-e29b-41d4-a716-446655440000", "amount": 1200.5, "final_amount": 1180.5, "consumer_fee": 20, "currency": "USD", "description": "Payment for Order #12345", "status": "COMPLETE", "source": "CARD", "source_account": "7db04ed8-cffc-4577-8b50-d3e4c95692aa", "external_transaction_id": "EXT123456789", "entity_id": "230e8400-e29b-41d4-a716-446655440999", "entity_display_id": "ORD123456", "entity_type": "ORDER", "customer_id": "8ec56a2e-2c9e-43a7-8e89-202a2b9497a3", "customer": { "name": "John Doe", "email": "johndoe@example.com", "phone": "+1234567890" }, "brand_id": "6ff8a7e2-4179-4d3e-9129-920ecb56c412", "payment_method_id": "4e8ff3b2-35f7-4e87-8a20-1cde38f4592c", "refunded": false, "settled": true, "source_details": { "card_number": "**** **** **** 4242", "card_brand": "Visa", "card_expiry": "12/25" }, "error_code": "ERR001", "error_message": "Insufficient funds" }