Create order
Endpoints
Create Order
Create and sign an order when requested by a payment app
POST
Create order
For detailed flow diagrams and implementation guidance, see the Merchant Orders guide.
Flow
- Payment app sends order details to your endpoint
- You validate the request and create the order in your system
- You sign the order with your private key
- You return the signed order with callback URLs
Signing the Order
Canonicalize and sign the order object:Callback URLs
Include URLs in your response so payment apps know where to redirect users:| URL | Purpose |
|---|---|
urls.order | Where the order can be retrieved |
urls.completed | Redirect after successful payment |
urls.cancelled | Redirect if payment is cancelled |
Example Response
Headers
Sender's OCID (Opencharge ID)
Unix timestamp in seconds
Unique request identifier for replay protection
secp256k1 ECDSA signature of the canonical request
Body
application/json
Request from a payment app to create and sign an order
Unique order identifier
Your merchant's OCID
Total amount as decimal string
ISO 4217 currency code
Your internal reference
Line items in the order
Customer-facing note
Unix timestamp when order expires