# Payments A Payment represents a series of logically connected financial transactions like reserving, charging, or refunding money. A Payment holds information about the payment service provider (PSP), the payment method used, any related transactions, and the current state of the Payment. An [Order](https://docs.commercetools.com/api/projects/orders.md) or a [Cart](https://docs.commercetools.com/api/projects/carts.md) can reference a set of Payments using the [PaymentInfo](https://docs.commercetools.com/urn?urn=ctp%3Aapi%3Atype%3APaymentInfo) object. A Payment can also reference a [Customer](https://docs.commercetools.com/api/projects/customers.md), or an [anonymous session](https://docs.commercetools.com/api/authorization.md#tokens-for-anonymous-sessions). The actual financial process is carried out by an external PSP, which is connected to the API by [PSP-specific integrations](https://marketplace.commercetools.com/integrations/payment-service-providers). If you are using [Checkout](https://docs.commercetools.com/checkout/overview.md) for your checkout solution, the [Checkout Payment Intents API](https://docs.commercetools.com/checkout/payment-intents-api.md) lets you request the PSP to perform actions throughout the financial process, such as payment capture, refund, and authorization cancellation. Learn more about how to implement payment integration as part of a custom checkout flow in our self-paced Implement a custom checkout module. ## Representations #### Payment See API type definition [Payment](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APayment). ##### PaymentDraft See API type definition [PaymentDraft](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentDraft). ##### PaymentPagedQueryResponse See API type definition [PaymentPagedQueryResponse](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentPagedQueryResponse). ##### PaymentReference See API type definition [PaymentReference](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentReference). ##### PaymentKeyReference See API type definition [PaymentKeyReference](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aimport%3Atype%3APaymentKeyReference). ##### PaymentResourceIdentifier See API type definition [PaymentResourceIdentifier](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentResourceIdentifier). #### PaymentMethodInfo See API type definition [PaymentMethodInfo](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentMethodInfo). ##### PaymentMethodInfoDraft See API type definition [PaymentMethodInfoDraft](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentMethodInfoDraft). #### PaymentStatus See API type definition [PaymentStatus](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentStatus). ##### PaymentStatusDraft See API type definition [PaymentStatusDraft](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentStatusDraft). #### Transaction See API type definition [Transaction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3ATransaction). ##### TransactionDraft See API type definition [TransactionDraft](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3ATransactionDraft). ##### TransactionType See API type definition [TransactionType](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3ATransactionType). ##### TransactionState See API type definition [TransactionState](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3ATransactionState). ## Get Payment ### Get Payment by ID See API endpoint definition [GET /\{projectKey}/payments/\{id}](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fpayments%2F%7Bid%7D%3AGET). ### Get Payment by Key See API endpoint definition [GET /\{projectKey}/payments/key=\{key}](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fpayments%2Fkey%3D%7Bkey%7D%3AGET). ## Query Payments See API endpoint definition [GET /\{projectKey}/payments](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fpayments%3AGET). ## Check if Payment exists ### Check if Payment exists by ID See API endpoint definition [HEAD /\{projectKey}/payments/\{id}](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fpayments%2F%7Bid%7D%3AHEAD). ### Check if Payment exists by Key See API endpoint definition [HEAD /\{projectKey}/payments/key=\{key}](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fpayments%2Fkey%3D%7Bkey%7D%3AHEAD). ### Check if Payment exists by Query Predicate See API endpoint definition [HEAD /\{projectKey}/payments](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fpayments%3AHEAD). ## Create Payment See API endpoint definition [POST /\{projectKey}/payments](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fpayments%3APOST). ## Update Payment ### Update Payment by ID See API endpoint definition [POST /\{projectKey}/payments/\{id}](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fpayments%2F%7Bid%7D%3APOST). ### Update Payment by Key See API endpoint definition [POST /\{projectKey}/payments/key=\{key}](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fpayments%2Fkey%3D%7Bkey%7D%3APOST). ## Update actions #### On Payment ##### Set Key See API type definition [PaymentSetKeyAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentSetKeyAction). ##### Change AmountPlanned See API type definition [PaymentChangeAmountPlannedAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentChangeAmountPlannedAction). ##### Set Customer See API type definition [PaymentSetCustomerAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentSetCustomerAction). ##### Set AnonymousId See API type definition [PaymentSetAnonymousIdAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentSetAnonymousIdAction). ##### Set InterfaceId See API type definition [PaymentSetInterfaceIdAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentSetInterfaceIdAction). ##### Set MethodInfo See API type definition [PaymentSetMethodInfoAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentSetMethodInfoAction). ##### Set MethodInfo Interface See API type definition [PaymentSetMethodInfoInterfaceAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentSetMethodInfoInterfaceAction). ##### Set MethodInfo Method See API type definition [PaymentSetMethodInfoMethodAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentSetMethodInfoMethodAction). ##### Set MethodInfo Name See API type definition [PaymentSetMethodInfoNameAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentSetMethodInfoNameAction). ##### Set MethodInfo Token See API type definition [PaymentSetMethodInfoTokenAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentSetMethodInfoTokenAction). ##### Set MethodInfo InterfaceAccount See API type definition [PaymentSetMethodInfoInterfaceAccountAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentSetMethodInfoInterfaceAccountAction). ##### Set MethodInfo Custom Type See API type definition [PaymentSetMethodInfoCustomTypeAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentSetMethodInfoCustomTypeAction). ##### Set MethodInfo CustomField See API type definition [PaymentSetMethodInfoCustomFieldAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentSetMethodInfoCustomFieldAction). ##### Set StatusInterfaceCode See API type definition [PaymentSetStatusInterfaceCodeAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentSetStatusInterfaceCodeAction). ##### Set StatusInterfaceText See API type definition [PaymentSetStatusInterfaceTextAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentSetStatusInterfaceTextAction). ##### Transition State See API type definition [PaymentTransitionStateAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentTransitionStateAction). ##### Add Transaction See API type definition [PaymentAddTransactionAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentAddTransactionAction). ##### Add InterfaceInteraction See API type definition [PaymentAddInterfaceInteractionAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentAddInterfaceInteractionAction). ##### Set Custom Type See API type definition [PaymentSetCustomTypeAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentSetCustomTypeAction). ##### Set CustomField See API type definition [PaymentSetCustomFieldAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentSetCustomFieldAction). #### On Transaction ##### Change TransactionState See API type definition [PaymentChangeTransactionStateAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentChangeTransactionStateAction). ##### Change TransactionTimestamp See API type definition [PaymentChangeTransactionTimestampAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentChangeTransactionTimestampAction). ##### Change TransactionInteractionId See API type definition [PaymentChangeTransactionInteractionIdAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentChangeTransactionInteractionIdAction). ##### Set TransactionInterfaceId See API type definition [PaymentSetTransactionInterfaceIdAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentSetTransactionInterfaceIdAction). ##### Set Transaction Custom Type See API type definition [PaymentSetTransactionCustomTypeAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentSetTransactionCustomTypeAction). ##### Set Transaction CustomField See API type definition [PaymentSetTransactionCustomFieldAction](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Atype%3APaymentSetTransactionCustomFieldAction). ## Delete Payment ### Delete Payment by ID See API endpoint definition [DELETE /\{projectKey}/payments/\{id}](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fpayments%2F%7Bid%7D%3ADELETE). ### Delete Payment by Key See API endpoint definition [DELETE /\{projectKey}/payments/key=\{key}](https://docs.commercetools.com/api/projects/payments.md?urn=ctp%3Aapi%3Aendpoint%3A%2F%7BprojectKey%7D%2Fpayments%2Fkey%3D%7Bkey%7D%3ADELETE). ## Related pages - [Section overview page](https://docs.commercetools.com/api.md) - [Previous page: Payment Methods](https://docs.commercetools.com/api/projects/payment-methods.md) - [Next page: Shopping Lists](https://docs.commercetools.com/api/projects/shoppingLists.md)