Alipay, China's leading third-party online payment solutionAlipay, China's leading third-party online payment solution

1. Pre-creating order using alipay.acquire.precreate

The alipay.acquire.precreate interface is used to place an pre-order without the buyer's identity. Alipay will then return a payment URL in the response. Then buyers can access the payment URL using Alipay wallet to confirm the order and submit the payment.

For the information about request and response parameters and error codes, refer to the API documentation

The gateway URL:

environmenthttps gateway URL
Production environment

https://intlmapi.alipay.com/gateway.do

Request sample

copy
https://intlmapi.alipay.com/gateway.do?_input_charset=UTF-8&body=iphone cellphone&currency=USD&extend_params={"secondary_merchant_name":"Lotte","secondary_merchant_id":"123","secondary_merchant_industry":"5812","store_id":"A101","store_name":"McDonald in 966 3rd Ave, New York"}&notify_url=http://api.test.alipay.net/atinterface/receive_notify.htm&out_trade_no=4363476566647440&partner=2088021966388155&passback_parameters=test&price=0.01&product_code=OVERSEAS_MBARCODE_PAY&quantity=1&seller_email= testoverseas1980@alipay.com&seller_id=2088021966388155&sendFormat=normal&service=alipay.acquire.precreate&show_url=http://www.taobao.com/product/113714.html&subject=Payment by QR-Code&total_fee=0.01&trans_currency=USD&sign=2127020ad640f41eec725c639f1de294

Response samples

Business is accepted and processed normally, and acquiring is created successfully:

copy
<?xml version="1.0" encoding="UTF-8"?> 
<alipay> 
    <is_success>T</is_success> 
    <request> 
        <param name="body">bodyyy</param> 
        <param name="operator_id">1232</param> 
        <param name="subject">dddd</param> 
        <param name="sign_type">RSA</param> 
        <param name="store_id">123</param> 
        <param name="out_trade_no">3177578879372734</param> 
        <param name="sendFormat">normal</param> 
        <param name="currency">GBP</param> 
        <param name="timestamp">1456507704121</param> 
        <param name="sign">T/9olfnp/rGwmSV0dCkJVvcMuJM2pbstsSFVH54FdN9AbWRbGKNzXwbELbLSJgNZWQej8QqHJauQztG/nC9McWSbeaNsmOrrLnZ+T5XQjCJHilBbupFBsLgF1vzSHe02bICumIjw8r81ysyTHXFmqROaG9hqs0TvFkDpA7O4Ft4=</param> 
        <param name="_input_charset">UTF-8</param> 
        <param name="trans_currency">GBP</param> 
        <param name="total_fee">8.8</param> 
        <param name="product_code">OVERSEAS_MBARCODE_PAY</param> 
        <param name="service">alipay.acquire.precreate</param> 
        <param name="partner">2088101181776059</param> 
        <param name="seller_id">2088101181776059</param> 
        <param name="alipay_ca_request">2</param> 
        <param name="extend_params">{"store_id":"BJ_ZZ_001","store_name":"Muku in the Dreieichstrabe","secondary_merchant_id":"A80001","secondary_merchant_name":"Muku","secondary_merchant_industry":"7011"}</param> 
    </request> 
    <response> 
        <alipay> 
            <big_pic_url>http://mobilecodec.daily.alipaydev.com/show.htm?code=bax009917nmpivmndisb00e6&picSize=L</big_pic_url> 
            <out_trade_no>3177578879372734</out_trade_no> 
            <pic_url>http://mobilecodec.daily.alipaydev.com/show.htm?code=bax009917nmpivmndisb00e6&picSize=M</pic_url> 
            <qr_code>https://qr.alipay.com/bax009917nmpivmndisb00e6</qr_code> 
            <result_code>SUCCESS</result_code> 
            <small_pic_url>http://mobilecodec.daily.alipaydev.com/show.htm?code=bax009917nmpivmndisb00e6&picSize=S</small_pic_url> 
            <voucher_type>qrcode</voucher_type> 
        </alipay> 
    </response> 
    <sign>ZDWE75ZB0YptqcxKC09g2dSuHEDnWbZ3j+tdpfAt1Il2FmJgJ7Mz9MX/QY0UxZXLP+bYjjC27OJgbhHljVUfrSYN/Ls4vvV/yg6I2/wetK/4Etdt/RJ2og7yRXhE+XzKaG7Q9rYhwnMq3lxukWZA2gep5T69P8yQS8Lz5KZrgjU=</sign> 
    <sign_type>RSA</sign_type> 
</alipay>

Request succeeds, business processing fails:

copy
<?xml version="1.0" encoding="utf-8"?> 
 <alipay> 
  <is_success>T</is_success> 
  <request> 
   <param name="body">face-to-face-payment</param> 
   <param name="subject">iphone</param> 
   <param name="sign_type">MD5</param> 
   <param name="out_trade_no">99003911198989</param> 
   <param name="total_fee">10</param> 
   <param name="partner">2088101106499364</param> 
   <param name="quantity">10</param> 
   <param name="sign">a1cb41a4019351965d4418c9cb933f0f</param> 
   <param name="_input_charset">UTF-8</param> 
   <param name="price">1</param> 
   <param name="it_b_pay">1d</param> 
   <param name="product_code">OVERSEAS_MBARCODE_PAY</param> 
   <param name="service">alipay.acquire.precreate</param> 
   <param name="seller_id">2088101106499364</param> 
  </request> 
  <response> 
  <alipay>
   <result_code>FAIL</result_code> 
   <detail_error_code>INVALID_PARAMETER</detail_error_code> 
   <detail_error_des>request paramter invalid</detail_error_des> 
   </alipay> 
  </response> 
  <sign>ea489fc31da63253bab52ed77fb45eb7</sign> 
  <sign_type>MD5</sign_type> 
 </alipay>

Output when Request fails or the data accessed is wrong:

copy
<?xml version="1.0" encoding="utf-8"?> 
 <alipay> 
  <is_success>F</is_success> 
  <error>ILLEGAL_SIGN</error> 
 </alipay>