Payment API
    • Retrieving Client Information with JavaScript
    • Sale Request
      POST
    • Status Request
      POST
    • Refund Request
      POST
    • Schemas
      • Schemas
        • Sale
        • Merchant
        • Customer
        • Billing
        • Billing-Card
        • Webhooks
        • Browser
        • Risk-Params
        • Refund-Transaction

      Sale Request

      Sandbox
      https://payment-sandbox.aylsolution.com
      Sandbox
      https://payment-sandbox.aylsolution.com
      POST
      /api/v1/sale

      Browser / Risk-Params#

      browser and risk-params parameters are conditional. They may be required depending on the payment route assigned to the merchant account. If any required parameters are missing, refer to the API error response for details. Sending all applicable browser parameters with every Sale request is strongly recommended.

      Endpoint#

      Live#

      https://payment.aylsolution.com/api/v1/sale

      Sandbox#

      https://payment-sandbox.aylsolution.com/api/v1/sale

      Webhook and Return URL#

      Webhook#

      Webhook is triggered when payment is finished.
      Merchant structure and payment result will be posted in JSON format.
      {
        "merchant": {
          "id": "M-01J37M4HKHX8S575EAQJSTRHDT",
          "site-id": "S-01J37M4HKMVGJTYABA3Z1GN3M6",
          "track-id": "408-867-5309"
        },
        "result": {
          "status": "approved",
          "code": "0",
          "message": "Test 3DS Card OK.",
          "transaction-id": "T-01JHTG4PVZ8GRCDMHW70MPGDQ4",
          "descriptors": "3ds DESC"
        }
      }

      Return URL#

      Return URL after 3D-Secure.
      Query Parameters are added to URL.
      ParameterDescription
      result.transaction-idTransaction ID
      result.messageResult Message
      result.statusResult Code
      merchant.track-idTrack ID given on merchant structure

      About Sandbox: Sale#

      Only test cards can be used
      Sandbox history may be deleted without notice
      Sandbox details may be changed without notice

      Merchant and Site for Sandbox#

      for USD#

      Merchant ID: M-01J37M4HKHX8S575EAQJSTRHDT
      Site ID: S-01J37M4HKMVGJTYABA3Z1GN3M6
      Password: XOXwNe9ij6Po

      for JPY#

      MerchantID:M-01J3YWBY1HQ0QSQ939G87A3S5J
      MerchantSiteId:S-01J3YWCTV3HVS85NBECQ6Q40JT
      Password:6mkN9d8Ylk3%

      Test Cards#

      Card Numbers
      BrandCard Number
      Visa4242424242424242
      Master5105105105105100
      CVVs
      CVVExpected Result
      123Approved
      456Declined
      7893D-Secure ( Approved )
      9873D-Secure ( Declined )
      999Error
      Any other Card number / CVV will be declined and Undefined Test Card on message.

      Request

      Body Params application/json

      Example
      {
          "merchant": {
              "id": "M-01J37M4HKHX8S575EAQJSTRHDT",
              "site-id": "S-01J37M4HKMVGJTYABA3Z1GN3M6",
              "password": "XOXwNe9ij6Po",
              "track-id": "408-867-5309",
              "return-url": "https://example.com/return-url"
          },
          "billing": {
              "currency-code": "USD",
              "amount": 12.34,
              "product-desc": "Product Description",
              "card": {
                  "holder": "John Doe",
                  "number": "4242424242424242",
                  "exp-y": "2030",
                  "exp-m": "12",
                  "cvv": "123"
              }
          },
          "customer": {
              "email": "john@example.com",
              "ip": "123.123.123.123",
              "country": "US",
              "zip": "10001",
              "state": "State",
              "city": "City",
              "address": "Address",
              "phone": "+17182222222"
          }
      }

      Responses

      🟢200OK
      application/json
      Bodyapplication/json

      Examples
      {
          "type": "valid",
          "merchant": {
              "id": "M-01J37M4HKHX8S575EAQJSTRHDT",
              "site-id": "S-01J37M4HKMVGJTYABA3Z1GN3M6",
              "track-id": "408-867-5309"
          },
          "result": {
              "status": "approved",
              "code": "0",
              "message": "resultMessage",
              "transaction-id": "T-01J37QC9PQJBPT3GVEP7GB58A4",
              "descriptors": [
                  "PAYMENT-DESC",
                  "PAYMENT-DESC2"
              ],
              "redirect-url": "https://example.com/3ds"
          }
      }
      🔴500Gateway Error
      🟠422Validation Error
      Previous
      Retrieving Client Information with JavaScript
      Next
      Status Request
      Built with