Payment

Authorizing a payment

post

Authorizes a given payment.

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : Needed to perform a payment authorization flow by a tenant employee.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name. Note: The tenant name should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Body
paymentModeIdstringOptional

Identifier of a payment mode configured in the payment-gateway service for a given tenant.

creditCardTokenstringOptional

Indicates a payment method token, usually generated on a frontend site, when an user provides a credit card information.

threeDSTokenstringOptional

Contains a token generated during the 3DS authentication process.

browserInfostringOptional

Holds information related to the user's web browser.

clientIPstringOptional

Stores the IP address of the client or user making the request.

amountToAuthorizenumberOptional

Amount that should be authorized.

currencystringOptional

Currency for the amount that should be authorized.

Responses
chevron-right
200

Payment authorized

application/json
successfulbooleanOptional

Indicates if the authorization process finished with success.

paymentTransactionIdstringOptional

Unique payment transaction identifier.

authorizationTokenstringOptional

Authorization token

externalPaymentRedirectURLstringOptional

Indicates a URL address where a user should be redirected in order to finish the authorization process.

externalPaymentHttpMethodstringOptional

Indicates a HTTP Method which should be used in order to finish the authorization process.

requiresExternalPaymentbooleanOptional

Indicates if a redirect to an external site is required in order to finish the authorization flow.

post
/payment-gateway/{tenant}/payment/authorize

Capturing a payment

post

Creates a flow to capture a given payment transaction. The capture operation requires transactionId, thus it can be invoked only if the payment had been previously authorized.

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : Needed to perform a payment capture flow by a tenant employee.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name. Note: The tenant name should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
transactionIdstringRequired

Unique identifier of a payment transaction.

Body
amountnumberOptional

Amount that should be captured. The amount should not be greater than amount that was authorized.

currencystringOptional

Currency for the amount that should be captured.

Responses
chevron-right
200

Payment capture response

application/json
successfulbooleanOptional

Indicates if the operation finished with success or not.

messagestringOptional

In case of failed operation, the field provides error details.

captureIdstringOptional

Identifier of a capture operation that is returned by a payment provider.

post
/payment-gateway/{tenant}/payment/{transactionId}/capture

Refunding a payment

post

Creates a flow to return a given payment. The refund operation requires transactionId, thus it can be invoked only if the payment has been authorized and captured previously.

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : Needed to perform a payment refund flow by a tenant employee.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name. Note: The tenant name should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
transactionIdstringRequired

Unique identifier of a payment transaction.

Body
amountnumberOptional

Amount that should be refunded. The amount should not be greater than amount that was captured.

currencystringOptional

Currency for the amount that should be refunded.

captureIdstringOptional

Capture identifier. The value is mandatory only if there were more captures for a payment and the refund should be related to a specific capture. In another case the value can be skipped and the capture related to the payment will be chosen automatically.

Responses
chevron-right
200

Payment transaction response

application/json
successfulbooleanOptional

Indicates if the operation finished with success or not.

messagestringOptional

In case of failed operation, the field provides error details.

post
/payment-gateway/{tenant}/payment/{transactionId}/refund

Cancelling a payment

post

Creates a flow to cancel a given payment transaction. The cancel operation requires transactionId, thus it can be invoked only if the payment has been authorized previously.

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : Needed to perform a payment cancel flow by a tenant employee.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name. Note: The tenant name should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
transactionIdstringRequired

Unique identifier of a payment transaction.

Responses
chevron-right
200

Payment transaction response

application/json
successfulbooleanOptional

Indicates if the operation finished with success or not.

messagestringOptional

In case of failed operation, the field provides error details.

post
/payment-gateway/{tenant}/payment/{transactionId}/cancel

Last updated

Was this helpful?