Metadata

Metadata

  • Metadata is used in anti-fraud analysis for al eCommerce transactions, all card payments must include metadata.
  • Adding more data fields makes fraud analysis more efficient and reduces chargebacks.
  • Remember: Metadata must be sent in each transaction. Read more about Payments with cards in our API reference.
  • Metadata can be collected when your client registers on your platform and be submitted during the payment process, alternatively, you can create an UI in order to gather required details.

Required data fields

PHP Example

$metadata = array(  
    "billing" => array(
          "billingEmailAddress" => "ejemplo@srpago.com",
          "billingFirstName-D"=> "Nombre",
          "billingMiddleName-D"=> "Segundo Nombre",
          "billingLastName-D"=> "Apellidos",
          "billingAddress-D" => "Calle 1",
          "billingAddress2-D"=> "Colonia",
          "billingCity-D"=> "Ciudad",
          "billingState-D"=> "CX",
          "billingPostalCode-D"=> "00000",
          "billingCountry-D"=> "MX",
          "billingPhoneNumber-D"=> "0000000000",
        ),
    
    "member"=> array(
          "memberFullName"=> "Nombre Appellidos",
          "memberFirstName"=> "Nombre",
          "memberMiddleName"=> "Segundo Nombre",
          "memberLastName"=> "Apellidos",
          "memberEmailAddress"=> "ejemplo@srpago.com",
          "memberAddressLine1"=> "Calle 1",
          "memberAddressLine2"=> "Colonia",
          "memberCity"=> "Ciudad",
          "memberState"=> "CX",
          "memberCountry"=> "MX",
          "memberPostalCode"=> "00000",
          "memberPhone"=>"0000000000"
        ),
    
    
     "items"=> array (
          "item"=> array (
            array(
              "itemNumber"=> "01",
              "itemDescription" => "TEST",
              "itemPrice"=>"100",
              "itemQuantity" => "1",
              "itemMeasurementUnit"=> "PZ",
              "itemBrandName"=>"SR.Pago",
              "itemCategory"=> "TI",
              "itemTax"=> "0.00",
              ),
              ),
              ),
Billing = Cardowner
Member = User
Items = Product or service

If you E-commerce integration delivers products, you must include the Shipping object in the metadata:

"shipping"=> array(
                "shippingCharges"=> "100.50",
                "shippingFirstName"=> "Juan",
                "shippingMiddleName"=> "Pablo",
                "shippingLastName"=> "Perez",
                "shippingEmailAddress"=> "a@a.com",
                "shippingAddress"=> "a",
                "shippingAddress2"=> "b",
                "shippingCity"=> "s",
                "shippingState"=> "Chicago",
                "shippingPostalCode"=> "12345",
                "shippingCountry"=> "MX",
                "shippingPhoneNumber"=> "",
                "shippingMethod"=> "mail",
                "shippingDeadline"=> "2015-08-01",),
    );
Shipping = Shipping details

JSON Example

This example has all the fields available:

  
{ 
  "salesTax": "160.00",
  "browserCookie": "session=743663;",
  "orderMessage": "No tocar el timbre, esperare afuera",
  "billing": {
    "billingEmailAddress": "johnsmith@email.com",
    "billingFirstName-D": "Juan",
    "billingMiddleName-D": "Antonio",
    "billingLastName-D": "Perez",
    "billingAddress-D": "Arkansas 16",
    "billingAddress2-D": "Insurgentes",
    "billingCity-D": "CDMX",
    "billingState-D": "DF",
    "billingPostalCode-D": "03810",
    "billingCountry-D": "MEX",
    "billingPhoneNumber-D": "87654321",
    "creditCardAuthorizedAmount-D": "2000.00"
  },
  "giftCards": {
    "giftCard": [
      {
        "giftCardNumber": "ABC1234567890",
        "giftCardAmount": "10.95"
      },
      {
        "giftCardNumber": "JKL09876543231",
        "giftCardAmount": "15.30"
      }
    ]
  },
  "coupons": {
    "coupon": [
      {
        "couponCode": "011293674310",
        "couponAmount": "50.00"
      },
      {
        "couponCode": "704757305096",
        "couponAmount": "70.00"
      }
    ]
  },
  "promotions": {
    "promotion": [
      {
        "promotionCode": "P0001",
        "promotionAmount": "100.00"
      },
      {
        "promotionCode": "P0002",
        "promotionAmount": "50.00"
      }
    ]
  },
  "certificates": {
    "certificate": [
      {
        "certificateUsedValue": "76",
        "certificatePromoCode": "07689",
        "certificatePinCode": "65588",
        "certificateLoyaltyMemberId": "88766445",
        "certificateLoyaltyProgramCode": "867e548",
        "certificateIssueReasonCode": "asdfg",
        "certificateIssueLocation": "web",
        "certificateIssueDate": "2015-07-03",
        "certificateInitialValue": "100",
        "certificateExpirationDate": "2016-01-01",
        "certificateId": "66769",
        "certificateCurrentValue": "24"
      }
    ]
  },
  "member": {
    "memberLoggedIn": "Si/No",
    "memberId": "TBI23457",
    "membershipDate": "2010-02-12",
    "memberFullName": "Berenice Garcia Toral",
    "memberFirstName": "Berenice",
    "memberMiddleName": "Garcia",
    "memberLastName": "Toral",
    "memberEmailAddress": "bgarcia@gmail.com",
    "memberAddressLine1": "123 Main St",
    "memberAddressLine2": "main",
    "memberCity": "Chicago",
    "memberState": "IL",
    "memberCountry": "US",
    "memberPostalCode": "60601",
    "membershipLevel": "3",
    "membershipStatus": "activo",
    "latitude": "19",
    "longitude": "19",
    "memberPhone": "312-555-5555"
  },
  "shipping": {
    "shippingCharges": "100.50",
    "shippingFirstName": "Juan",
    "shippingMiddleName": "Pablo",
    "shippingLastName": "Perez",
    "shippingEmailAddress": "a@a.com",
    "shippingAddress": "a",
    "shippingAddress2": "b",
    "shippingCity": "s",
    "shippingState": "Chicago",
    "shippingPostalCode": "12345",
    "shippingCountry": "MEX",
    "shippingPhoneNumber": "87654321",
    "shippingMethod": "mail",
    "shippingDeadline": "2015-08-01"
  },
  "items": {
    "item": [
      {
        "itemNumber": "193487654",
        "itemDescription": "iPhone 6 32gb",
        "itemPrice": "599.00",
        "itemQuantity": "1",
        "itemMeasurementUnit": "Pza",
        "itemBrandName": "Apple",
        "itemCategory": "Electronics",
        "itemTax": "12.95"
      },
      {
        "itemNumber": "193487654",
        "itemDescription": "iPhone 6 64gb",
        "itemPrice": "599.00",
        "itemQuantity": "2",
        "itemMeasurementUnit": "Pza",
        "itemBrandName": "Samsung",
        "itemCategory": "Electronics",
        "itemTax": "12.95"
      }
    ]
  },
  "dispatchers": {
    "dispatcher": [
      {
        "dispatcherId": "193487654",
        "dispatcherName": "Jose",
        "dispatcherLastName": "Mtz"
      }
    ]
  },
  "retail": {
    "initialSalesRep": "Jaime Mtz",
    "initialSalesRepDeviceId": "43r2e02dkewf2",
    "initialSalesRepId": "1314",
    "finalSalesRep": "Jaime Mtz",
    "finalSalesRepDeviceId": "43r2e02dkewf2",
    "finalSalesRepId": "1314",
    "salesChannel": "Abarrotes, Vinos, Licores, ",
    "referralCode": "CFB2010"
  }
}

 

Was this article helpful to you? Yes 12 No 15