Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple partial capture for one payment #119

Open
DanielePalombo opened this issue Jul 13, 2022 · 1 comment
Open

Allow multiple partial capture for one payment #119

DanielePalombo opened this issue Jul 13, 2022 · 1 comment

Comments

@DanielePalombo
Copy link
Contributor

With Adyen Payment is possible to make multiple partial capture of one transaction.

Bolt doesn't create multiple transactions, so we should update the amount of the captured payment.
The payload is the following:

{
    "type": "capture",
    "object": "transaction",
    "data": {
        "id": "TAgkymAmUwoaC",
        "type": "cc_payment",
        "processor": "adyen_gateway",
        "date": 1657746137355,
        "reference": "W6GD-Q4JX-LWRM",
        "status": "authorized",
        "from_user": {
            "id": "CA3oTX52EzRGi",
            "first_name": "Daniel",
            "last_name": "Palombo",
            "phones": [
                {
                    "number": "3332334456",
                    "country_code": "1"
                }
            ],
            "emails": [
                {
                    "address": "[email protected]"
                }
            ]
        },
        "from_credit_card": {
            "id": "CAgFHHvPrBNUy",
            "last4": "0002",
            "bin": "370000",
            "expiration": 1898553600000,
            "network": "American Express",
            "display_network": "American Express",
            "token_type": "bolt",
            "status": "active"
        },
        "amount": {
            "amount": 3359,
            "currency": "USD",
            "currency_symbol": "$"
        },
        "order": {
            "cart": {
                "order_reference": "R857678313",
                "display_id": "R857678313",
                "total_amount": {
                    "amount": 3359,
                    "currency": "USD",
                    "currency_symbol": "$"
                },
                "items": [
                    {
                        "reference": "",
                        "name": "Developers Cap",
                        "total_amount": {
                            "amount": 0,
                            "currency": "USD",
                            "currency_symbol": "$"
                        },
                        "unit_price": {
                            "amount": 2699,
                            "currency": "USD",
                            "currency_symbol": "$"
                        },
                        "tax_amount": {
                            "amount": 0,
                            "currency": "USD",
                            "currency_symbol": "$"
                        },
                        "quantity": 1,
                        "sku": "RUB-SNC02",
                        "properties": [],
                        "taxable": true,
                        "type": "physical"
                    }
                ],
                "shipments": [
                    {
                        "shipping_address": {
                            "id": "AA5K48SFUvF7j",
                            "street_address1": "380 Degraw Street",
                            "locality": "Brooklyn",
                            "region": "NM",
                            "region_code": "NM",
                            "postal_code": "11231",
                            "country_code": "US",
                            "name": "Daniel Palombo",
                            "first_name": "Daniel",
                            "last_name": "Palombo",
                            "phone_number": "3332334456",
                            "email_address": "[email protected]"
                        },
                        "shipping_method": "unknown",
                        "cost": {
                            "amount": 0,
                            "currency": "USD",
                            "currency_symbol": "$"
                        },
                        "tax_amount": {
                            "amount": 0,
                            "currency": "USD",
                            "currency_symbol": "$"
                        }
                    }
                ],
                "subtotal_amount": {
                    "amount": 0,
                    "currency": "USD",
                    "currency_symbol": "$"
                },
                "shipping_amount": {
                    "amount": 0,
                    "currency": "USD",
                    "currency_symbol": "$"
                },
                "discount_amount": {
                    "amount": 0,
                    "currency": "USD",
                    "currency_symbol": "$"
                }
            }
        },
        "authorization": {
            "auth": "X5MZPHHC63RZNN82",
            "metadata": {
                "processor_card_token": "GPS6FQDMX2M84H82",
                "processor_shopperReference": "R857678313",
                "processor_token_alias": ""
            },
            "reason": "none",
            "status": "succeeded"
        },
        "captures": [
            {
                "id": "CAica3zcaKCbJ",
                "status": "succeeded",
                "amount": {
                    "amount": 1000,
                    "currency": "USD",
                    "currency_symbol": "$"
                }
            },
            {
                "id": "CA79iG9PZSx3N",
                "status": "succeeded",
                "amount": {
                    "amount": 500,
                    "currency": "USD",
                    "currency_symbol": "$"
                }
            },
            {
                "id": "CAmeiPjzC5B5H",
                "status": "succeeded",
                "amount": {
                    "amount": 300,
                    "currency": "USD",
                    "currency_symbol": "$"
                }
            }
        ],
        "refund_transactions": [],
        "risk_signals": {
            "ip_address": "18.207.136.103",
            "time_on_site": "00:00:00",
            "http_headers": {
                "accept": "*/*",
                "accept_encoding": "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
                "accept_language": "",
                "connection": "",
                "host": "api-sandbox.bolt.com",
                "referer": "",
                "user_agent": "Ruby"
            }
        },
        "capture_type": "manual"
    }
}

Question for Bolt:

  1. Is Adyen the only PSP that supports multiple partial captures?
  2. Is possible that captures will be in different currencies?
@stale
Copy link

stale bot commented Nov 11, 2022

This issue has been automatically marked as stale because it has not had recent activity. It might be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 11, 2022
@gsmendoza gsmendoza removed the stale label Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants