Zum Inhalt springen
meniodevelopermenio DashboardVorschau

POST payouts · Checkout API

POST payouts

Checkout API Profiles
POST/api/v1/profiles/{reference}/balance/payouts

[Coming soon] Postponement support.

Creates a new balance payout.

Parameter

referencestringErforderlich

The unique token identifier or an OTP of the profile.

Request-Header

Content-Type
application/json; charset=utf-8
Authorization
Token <accessToken>
Idempotency-Key
<idempotencyKey>
Security-Token
<securityToken>
Timestamp
<timestamp>
Originaler Blueprint-Ausschnitt
API Blueprint
### POST payouts [POST /api/v1/profiles/{reference}/balance/payouts]

Creates a new balance payout.

+ Parameters
    + reference (string, required) - The unique token identifier or an OTP of the profile.
    
+ Request (application/json; charset=utf-8)

    + Headers

            Authorization: Token <accessToken>
            Idempotency-Key: <idempotencyKey>
            Security-Token: <securityToken>
            Timestamp: <timestamp>
            
    + Attributes (object)
        + amount: 1050 (number, required) - The amount to be paid out to the profile's <TODO>, expressed in the currency's minor unit.
        + currency: EUR (string, required) - The currency of the amount to be paid out to the profile's <TODO>.
        + reservation (object) - Contains balance reservation information. Include to perform the payout against reserved balance.
            + reference: `f032f960-9b87-43eb-b434-48a65d7d3efe` (string, required) - The reference of the reservation that will be paid out.
            + cancelRemainingAmount: true (boolean) - Cancel the reservation after payment, causing any leftover reserved balance to become freely available again without waiting for the reservation to time out.

    + Body

            {
                "amount": 1050,
                "currency": "EUR",
                "reservation": {
                    "reference": "f032f960-9b87-43eb-b434-48a65d7d3efe",
                    "cancelRemainingAmount": true
                }
            }
            
    + Schema

            {
                "type": "object",
                "properties": {
                    "amount": {
                        "type": "number"
                    },
                    "currency": {
                        "type": "string"
                    },
                    "reservation": {
                        "type": "object",
                        "properties": {
                            "reference": {
                                "type": "string",
                                "format": "uuid"
                            },
                            "cancelRemainingAmount": {
                                "type": "boolean"
                            }
                        }
                    }
                }
            }

+ Response 200 (application/json; charset=utf-8)
            
    + Attributes (object)
        + oldAmount: 2050 (number, required) - The old amount before making the payout request, expressed in the currency's minor unit.
        + newAmount: 1000 (number, required) - The new amount after making the payout request, expressed in the currency's minor unit.
        + currency: EUR (string, required) - The currency of the amounts.
        + reservation (object)
            + oldAmountExcludingReservation: 1550 (number) - The profile's balance prior to the transaction, factoring out the reservation that is used for the payout, expressed in the currency's minor unit.
            + newAmountExcludingReservation: 1000 (number) - The profile's balance after the transaction, factoring out the potentially remaining amount of the used reservation, expressed in the currency's minor unit.
            + reservedAmountRemaining: 0 (number) - The remaining amount of the reservation, expressed in the currency's minor unit.
            + reservedAmountUsed: 500 (number) - The amount of the reservation used by the transaction, expressed in the currency's minor unit.
            + unreservedAmountUsed: 550 (number) - The amount of unreserved profile balance used by the transaction in case the reserved amount was insufficient to cover the whole transaction, expressed in the currency's minor unit.


    + Body

            {
                "oldAmount": 2050,
                "newAmount": 1000,
                "currency": "EUR",
                "reservation": {
                    "oldAmountExcludingReservation": 1550,
                    "newAmountExcludingReservation": 1000,
                    "reservedAmountRemaining": 0,
                    "reservedAmountUsed": 500,
                    "unreservedAmountUsed": 550
                }
            }
            
    + Schema

            {
                "type": "object",
                "properties": {
                    "oldAmount": {
                        "type": "number"
                    },
                    "newAmount": {
                        "type": "number"
                    },
                    "currency": {
                        "type": "string"
                    },
                    "reservation": {
                        "type": "object",
                        "properties": {
                            "oldAmountExcludingReservation": {
                                "type": "number"
                            },
                            "newAmountExcludingReservation": {
                                "type": "number"
                            },
                            "reservedAmountRemaining": {
                                "type": "number"
                            },
                            "reservedAmountUsed": {
                                "type": "number"
                            },
                            "unreservedAmountUsed": {
                                "type": "number"
                            }
                        }
                    }
                }
            }