Payment frontend

Initializing a payment

post

Initializes a payment by accepting a request sent from the frontend. No scope is required.

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Available scopes:
  • : Needed for reading payment modes by a tenant employee.
  • : Needed to manage payment modes by a tenant employee.
  • : Needed to perform a payment authorization flow by a tenant employee.
  • : Needed to perform a payment capture flow by a tenant employee.
  • : Needed to perform a payment refund flow by a tenant employee.
  • : Needed to perform a payment cancel flow by a tenant employee.
  • : Needed to read all transaction details by a tenant employee.
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.

Responses
200

Payment initialized

application/json
post
/payment-gateway/{tenant}/payment/frontend/initialize
POST /payment-gateway/{tenant}/payment/frontend/initialize HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "order": {
    "id": "text"
  },
  "paymentModeId": "text",
  "creditCardToken": "text"
}
{
  "successful": true,
  "paymentTransactionId": "FTrjO4SrNF0Had7yBCeVU5ziqwL",
  "externalPaymentRedirectURL": "https://www.sandbox.paypal.com/checkoutnow?token=0SC35196GX656501J",
  "externalPaymentParameters": {}
}

Authorizing a payment

post

Authorize a payment by accepting a request sent from the frontend. No scope is required.

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Available scopes:
  • : Needed for reading payment modes by a tenant employee.
  • : Needed to manage payment modes by a tenant employee.
  • : Needed to perform a payment authorization flow by a tenant employee.
  • : Needed to perform a payment capture flow by a tenant employee.
  • : Needed to perform a payment refund flow by a tenant employee.
  • : Needed to perform a payment cancel flow by a tenant employee.
  • : Needed to read all transaction details by a tenant employee.
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
all ofOptional
Responses
200

Payment authorized

application/json
Responseall of
post
/payment-gateway/{tenant}/payment/frontend/authorize
POST /payment-gateway/{tenant}/payment/frontend/authorize HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 132

{
  "order": {
    "id": "text"
  },
  "paymentModeId": "text",
  "creditCardToken": "text",
  "threeDSToken": "text",
  "browserInfo": "text",
  "clientIP": "text"
}
{
  "successful": true,
  "paymentTransactionId": "FTrjO4SrNF0Had7yBCeVU5ziqwL",
  "requiresExternalPayment": true,
  "externalPaymentRedirectURL": "https://www.sandbox.paypal.com/checkoutnow?token=0SC35196GX656501J",
  "externalPaymentParameters": {}
}

Last updated

Was this helpful?