Create Order Template
Generates an order template (i.e., a barcode) for the user to scan at the cashier. Once the barcode is scanned, the user pays with cash, and the crypto or stablecoins arrive in their wallet.
The barcode order template expires after one hour.
Cash purchases are only available at retail locations within the same U.S. state as the user’s verified KYC address. We’re actively working to expand cross-state availability over time
Sample API Request: POST
URL: https://caas-staging.coinme.com/services/services/order-template
headers:
"Authorization":"asdfghj", //authorization token,required,
'User-Agent: partnerapi' //required
Request body:
{
"customerId": "654987321", // Unique identifier of the customer
"debitCurrencyCode": "USD", // Currency Code of the amount that is debited to the customer
"creditCurrencyCode": "BTC", // Currency Code of the amount that is credited to the customer
"amountValue": "11", // Value of the user input amount, optional
"amountCurrencyCode": "USD", // Currency code of the user input amount, optional
"providerId": "828627387817136135", // Identifier of the payment provider
"locationReference": "R1JFRU5ET1QtMjQzNDpsYXQ9MzguNDc0Nzg2LGxuZz0tMTIxLjQyNzkwNA==", // Encoded reference of the location
"externalCustodyCreditInfo" : { //optional
"walletAddress": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", // Destination wallet address
"blockchainMemo": "" // Additional blockchain transaction information
},
"chain": "BTC" // Crypto chain to be used, optional
}
Sample API Response
{
"data": {
"transactionTemplate": {
"transactionSystemRef": "1231976224861065216", // ID of the order template in Coinme's system
"transactionProviderRef": "830324007540008113329460093303", // ID of the order template in the payment provider's system
"sealed": true, // Indicates whether the order template can be edited or not
"debitCurrencyCode": "USD", // Currency Code of the amount that is debited to the customer
"debitCurrencyUnitPrice": "90887.64", // Price of 1 unit of the debit currency
"creditCurrencyCode": "BTC", // Currency Code of the amount that is credited to the customer
"creditCurrencyAmount": "0.00012100", // Amount that is credited to the customer
"amountValue": "11", // Value of the user input amount
"amountCurrencyCode": "USD", // Currency code of the user input amount
"feesMap": {}, // Map that contains breakdown of the fees
"providerExclusiveFees": { // Map that contains fees exclusive to the payment provider
"retailerCustomerFee": { // Fee that is charged to the customer on-site, on top of the user input amount
"amount": "3.95",
"currency": "USD"
}
}
"active": true, // Indicates whether the order template can be consumed
"expiryTimestamp": "2025-04-22T15:33:48.270Z" // Expiry timestamp of the Order Template in UTC. Expires after one hour
}
},
"errorResponse": null
}
Error Codes
| Error Code | Error Message |
|---|---|
| 241-404-352-404 | Order template with the orderTemplateId X not found |
| 182-400-201-801 | Currency X does not exist or is not enabled for partner |
| 182-400-201-909 | Unsupported operation SELL |
| 182-400-201-919 | No Kiosk location exists with latitude X and longitude Y! |
| 109-412-151-045 | Daily limit breached (X). Available amount: 0 |
| 101-400-314-003 | Error obtaining order template from service provider %s |
Updated 6 days ago