Skip to main content

17. Make a payment

  1. This API allows you to pre-create an order using the order creation API and then pay for it using number or reference_number.

  2. You can also create an order and pay for it directly by passing the order object.

When you use number or reference_number, order doesn't need to be passed.

Header Parameters
    Nonce string required

    random 16 bytes alphanumerics

    Credential string required

    Please follow the OpenAPI authentication section

    Example: d900da8b-6e16-4a85-8a66-05d29ac53f24/20240501120123/Wonder-RSA-SHA256
    Signature string required

    Please follow the OpenAPI authentication section

    Example: good
    Content-type string required
    Example: application/json
    x-request-id string
    Example: {% mock 'uuid' %}
Request Body
    order object
    charge_fee charge fee required

    Default value: 0.00

    The amount you charge your customers

    tips charge fee

    Default value: 0.00

    The amount you charge your customers

    currency currency code required

    currency code, eg HKD

    reference_number your side unique number required

    your side unique number

    due_date due date

    If this date is exceeded, the order will be automatically voided

    note note

    Note information for the order, needs to be less than 255 characters

    line_items object[]

    If you wish to display additional line item information

  • Array [
  • uuid uuid

    UUID V4

    purchasable_type PurchasableType required

    Possible values: [RearTips, Charge]

    purchase_id string

    just for purchaseable_type = Listing

    price string required
    quantity string required
    total string required
    label Product Name

    Product Name

  • ]
  • callback_url callback url

    The address of the backend webhook

    redirect_url redirect_url

    The redirection address after the payment link is completed

    payment object required
    uuid string
    payment_token object
    amount payment total required
    token string required

    if you already has card token

    consume_mode string required
    entry_type string required

    Possible values: [cit, mit]

    alipay object
    amount string required
    merchant_presented_qr_code object
    payinfo string required
    in_web object required
    payment_inst string required
    return_url string required
    in_app object required
    subject string required
    app_env string required
    payment_inst string required
    return_url string required
    payinfo string required
    app_id string required
    wechatpay object
    amount string required
    merchant_presented_qr_code object
    payinfo string required
    in_web object
    payment_inst string required
    return_url string required
    official_account object
    code string required
    time_stamp string required
    nonce_str string required
    package string required
    sign_type string required
    pay_sign string required
    in_app object
    subject string required
    app_env string required
    payment_inst string required
    return_url string required
    payinfo string required
    app_id string required
    apple_pay object
    amount string required
    token_base64 string required
    merchant_identifier string required
    consume_mode string required
    is_immediate_capture string required
    credit_card object
    amount string required
    exp_year string required
    exp_month string required
    number string required
    cvv string required
    consume_mode string

    Possible values: [sales, preauth]

    holder_name string required
    is_auto_save string required
    3ds object required
    success_return_url string required
    fail_return_url string required
    fps object
    amount string required
    merchant_presented_qr_code object required
    payinfo string required
    google_pay object
    amount string required
    tag string required
    consume_mode string required
    token object required
    apiVersion string required
    apiVersionMinor string required
    paymentMethodData object required
    description string required
    type string required
    info object required
    cardDetails string required
    cardNetwork string required
    assuranceDetails object required
    cardHolderAuthenticated string required
    accountVerified string required
    tokenizationData object required
    token string required
    type string required
    is_immediate_capture boolean
    octopus_business object
    amount string required
    merchant_presented_qr_code object required
    payinfo string required
    in_web object required
    payment_inst string required
    return_url string required
    unionpay_wallet object
    amount string
    merchant_presented_qr_code object
    payinfo string required
    in_web object
    payment_inst string required
    return_url string required
    in_app object
    subject string required
    app_env string required
    payment_inst string required
    return_url string required
    payinfo string required
    app_id string required
    consume_mode string
    is_immediate_capture boolean
    billing_address object
    zip_code string required
    address string required
    city string required
    state string required
    country_code string required
    first_name string required
    last_name string required
    phone_number string required

    分组

    email string required
    number wonder order number

    wonder order number

    reference_number your side reference number

    your side reference number

Responses

success


Schema
    source Transaction source required

    Transaction source

    type Order type required

    Order type

    number Wonder unique id required

    Wonder unique id

    reference_number Your Side unique id required

    your side unique id

    initial_total Order total required

    Order total

    initial_tips Order tips required

    Order tips

    subtotal integer required
    paid_total Order Paid total required

    sum of successful transaction amount

    unpaid_total Order unpaid total required

    initial_total - paid_total

    state Order state required

    Order state

    correspondence_state Order payment state required

    Order payment state

    currency Currency required
    return_url frontend return url

    for payment link, when payment finished redirect to this url

    notify_url Webhook url

    if you fill it, wonder will callback your this url after state changed

    line_items object[]
  • Array [
  • uuid string
    purchasable_type PurchasableType required

    Possible values: [RearTips, Charge]

    purchase_id integer
    price integer required
    quantity integer required
    total integer required
    label string
  • ]
  • transactions object[]
  • Array [
  • type Transaction Type required

    Possible values: [Sales, Authorization, Refund, Capture]

    uuid Wonder transaction uuid required

    Wonder transaction uuid

    currency transaction currency required

    transaction currency

    amount transaction amount required

    transaction amount

    success success required

    if transaction successful

    is_pending boolean required

    for async payment,if transaction still pending

    captured boolean required

    for card pure-auth,if transaction captured

    allow_void boolean required

    if transaction allowed to void

    allow_refund boolean required

    if transaction allowed to refund

    void_is_pending boolean required

    if void still pending

    payment_method string required

    which payment method

    note string required

    transaction remark

    payment_data object required

    related to payment method

    acquirer_name string required
    acquirer_type string required
    auth_code string required
    brn string required
    card_id string required
    card_number_len integer required
    card_read_mode string required
    credit_card_type string required
    first_6_digits string required
    last_4_digits string required
    merchant_id string required
    new_gateway_txn_id string required
    payment_method string required
    receipt_id string required
    rrn string required
    transaction_state string required
    original_transaction_uuid original transacation uuid

    original transacation uuid

  • ]
Loading...