Skip to main content

Basic Scenarios

One-Step Payment

  1. The customer begins the payment process.
  2. The merchant sends the init request to OmniCart.
  3. OmniCart returns the response to the init request to the merchant.
  4. OmniCart delivers the payment form using the method set in the deliveryOption property of the init request.
  5. The customer authenticates against their verification service.
  6. The verification service informs OmniCart that the payment is authorized.
  7. The payment is processed.
  8. The merchant displays the success message to the customer.

init

{
"cartId": "6f891edb-1e1f-48bb-b042-2cb790a0f402",
"currency": "XAU",
"items": [
{
"pegasus": {
"amount": 250,
"capture": false
}
}
]
}
  1. The merchant sends the status request to OmniCart.

    OmniCart supports callbacks for payment and timer status changes. Contact our technical support for more information.

  2. OmniCart returns the response to the status request to the merchant.

status (optional)

curl -L 'https://api.omnicart.scripsi.io/status/:6f891edb-1e1f-48bb-b042-2cb790a0f402' \
-H 'Accept: application/json' \
-H 'Api-Access-Token: <Api-Access-Token>'

Two-Step Payment

  1. The customer begins the payment process.
  2. The merchant sends the init request to OmniCart.
  3. OmniCart returns the response to the init request to the merchant.
  4. OmniCart delivers the payment form using the method set in the deliveryOption property of the init request.
  5. The customer authenticates against their verification service.
  6. The verification service informs OmniCart that the payment is authorized.
  7. The customer's dunds are put on hold on their account.
  8. The merchant displays the success message to the customer.

init

{
"cartId": "6f891edb-1e1f-48bb-b042-2cb790a0f402",
"currency": "XAU",
"items": [
{
"pegasus": {
"amount": 250,
"capture": true
}
}
]
}
tip

Note that it is not necessary to pass "capture": true for two-step payments as this is the default behavior.

  1. The merchant sends the capture request to OmniCart.
  2. The payment is processed.
  3. OmniCart returns the response to the capture request to the merchant.

capture

{
"cartId": "6f891edb-1e1f-48bb-b042-2cb790a0f402"
}
  1. The merchant sends the status request to OmniCart.

    OmniCart supports callbacks for payment and timer status changes. Contact our technical support for more information.

  2. OmniCart returns the response to the status request to the merchant.

status (optional)

curl -L 'https://api.omnicart.scripsi.io/status/:6f891edb-1e1f-48bb-b042-2cb790a0f402' \
-H 'Accept: application/json' \
-H 'Api-Access-Token: <Api-Access-Token>'