Payments
Add credit card payment
Adds a new credit card payment to a bill of the specified customer. Note that the payment is added to open bill of the customer, either to the specified one or the default one. This operation only serves to record a credit card payment that has already been taken outside of Mews or Mews' payment terminal, and does not actually charge the customer's credit card.
The bill can then be closed manually by a Mews user, or automatically via API with the Close bill operation.
Request
[PlatformAddress]/api/connector/v1/payments/addCreditCard
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Token identifying the client application. |
| string | required | Access token of the client application. |
| string | required | Name and version of the client application. |
| string | required | Unique identifier of the Customer. |
| string | optional | Unique identifier of an open bill of the customer where to assign the payment. |
| string | optional | Unique identifier of the reservation the payment belongs to. |
| required | Amount of the credit card payment. | |
| required | Credit card details. | |
| string | optional | Unique identifier of an Accounting category to be assigned to the credit card payment. |
| string | optional | Identifier of the payment receipt. |
| string | optional | Additional payment notes. |
Credit card parameters
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Type of the credit card, one of: |
| string | required | Obfuscated credit card number. At most first six digits and last four digits can be specified, the digits in between should be replaced with |
| string | optional | Expiration of the credit card in format |
| string | required | Name of the card holder. |
Response
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of the Credit card. |
Add external payment
Adds a new external payment to a bill of the specified customer. An external payment represents a payment that is tracked outside of the system. Note this operation supports Portfolio Access Tokens.
Request
[PlatformAddress]/api/connector/v1/payments/addExternal
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Token identifying the client application. |
| string | required | Access token of the client application. |
| string | required | Name and version of the client application. |
| string | optional | Unique identifier of the Enterprise. Required when using a Portfolio Access Token, ignored otherwise. |
|
|
|
|
| string | required | |
| string | optional | Unique identifier of an open bill of the customer where to assign the payment. |
| string | optional | Unique identifier of the reservation the payment belongs to. |
| required | Amount of the external card payment. | |
| string | optional | Identifier of the payment from external system. |
| string Add external payment type | optional | Type of the external payment. *Except for the enterprises based in the French Legal Environment. Unspecified is considered as fraud. |
| string | optional | Unique identifier of an Accounting category to be assigned to the external payment. |
| string | optional | Additional payment notes. |
Add external payment type
Cash
CreditCard
Invoice
WireTransfer
Bacs
CrossSettlement
Twint
DepositWireTransfer
Response
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of the Payment item. |
Add alternative payment
Adds a new alternative payment to a specified customer.
Pre-requisites: The property must have the relevant type of alternative payment method enabled in their Mews subscriptions in order to accept such payments in their Mews environment. Please ask the property to confirm.
Request
[PlatformAddress]/api/connector/v1/payments/addAlternative
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Token identifying the client application. |
| string | required | Access token of the client application. |
| string | required | Name and version of the client application. |
| string | required | Unique identifier of the Customer. |
|
|
|
|
|
|
|
|
| required | Amount of the alternative payment. | |
| string | optional | Unique identifier of the reservation the payment belongs to. |
| required | Data specific to particular alternative payment method. |
Alternative payment method data
Property | Type | Contract | Description |
---|---|---|---|
| required | Type of alternative payment method (e.g. | |
| object iDEAL data | optional | iDEAL payment method data. Required when |
| object SEPA Direct Debit data | optional | SEPA Direct Debit payment method data. Required when |
Alternative payment method data discriminator
Ideal
- iDEAL data.ApplePay
- no additional data.GooglePay
- no additional data.SepaDirectDebit
- SEPA Direct Debit data.
iDEAL data
Property | Type | Contract | Description |
---|---|---|---|
| string | required | URL where the customer will be redirected after completing their iDEAL payment. |
SEPA Direct Debit data
Property | Type | Contract | Description |
---|---|---|---|
| string | required | The customer's bank account number in IBAN format. |
| string | required | Full name of the customer. |
| string | required | Email address of the customer. |
| string | required | The user agent of the browser from which the Mandate was accepted by the customer. |
| string | required | The IP address from which the Mandate was accepted by the customer. |
Alternative payment methods Deprecated!
Ideal
ApplePay
GooglePay
Response
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of the created payment. |
| required | Next action to take in order to complete the payment. |
Alternative payment next action
Property | Type | Contract | Description |
---|---|---|---|
| required | Determines type of value. | |
| string | required | String value depending on Payment next action discriminator. |
Payment next action discriminator
RedirectToUrl
- Redirect customer to a URL where they can complete their payment.
Get all payments
Returns all payments in the system, filtered by various parameters. At least one filter parameter must be specified. Note this operation uses Pagination and supports Portfolio Access Tokens.
Request
[PlatformAddress]/api/connector/v1/payments/getAll
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Token identifying the client application. |
| string | required | Access token of the client application. |
| string | required | Name and version of the client application. |
| array of string | optional, max 1000 items | Unique identifiers of the Enterprises. If not specified, the operation returns the payments for all enterprises within scope of the Access Token. |
| array of string | optional, max 1000 items | Unique identifiers of specific Payments. Required if no other filter is provided. |
| array of string | optional, max 1000 items | Unique identifiers of specific Bills to which payments are assigned. Required if no other filter is provided. |
| array of string | optional, max 1000 items | Unique identifiers of specific Reservations to which payments belong. Required if no other filter is provided. |
| optional, max length 3 months | Time interval during which the Payment was created. Required if no other filter is provided. | |
| optional, max length 3 months | Time interval during which the Payment was updated. Required if no other filter is provided. | |
| optional, max length 3 months | Time interval during which the Payment was charged. Required if no other filter is provided. | |
| optional, max length 3 months | Time interval during which the Payment was closed. Required if no other filter is provided. | |
| optional, max length 3 months | Interval in which the Payments were settled. | |
| array of string Accounting state | optional | Accounting state of the item. |
| array of string Payment state | optional | Payment state of the item. |
| string | optional | ISO-4217 code of the Currency the item costs should be converted to. |
| string Payment type | optional | Payment state of the item. |
| required | Limitation on the quantity of data returned. |
Response
Property | Type | Contract | Description |
---|---|---|---|
| array of Payment | required | The list of filtered payments. |
| string | required | Unique identifier of the last and hence oldest payment returned. This can be used in Limitation in a subsequent request to fetch the next batch of payments. |
Refund payment
Refunds a specified payment. Note only credit card or alternative payments can be refunded. The refund is itself a payment, so to get more information about the refund, use Get all payments with the identifier from RefundId
. Note this operation supports Portfolio Access Tokens.
Request
[PlatformAddress]/api/connector/v1/payments/refund
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Token identifying the client application. |
| string | required | Access token of the client application. |
| string | required | Name and version of the client application. |
| string | optional | Unique identifier of the Enterprise. Required when using a Portfolio Access Token, ignored otherwise. |
| string | required | Unique identifier of specific Payment. |
| string | required | Unique identifier of the account (for example Customer) the payment belongs to. |
| string | required | Refund reason. |
| decimal | optional | Refund amount. If not provided, the whole payment will be refunded. |
Response
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of specific Payment. |
| string | required | Unique identifier of refund. |
| required | Type of refund. | |
| required | Amount that was refunded. |
Payment
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of the payment. |
| string | required | Unique identifier of the Enterprise. |
| string | required | Unique identifier of the account (for example Customer) the payment belongs to. |
| string | required | A discriminator specifying the type of account, e.g. customer or company. |
| string | optional | Unique identifier of the Bill the payment is assigned to. |
| string | optional | Unique identifier of the Reservation the payment belongs to. |
| string | optional | Unique identifier of the Accounting category the payment belongs to. |
| required | Payment's amount, negative amount represents either rebate or a payment. | |
| required | Payment's original amount, negative amount represents either rebate or a payment. Contains the earliest known value in conversion chain. | |
| string | optional | Additional notes. |
| string | optional | Identifier of the settled payment from the external system (ApplePay/GooglePay). |
| string | optional | Date and time of the item consumption in UTC timezone in ISO 8601 format. |
| string | optional | Date and time of the payment bill closure in UTC timezone in ISO 8601 format. |
| string | optional | Charged date and time of the payment in UTC timezone in ISO 8601 format. |
| string | required | Creation date and time of the payment created in UTC timezone in ISO 8601 format. |
| string | required | Last update date and time of the payment in UTC timezone in ISO 8601 format. |
| string | required | Date and time of the payment settlement in UTC timezone in ISO 8601 format. |
| string Accounting item state | required | Accounting state of the payment. |
| string Payment state | required | Payment state of the payment. |
| string | optional | Additional unique identifier of the payment. |
| string Payment type | required | Payment type, e.g. whether credit card or cash. |
| string Payment kind | required | Payment kind, e.g. whether payment or refund. |
| object Payment data | optional | Additional payment data. |
Payment data
Property | Type | Contract | Description |
---|---|---|---|
| string Payment data discriminator | required | Discriminator pointing to the fields within this object that contains additional data. |
| object Credit card data | optional | Contains additional data in the case of a card payment. |
| object Invoice data | optional | Contains additional data in the case of an invoice payment. |
| object External data | optional | Contains additional data in the case of an external payment. |
| object Ghost data | optional | Contains additional data in the case of a ghost payment. |
Payment data discriminator
CreditCard
Invoice
External
Ghost
...
CreditCard payment data
Property | Type | Contract | Description |
---|---|---|---|
| string | optional | Unique identifier of the payment card. |
| object Credit card transaction | optional | The credit card payment transaction. |
Invoice payment data
Property | Type | Contract | Description |
---|---|---|---|
| string | optional | Unique identifier of the invoice Bill. |
| string Invoice payment type | required | Type of the invoice payment. |
External payment data
Property | Type | Contract | Description |
---|---|---|---|
| string External payment type | required | Type of the external payment. *Except for enterprises based in the French Legal Environment. |
| string | optional | Identifier of the payment from external system. |
Ghost payment data
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of the original payment. |
Credit card transaction
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of the Payment item. |
| string | optional | Identifier of the settlement. |
| string | optional | Settlement date and time in UTC timezone in ISO 8601 format. |
| optional | Transaction fee - this includes an estimate of bank charges. | |
| optional | Transaction fee (adjusted) - this is the final confirmed transaction fee, including confirmed bank charges. | |
| required | Charged amount of the transaction. | |
| optional | Settled amount of the transaction. |
Accounting item state
Open
- Accounting items which carry a non-zero value, are open, and have not been closed on a bill or invoice.Closed
- Accounting items which carry a non-zero value and have been closed on a bill or invoice.Inactive
- Accounting items which are either of zero value and have not been canceled, if the state of the payment item is Pending or Failed, or items of optional reservations. Until the reservation is confirmed, all its accounting items are Inactive.Canceled
- Accounting items which have been canceled, regardless of whether the item is of zero value....
Payment state
Charged
Canceled
Pending
Failed
Verifying
Payment type
Payment
- Any type of payment, used only for filteringCreditCardPayment
AlternativePayment
CashPayment
InvoicePayment
ExternalPayment
...
Payment kind
Payment
Chargeback
ChargebackReversal
Refund
...
Invoice payment type
Receivable
Balancing
UnderpaymentBalancingReceivable
OverpaymentBalancingReceivable
Overpayment
External payment type
Unspecified
BadDebts
Bacs
WireTransfer
Invoice
ExchangeRateDifference
Complimentary
Reseller
ExchangeRoundingDifference
Barter
Commission
BankCharges
CrossSettlement
Cash
CreditCard
Prepayment
Cheque
Bancontact
IDeal
PayPal
GiftCard
LoyaltyPoints
ChequeVacances
OnlinePayment
CardCheck
PaymentHubRedirection
Voucher
MasterCard
Visa
Amex
Discover
DinersClub
Jcb
UnionPay
Twint
Reka
LoyaltyCard
PosDiningAndSpaReward
DirectDebit
DepositCheck
DepositCash
DepositCreditCard
DepositWireTransfer
...
Refund type
CreditCardPayment
AlternativePayment
...
Last updated