加载中...
Use direct HTTP requests to create orders, verify login results, and confirm payment state
Use this track when you want a server-to-server integration instead of the SDK.
Use the HTTP track when your backend should:
When you need a full request URL, use:
YOUIDIAN_API_URL + route path
${YOUIDIAN_API_URL}/api/v1/pay/orders${YOUIDIAN_API_URL}/api/v1/pay/orders/:id?appId=...${YOUIDIAN_API_URL}/api/v1/login/attempts${YOUIDIAN_API_URL}/api/v1/login/attempts/:attemptId${YOUIDIAN_API_URL}/api/v1/login/tokens/verify${YOUIDIAN_API_URL}/api/v1/pay/notify/stripeYour backend
-> POST ${YOUIDIAN_API_URL}/api/v1/pay/orders
-> store orderId from the response
-> return paymentUrl / qrCode / mobileUrl to the frontend
-> after the user pays, GET ${YOUIDIAN_API_URL}/api/v1/pay/orders/:id?appId=...
-> grant access only after the order is confirmed
Your frontend
-> start hosted login or a provider payment flow
-> send the resulting login token or payment result to your backend
-> let your backend verify the token or order status