This API supports functionalities for managing orders within the Dime payment system.
This API supports functionalities for managing orders within the Dime payment system.
A signed JWT containing the order input details. Fields to include in the JWT payload:
currency
: Currency of the order.id
: Unique order identifier.subtotal
: Subtotal of the order.total
: Total amount of the order.email
: Customer's email.tax
: Tax applied to the order.ipAddress
: IP address of the customer.fulfillmentStatus
: Order's fulfillment status.orderComments
: Any comments about the order.discount
: Discount applied to the order.items
: Array of items in the order.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-order/orders \
-H 'Content-Type: application/json' \
-H 'client_key: YOUR_API_KEY_HERE' \
-d '{
"lang": "en",
"data": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXJyZW5jeSI6IlVTRCIsImlkIjoiWEoxMkgifQ.nR2Gh18rL9E7E"
}'
{ "order_url": "https://sandbox.dimepay.app/e-order/abcd1234" }
A signed JWT containing the order token. Fields to include in the JWT payload:
token
: The order's unique token.Example of unsigned payload: "order_123abc456xyz" Example of signing the payload:
const jwt = require('jsonwebtoken');
const payload = 'order_123abc456xyz';
const signedData = jwt.sign(payload, 'your_secret_key');
Final request URL: /orders/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbiI6ImNhcmRfMTIzYWJjNDU2eHl6In0.7W3ISpqFnINqpm6QX-8oOn-d5M6ixJHiTTk6W0U_e94
curl -i -X GET \
https://docs.dimepay.net/_mock/openapi-order/orders/https://sandbox.api.dimepay.app/orders/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbiI6ImNhcmRfMTIzYWJjNDU2eHl6In0.7W3ISpqFnINqpm6QX-8oOn-d5M6ixJHiTTk6W0U_e94 \
-H 'client_key: YOUR_API_KEY_HERE'
Order retrieved successfully
Customer ID associated with the order
Customer details as JSON
Current status of the order
Products in the order
{ "id": "550e8400-e29b-41d4-a716-446655440000", "token": "order_123abc456xyz", "customer_id": "7db04ed8-cffc-4577-8b50-d3e4c95692aa", "customer": { "name": "John Doe", "email": "johndoe@example.com", "phone": "+1234567890" }, "status": "COMPLETE", "origin_type": "API", "origin_id": "orig_987xyz654abc", "currency": "USD", "products": [ { … } ], "payment_source": { "method": "CARD", "last4": "4242", "brand": "Visa" }, "fees": { "transaction_fee": 15, "service_fee": 5 }, "total": 1250.5, "subtotal": 1200.5, "shipping": 50, "tax": 30, "taxValue": 25, "consumer_fee": 5, "enable_notes": true, "fulfilled": false, "notes": "Please deliver by Friday.", "metadata": { "custom_field": "Custom data here" } }