mirror of
https://github.com/stoatchat/rust-mollie-sdk.git
synced 2026-07-01 05:09:43 -04:00
14 KiB
14 KiB
PaymentResponse
Properties
| Name | Type | Description | Notes |
|---|---|---|---|
| resource | Option<String> | Indicates the response contains a payment object. Will always contain the string payment for this endpoint. |
[optional][readonly] |
| id | Option<String> | [optional] | |
| mode | Option<models::Mode> | [optional] | |
| description | Option<String> | The description of the payment. This will be shown to your customer on their card or bank statement when possible. We truncate the description automatically according to the limits of the used payment method. The description is also visible in any exports you generate. We recommend you use a unique identifier so that you can always link the payment to the order in your back office. This is particularly useful for bookkeeping. The maximum length of the description field differs per payment method, with the absolute maximum being 255 characters. The API will not reject strings longer than the maximum length but it will truncate them to fit. | [optional] |
| amount | Option<models::Amount> | The amount that you want to charge, e.g. {currency:\"EUR\", value:\"1000.00\"} if you would want to charge €1000.00. You can find the minimum and maximum amounts per payment method in our help center. Additionally, they can be retrieved using the Get method endpoint. If a tip was added for a Point-of-Sale payment, the amount will be updated to reflect the initial amount plus the tip amount. |
[optional] |
| amount_refunded | Option<models::Amount> | The total amount that is already refunded. Only available when refunds are available for this payment. For some payment methods, this amount may be higher than the payment amount, for example to allow reimbursement of the costs for a return shipment to the customer. | [optional][readonly] |
| amount_remaining | Option<models::Amount> | The remaining amount that can be refunded. Only available when refunds are available for this payment. | [optional][readonly] |
| amount_captured | Option<models::Amount> | The total amount that is already captured for this payment. Only available when this payment supports captures. | [optional][readonly] |
| amount_charged_back | Option<models::Amount> | The total amount that was charged back for this payment. Only available when the total charged back amount is not zero. | [optional][readonly] |
| settlement_amount | Option<models::Amount> | This optional field will contain the approximate amount that will be settled to your account, converted to the currency your account is settled in. Any amounts not settled by Mollie will not be reflected in this amount, e.g. PayPal or gift cards. If no amount is settled by Mollie the settlementAmount is omitted from the response. Please note that this amount might be recalculated and changed when the status of the payment changes. We suggest using the List balance transactions endpoint instead to get more accurate settlement amounts for your payments. |
[optional][readonly] |
| redirect_url | Option<String> | The URL your customer will be redirected to after the payment process. It could make sense for the redirectUrl to contain a unique identifier – like your order ID – so you can show the right page referencing the order when your customer returns. The parameter is normally required, but can be omitted for recurring payments (sequenceType: recurring) and for Apple Pay payments with an applePayPaymentToken. |
[optional] |
| cancel_url | Option<String> | The URL your customer will be redirected to when the customer explicitly cancels the payment. If this URL is not provided, the customer will be redirected to the redirectUrl instead — see above. Mollie will always give you status updates via webhooks, including for the canceled status. This parameter is therefore entirely optional, but can be useful when implementing a dedicated customer-facing flow to handle payment cancellations. |
[optional] |
| webhook_url | Option<String> | The webhook URL where we will send payment status updates to. The webhookUrl is optional, but without a webhook you will miss out on important status changes to your payment. The webhookUrl must be reachable from Mollie's point of view, so you cannot use localhost. If you want to use webhook during development on localhost, you must use a tool like ngrok to have the webhooks delivered to your local machine. |
[optional] |
| lines | Option<Vecmodels::EntityPaymentResponseLinesInner> | Optionally provide the order lines for the payment. Each line contains details such as a description of the item ordered and its price. All lines must have the same currency as the payment. Required for payment methods billie, in3, klarna, riverty and voucher. |
[optional] |
| billing_address | Option<models::EntityPaymentBillingAddress> | [optional] | |
| shipping_address | Option<models::PaymentAddress> | The customer's shipping address details. We advise to provide these details to improve fraud protection and conversion. Should include email or a valid postal address consisting of streetAndNumber, postalCode, city and country. |
[optional] |
| locale | Option<models::LocaleResponse> | Allows you to preset the language to be used in the hosted payment pages shown to the customer. Setting a locale is highly recommended and will greatly improve your conversion rate. When this parameter is omitted the browser language will be used instead if supported by the payment method. You can provide any xx_XX format ISO 15897 locale, but our hosted payment pages currently only support the specified languages. For bank transfer payments specifically, the locale will determine the target bank account the customer has to transfer the money to. We have dedicated bank accounts for Belgium, Germany, and The Netherlands. Having the customer use a local bank account greatly increases the conversion and speed of payment. |
[optional] |
| country_code | Option<String> | This optional field contains your customer's ISO 3166-1 alpha-2 country code, detected by us during checkout. This field is omitted if the country code was not detected. | [optional][readonly] |
| method | Option<models::MethodResponse> | The payment method used for this transaction. If a specific method was selected during payment initialization, this field reflects that choice. | [optional] |
| issuer | Option<String> | Only relevant for iDEAL, KBC/CBC, gift card, and voucher payments. ⚠️ With the introduction of iDEAL 2 in 2025, this field will be ignored for iDEAL payments. For more information on the migration, refer to our help center. Some payment methods are a network of connected banks or card issuers. In these cases, after selecting the payment method, the customer may still need to select the appropriate issuer before the payment can proceed. We provide hosted issuer selection screens, but these screens can be skipped by providing the issuer via the API up front. The full list of issuers for a specific method can be retrieved via the Methods API by using the optional issuers include. A valid issuer for iDEAL is for example ideal_INGBNL2A (for ING Bank). |
[optional] |
| restrict_payment_methods_to_country | Option<String> | For digital goods in most jurisdictions, you must apply the VAT rate from your customer's country. Choose the VAT rates you have used for the order to ensure your customer's country matches the VAT country. Use this parameter to restrict the payment methods available to your customer to those from a single country. If available, the credit card method will still be offered, but only cards from the allowed country are accepted. The field expects a country code in ISO 3166-1 alpha-2 format, for example NL. |
[optional] |
| metadata | Option<models::Metadata> | [optional] | |
| capture_mode | Option<models::CaptureModeResponse> | [optional] | |
| capture_delay | Option<String> | Only relevant if you wish to manage authorization and capturing separately. Some payment methods allow placing a hold on the card or bank account. This hold or 'authorization' can then at a later point either be 'captured' or canceled. By default, we charge the customer's card or bank account immediately when they complete the payment. If you set a capture delay however, we will delay the automatic capturing of the payment for the specified amount of time. For example 8 hours or 2 days. To schedule an automatic capture, the captureMode must be set to automatic. The maximum delay is 7 days (168 hours). Possible values: ... hours ... days |
[optional] |
| capture_before | Option<String> | Indicates the date before which the payment needs to be captured, in ISO 8601 format. From this date onwards we can no longer guarantee a successful capture. The parameter is omitted if the payment is not authorized (yet). | [optional][readonly] |
| application_fee | Option<models::EntityPaymentApplicationFee> | [optional] | |
| routing | Option<Vecmodels::EntityPaymentRouteResponse> | This functionality is not enabled by default. Reach out to our partner management team if you wish to use it. With Mollie Connect you can charge fees on payments that your app is processing on behalf of other Mollie merchants. If you create payments on your own account that you want to split between yourself and one or more connected merchants, you can use this routing parameter to route the payment accordingly. The routing parameter should contain an array of objects, with each object describing the destination for a specific portion of the payment. It is not necessary to indicate in the array which portion goes to yourself. After all portions of the total payment amount have been routed, the amount left will be routed to the current organization automatically. If instead you use OAuth to create payments on a connected merchant's account, refer to the applicationFee parameter. |
[optional] |
| sequence_type | Option<models::SequenceTypeResponse> | Only relevant for recurring payments. Indicate which part of a recurring sequence this payment is for. Recurring payments can only take place if a mandate is available. A common way to establish such a mandate is through a first payment. With a first payment, the customer agrees to automatic recurring charges taking place on their account in the future. If set to recurring, the customer's card is charged automatically. Defaults to oneoff, which is a regular non-recurring payment. For PayPal payments, recurring is only possible if your connected PayPal account allows it. You can call our Methods API with parameter sequenceType: first to discover which payment methods on your account are set up correctly for recurring payments. |
[optional] |
| subscription_id | Option<String> | [optional] | |
| mandate_id | Option<String> | [optional] | |
| customer_id | Option<String> | [optional] | |
| profile_id | Option<String> | The identifier referring to the profile this entity belongs to. Most API credentials are linked to a single profile. In these cases the profileId can be omitted in the creation request. For organization-level credentials such as OAuth access tokens however, the profileId parameter is required. |
[optional] |
| settlement_id | Option<String> | [optional] | |
| order_id | Option<String> | [optional] | |
| status | Option<models::PaymentStatus> | [optional][readonly] | |
| status_reason | Option<models::StatusReason> | [optional] | |
| is_cancelable | Option<bool> | Whether the payment can be canceled. This parameter is omitted if the payment reaches a final state. | [optional][readonly] |
| details | Option<models::EntityPaymentResponseDetails> | [optional] | |
| created_at | Option<String> | The entity's date and time of creation, in ISO 8601 format. | [optional][readonly] |
| authorized_at | Option<String> | The date and time the payment became authorized, in ISO 8601 format. This parameter is omitted if the payment is not authorized (yet). | [optional][readonly] |
| paid_at | Option<String> | The date and time the payment became paid, in ISO 8601 format. This parameter is omitted if the payment is not completed (yet). | [optional][readonly] |
| canceled_at | Option<String> | The date and time the payment was canceled, in ISO 8601 format. This parameter is omitted if the payment is not canceled (yet). | [optional][readonly] |
| expires_at | Option<String> | The date and time the payment will expire, in ISO 8601 format. This parameter is omitted if the payment can no longer expire. | [optional][readonly] |
| expired_at | Option<String> | The date and time the payment was expired, in ISO 8601 format. This parameter is omitted if the payment did not expire (yet). | [optional][readonly] |
| failed_at | Option<String> | The date and time the payment failed, in ISO 8601 format. This parameter is omitted if the payment did not fail (yet). | [optional][readonly] |
| due_date | Option<String> | The date by which the payment should be completed in YYYY-MM-DD format |
[optional] |
| testmode | Option<bool> | Whether to create the entity in test mode or live mode. Most API credentials are specifically created for either live mode or test mode, in which case this parameter can be omitted. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting testmode to true. |
[optional] |
| _links | Option<models::EntityPaymentLinks> | [optional] |