JD Pay
Basic information
The customer continues to the JD Pay payment page and follows its instructions to complete payment.
- Integration paths: Direct API, Checkout
- Transaction type: One-time payment
lpmsInfo.lpmsType:JdPay
| Customer country/region | Order currency |
|---|---|
| 🇬🇧 GB | GBP |
| 🇧🇪 BE, 🇩🇪 DE, 🇪🇸 ES, 🇫🇷 FR, 🇱🇺 LU, 🇳🇱 NL | EUR |
The customer country/region is the billingInformation.country value in the payment request.
This guide applies to applications enabled for physical-goods payments. You provide the order and customer details and explicitly identify the physical-goods business type. Before using another business type or order currency, confirm the enabled scope for your merchant and application with Onerway. Use List Available Payment Methods to check the current order.
Before you start
Complete Integration Setup. Confirm that JD Pay physical-goods payments are enabled for your application, including use of business type 100001, and confirm the transaction limits, payment expiry, settlement arrangements, and test procedure. See Currency and Amount Validation for amount formatting.
Prepare the goods, billing, and shipping information required by the API. Use the customer's actual country and contact details. Configure notification and return URLs, and retain a mapping between your order and the Onerway payment identifiers. The business type describes the merchant's sale; your server supplies it, rather than asking the customer to select it during payment.
Start the payment
Direct API
- Check List available payment methods for the current order. After the customer selects this method, call Create direct transaction from your server with
productType=LPMS,subProductType=DIRECT,txnType=SALE, andpaymentMode=WEB. SetlpmsType=JdPayinlpmsInfo, encoded as a JSON string. - Supply top-level
metaDataas a JSON string containing{"bizTP":"100001"}for this physical-goods flow. The value ofbizTPis also a string. Supply the actual billing and shipping details inbillingInformationandshippingInformation, both encoded as JSON strings. Include the physical goods, notification and return URLs, and merchant-collected end-user IP, browser, and device information intxnOrderMsg. For the order and goods, use the order currency in the table above for the customer country/region (GBP or EUR); goods amounts, discounts, and shipping charges must totalorderAmount.
Select the request example “Redirect local payment request (illustrative)”. It uses Bancontact / BE / EUR to show the shared structure. Replace the method withJdPay, use the order currency in the table above for the customer country/region (GBP or EUR), supply the actual physical goods and customer details, and add themetaDatavalue above. Do not rely on an omitted business type or includesubscriptionin this one-time payment flow. The example amount does not establish a transaction limit. - Store the returned
paymentIdandtransactionId. Whenstatus=RandactionType=RedirectURL, redirect the customer’s browser toredirectUrl. The response example “Redirect local payment response (illustrative)” shows this shape. For other actions or states, follow Local payment integration. Do not repeatedly create the same order while waiting. - The JD Pay page guides the customer through payment. When the customer returns to your site, display the result retrieved from your server. See Request signing for authentication.
Checkout
If you offer only this method, first call List Available Payment Methods and check that it is returned for the current order. When Checkout displays all available methods, Onerway performs this filtering.
- On your server, call Create Checkout Payment with
productType=ALL,subProductType=DIRECT,txnType=SALE, andpaymentMode=WEB. To show only JD Pay, setlpmsInfo.lpmsTypetoJdPay, sendinglpmsInfoas a JSON string. If you omitlpmsInfo, the customer chooses from the methods available for the order. - For this physical-goods flow, supply top-level
metaDataas a JSON string containing{"bizTP":"100001"}. The value ofbizTPis a string. For example, the outer request contains"metaData": "{\"bizTP\":\"100001\"}". Do not rely on an omitted business type, addbizTPas a top-level request parameter, or includesubscriptionin this one-time payment flow. - Supply billing, shipping, goods, return URL, and notification URL fields as required by the API. Both
billingInformationandshippingInformationare JSON strings. For the order and goods, use the order currency in the table above for the customer country/region (GBP or EUR); goods amounts, discounts, and shipping charges must totalorderAmount.
Select the request example Unified Checkout with all available payment methods. Replace its order and customer data, use the order currency in the table above for the customer country/region (GBP or EUR), supply the physical goods, and add themetaDataandpaymentModevalues above. Add this method'slpmsInfoif you want to show only JD Pay. Remove the example'scardInfoobject for this flow. The example demonstrates the shared Checkout request structure. - Select the response example Unified Checkout session created. Save the returned
paymentIdandtransactionIdagainst your order, then redirect the customer's browser toredirectUrl. The initialstatus=Umeans the payment is unpaid. - Checkout guides the customer to the JD Pay payment page. When the customer returns to
returnUrl, display the order result obtained from your server. See Checkout Integration for signing, redirects, and return handling.
Customer steps and final result
The customer opens the JD Pay payment page, checks the payment details, and follows the page's instructions to complete payment. Any authentication or confirmation requested by that page takes place there. Your application should not collect the customer's JD Pay password or verification codes. Follow the instructions for the current payment; this guide does not prescribe a particular login, QR-code, or funding method.
The customer may leave before completing payment. Opening the payment page or returning to your website does not establish that payment succeeded. Keep the order pending until your server obtains the result.
Process the verified Payment Result notification on your server. If a notification is missing or the result needs checking, use the saved paymentId with Query Payments. Fulfil the order only after server-side confirmation of success. See Webhooks for signature verification, acknowledgement, idempotency, and query fallback.
Refunds and disputes
Confirm the refund capabilities, restrictions, and dispute process applicable to your merchant with Onerway. If refunds are enabled, follow Refunds.
Testing and go-live
Confirm the test environment and available JD Pay physical-goods test procedure with Onerway, then use Sandbox Testing to verify:
- Test each path you use with a physical-goods order, using the order currency in the table above for the customer country/region (GBP or EUR),
metaDatacontainingbizTP="100001", andpaymentMode=WEB. For the Direct API, check that the returned redirect opens the JD Pay page. For Checkout, check that the firstredirectUrlopens Checkout and JD Pay is available before proceeding to its payment page. - Continue to the JD Pay payment page, check the payment details, and complete the agreed payment test. Confirm the result on your server. Opening the payment page alone does not pass payment acceptance.
- Test leaving the payment page and returning before the final result is known. Also test query fallback for a missing notification and idempotent handling of duplicate notifications.
- During go-live acceptance, retain the notification and acknowledgement for the same order and query it once to check that the results agree. Verify production enablement for this business type, notification and return URLs, limits, and expiry. Test refunds separately if enabled.
Bank transfer (Brazil)
Accept one-time BankTransfer payments through the Direct API or Checkout with customer details supplied in advance and confirm the bank-transfer result on your server.
Saudi local cards (cardpay)
Accept hosted cardpay payments with Saudi local cards through the Direct API or Checkout, supply customer and product details, and handle payment results and delivery information.