Quantcast
Channel: Opinion: Shopify Community - Shopify APIs & SDKs
Viewing all articles
Browse latest Browse all 25503

Cloud Elements commented on Create a transaction via the API ERROR

$
0
0

first create an order:

url: https://cloudelements.myshopify.com/admin/orders.json

header: {X-Shopify-Access-Token=***}

json body:

{
    "order": {
        "line_items": [
            {
                "variant_id": 855424375,
                "quantity": 1
            }
        ]
    }
}

response:

{
    "total_price_usd": "500.00",
    "order_number": 1058,
    "created_at": "2014-09-24T13:40:59-04:00",
    "source": "307455",
    "line_items": [
        {
            "variant_title": null,
            "fulfillment_status": null,
            "quantity": 1,
            "fulfillable_quantity": 1,
            "fulfillment_service": "manual",
            "gift_card": false,
            "taxable": true,
            "requires_shipping": true,
            "title": "product1",
            "variant_inventory_management": null,
            "product_exists": true,
            "variant_id": 855424375,
            "tax_lines": [],
            "price": "500.00",
            "vendor": null,
            "product_id": 365001855,
            "name": "product1",
            "id": 486204415,
            "grams": 0,
            "sku": null,
            "properties": []
        }
    ],
    "taxes_included": false,
    "buyer_accepts_marketing": false,
    "confirmed": true,
    "total_weight": 0,
    "total_discounts": "0.00",
    "number": 58,
    "updated_at": "2014-09-24T13:40:59-04:00",
    "currency": "USD",
    "id": 270356879,
    "email": "",
    "source_name": "307455",
    "subtotal_price": "500.00",
    "test": false,
    "total_price": "500.00",
    "total_line_items_price": "500.00",
    "total_tax": "0.00",
    "tags": "",
    "token": "6ca37c77728154ae0200265a0cd63c8d",
    "processing_method": "",
    "financial_status": "paid",
    "name": "#1058",
    "gateway": ""
}

 

create a payment in order:

url: 

https://cloudelements.myshopify.com/admin/orders/270356879/transactions.json

header: {X-Shopify-Access-Token=***}

json body:

{
    "transaction": {
        "amount": "10.00",
        "kind": "capture"
    }
}

response:

"Can only capture successful authorizations"


Viewing all articles
Browse latest Browse all 25503

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>