test
POST
https://linkyhub.net/api/v3 /test/orders Scope orders:writeTest mode: create a PAID order flagged test:true on the creator’s product and fire order.paid. Only for an app in development acting for its owner, or a personal API key. No money moves, the buyer is never emailed, and test orders are left out of earnings, analytics, payouts and salesCount.
Request body
application/json
productIdstringrequiredThe product id.
variantIdstringRequired when the product has variants.
buyerobjectShow child parameters
emailstringnamestringshippingAddressobjectFor a physical product; a sample US address when omitted.
Show child parameters
namestringline1stringline2stringcitystringstatestringpostalCodestringcountrystringISO 3166-1 alpha-2.
phonestring{
"productId": "string",
"variantId": "string",
"buyer": {
"email": "string",
"name": "string",
"shippingAddress": {
"name": "string",
"line1": "string",
"line2": "string",
"city": "string",
"state": "string",
"postalCode": "string",
"country": "string",
"phone": "string"
}
}
}Code samples
cURL
curl -X POST "https://linkyhub.net/api/v3/test/orders" \
-H "Authorization: Bearer $LINKYHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"productId":"string","variantId":"string","buyer":{"email":"string","name":"string","shippingAddress":{"name":"string","line1":"string","line2":"string","city":"string","state":"string","postalCode":"string","country":"string","phone":"string"}}}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
201 Done.
{}Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Example
{
"error": "string",
"message": "string"
}Schema
errorstringrequiredA stable code to branch on, e.g. insufficient_scope.
messagestringrequiredA sentence to show a person.
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
POST
https://linkyhub.net/api/v3 /test/orders/{orderId}/refunds Scope orders:writeRefund a test order in full or in part. Nothing goes through Stripe; the order is marked refunded and order.refunded fires. Idempotency-Key is optional here. Real orders use POST /orders/{orderId}/refunds.
Parameters
orderIdstringpathrequiredRequest body
application/json
amountCentsintegerOmitted: everything not yet refunded.
reasonstring{
"amountCents": 0,
"reason": "string"
}Code samples
cURL
curl -X POST "https://linkyhub.net/api/v3/test/orders/{orderId}/refunds" \
-H "Authorization: Bearer $LINKYHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"amountCents":0,"reason":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Done.
{}Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Same as default · POST /test/orders
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
Updated