Guía de referencia respuestas del SDK

Card Bin metadata - JSON

{  
   "cardBin": "4242",  
   "cardBrand: "Visa"  
}

Installment metadata - JSON

{
  "card_bin": "4242",
  "plan_option_id": "5c2bc8c6-2a4e-4a11-a7c6-91157380ae98",
  "display_installment_label":"1 mes - MXN 999",
  "display_installments_amount":"MXN 999",
  "installments": 1,
  "installment_rate": 0
}

Order response - JSON

Para mayor información consulta la api de referencia > RESPONSES > 200 > RESPONSE BODY > order.

{
  "currency": "USD",
  "discounts": [
    {
      "amount": 10,
      "code": "SUMMER10",
      "description": "Summer Sale Discount",
      "details_url": "https://example.com/discount-details",
      "discount_category": "Seasonal",
      "display_amount": "$10.00",
      "free_shipping": {
        "is_free_shipping": true,
        "maximum_cost_allowed": 20
      },
      "reference": "REF12345",
      "target_type": "Order",
      "type": "Percentage"
    }
  ],
  "items": [
    {
      "brand": "ExampleBrand",
      "category": "Clothing",
      "color": "Red",
      "description": "A stylish red shirt",
      "details_url": "https://example.com/item-details",
      "id": "ITEM123",
      "image_url": "https://example.com/image.png",
      "item_details": [
        {
          "priority": 1,
          "label": "Size",
          "value": "M"
        },
        {
          "priority": 2,
          "label": "Material",
          "value": "Cotton"
        }
      ],
      "manufacturer": "ExampleManufacturer",
      "name": "Red Shirt",
      "options": "Size: M, Color: Red",
      "quantity": 2,
      "size": "M",
      "sku": "SKU123",
      "subscription_id": "SUB123",
      "tax_amount": {
        "amount": 5,
        "currency": "USD",
        "currency_symbol": "$",
        "display_amount": "$5.00"
      },
      "taxable": true,
      "total_amount": {
        "amount": 50,
        "currency": "USD",
        "currency_symbol": "$",
        "display_amount": "$50.00",
        "display_original_amount": "$55.00",
        "display_total_discount": "$5.00",
        "original_amount": 55,
        "total_discount": 5
      },
      "type": "Physical",
      "unit_price": {
        "amount": 25,
        "currency": "USD",
        "currency_symbol": "$",
        "display_amount": "$25.00"
      },
      "weight": {
        "unit": "kg",
        "weight": 1
      }
    }
  ],
  "items_total_amount": 50,
  "order_id": "ORDER12345",
  "payment": {
    "data": {
      "amount": {
        "amount": 50,
        "currency": "USD"
      },
      "authorization_code": "AUTH123",
      "created_at": "2023-07-09T12:34:56Z",
      "customer": {
        "email": "[email protected]",
        "first_name": "John",
        "id": "CUST123",
        "last_name": "Doe"
      },
      "external_transaction_id": "EXT123",
      "from_card": {
        "bank_name": "ExampleBank",
        "card_brand": "Visa",
        "country_iso": "US",
        "first_six": "123456",
        "installment": {
          "installment_amount": 10,
          "installment_rate": 5,
          "installment_type": "Fixed",
          "installments": 5,
          "plan_id": "PLAN123",
          "plan_option_id": "OPTION123"
        },
        "last_four": "7890"
      },
      "id": "PAYMENT123",
      "merchant": {
        "id": "MERCHANT123",
        "store_code": "STORE123"
      },
      "merchant_payment_processor_name": "ExampleProcessor",
      "method_type": "CreditCard",
      "processor": "ExampleProcessor",
      "reason": "Purchase",
      "status": "Completed",
      "updated_at": "2023-07-09T12:45:00Z"
    }
  },
  "shipping_amount": 5,
  "status": "Pending",
  "sub_total": 55,
  "total_amount": 60,
  "transaction_id": "TRANS123"
}

PaymentsError

{
  "type": "paymentError",
  "metadata":{
    "code":"CODE",
    "message": "Message"
  },
  "order": json_order_or_null
}

Card Saved - JSON Response

{
  "user": {
    "phone": "593984357941",
    "not_accepted_policies": null,
    "network_id": "406de58d-c451-4fbe-b11b-50526ab5e6fb",
    "id": "45aa4524-1e98-4f5d-8845-20394f0f37ee",
    "created_at": "2024-06-28T01:11:03.667734Z",
    "last_name": "Morocho",
    "user_role": "user",
    "email": "[email protected]",
    "merchant_id": "9ea20bdb-5cff-4b10-9c95-9cebf8b6ddb4",
    "is_guest": false,
    "first_name": "Darwin"
  },
  "checkoutVersion": "0.0.3-rc.147",
  "metadata": {
    "createdCard": {
      "id": "4fd0584b-d336-4406-ad63-cc253fd47f14",
      "verifiedAt": "0001-01-01T00:00:00Z",
      "verifiedWithTransactionId": "",
      "firstSix": "424242",
      "verifiedBy": "",
      "bankName": "",
      "storedCard": false,
      "company": "visa",
      "expirationDate": "12/30",
      "cardHolder": "Test User",
      "userId": "45aa4524-1e98-4f5d-8845-20394f0f37ee",
      "cardType": "credit_card",
      "isValid": false,
      "cardId": "4fd0584b-d336-4406-ad63-cc253fd47f14",
      "lastFour": "4242",
      "createdAt": "2024-07-10T17:54:26.970636182Z",
      "cardHolderDni": "",
      "deletedAt": null
    }
  }
}

CONTINUA LEYENDO
Tell your users what they should do after they've finished this page