This feature is marked as beta and may be affected by changes. Use with caution for production.

My Payments

With this endpoint, a payment stub with all necessary information for further processing can be created. For example, if a frontend app has received a token for a Credit Card from a PSP, it can create the payment stub with the token, and optionally add a transaction to authorize a certain amount. This payment stub is then picked up by another service that communicates with the PSP to authorize and later charge the Credit Card. This service uses the regular Payment endpoint. The frontend can always view the current state using this endpoint, but not update or delete the payment after the first transaction has been added.

This endpoint can only be used with an access token created with the password flow or with an anonymous session. It gives access to payments that belong to the customer or the anonymous session linked to the access token.

Representations

MyPayment

This is the representation of the Payment that is returned from all of the following endpoints. It represents the limited part of the Payment that can be manipulated through these endpoints.

MyPaymentDraft

A MyPaymentDraft is the object submitted as payload to the Create MyPayment method. The customer field of MyPayment is automatically set with a password flow token. The anonymousId is automatically set with a token for an anonymous session.

MyTransactionDraft

The state is set to the Initial TransactionState.

Get MyPayment by ID

Endpoint: /{projectKey}/me/payments/{id}
Method: GET
OAuth2 Scopes: manage_my_payments:{projectKey}
Response Representation: MyPayment

Query MyPayments

Endpoint: /{projectKey}/me/payments
Method: GET
OAuth2 Scopes: manage_my_payments:{projectKey}
Response Representation: PagedQueryResult with the results array of MyPayment

Query Parameters:

Create MyPayment

Endpoint: /{projectKey}/me/payments
Method: POST
OAuth2 Scopes: manage_my_payments:{projectKey}
Request Representation: MyPaymentDraft
Response Representation: MyPayment

Update MyPayment

Endpoint: /{projectKey}/me/payments/{id}
Method: POST
OAuth2 Scopes: manage_my_payments:{projectKey}
Response Representation: MyPayment
Fields:

Update Actions
Please find below the individual update actions provided on this endpoint.


Set MethodInfoInterface

As described here.

Set MethodInfoMethod

As described here.

Set MethodInfoName

As described here.

Add Transaction

Adds a new financial transaction. It can be used for asynchronous communication, e.g. one process could add a transaction of type Charge in state Initial and a PSP integration could asynchronously take care of executing the charge.

Set CustomField

As described here.

Change AmountPlanned

As described here.

Delete MyPayment

Removes a MyPayment.

Endpoint: /{projectKey}/me/payments/{id}
Method: DELETE
OAuth2 Scopes: manage_my_payments:{projectKey}
Response Representation: MyPayment
Query parameters: