eComm Payments

Native Store Only

Payment Object

{
  "id": "string",
  "mode": "LIVE",
  "cancel_url": "string",
  "invoice": {
    "purchase_id": "string",
    "purchase_type": "string",
    "email": "string",
    "language": "string",
    "currency": "string",
    "total": 0,
    "shipping_address": {
      "first_name": "string",
      "last_name": "string",
      "full_name": "string",
      "address_1": "string",
      "address_2": "string",
      "street_number": "string",
      "street_name": "string",
      "city": "string",
      "sub_locality": "string",
      "region": "string",
      "country": "string",
      "postal_code": "string",
      "phone": "string"
    },
    "billing_address": {
      "first_name": "string",
      "last_name": "string",
      "full_name": "string",
      "address_1": "string",
      "address_2": "string",
      "street_number": "string",
      "street_name": "string",
      "city": "string",
      "sub_locality": "string",
      "region": "string",
      "country": "string",
      "postal_code": "string",
      "phone": "string"
    },
    "items": [
      {
        "type": "PHYSICAL",
        "name": "string",
        "unit_price": 0,
        "quantity": 0,
        "discount_amount": 0,
        "total": 0
      }
    ]
  },
  "site_name": "string",
  "site_external_id": "string"
}

payment_gateway_details

Property
Type
Description

id

string

System identifier of the payment session.

mode

string

One of LIVE or TEST

cancel_url

string

URL to redirect the user to in case of cancellation.

invoice

object

site_name

string

The name of the site from which this purchase originated.

site_external_id

string

The external id of the site from which this purchase originated.

invoice

Property
Type
Description

purchase_id

string

Reference id to the type of purchase. Currently will always be set to the cart id.

purchase_type

string

Currently always set to 'CART'.

email

string

Email address of the customer.

language

string

Language of the customer.

currency

string

Currency of the invoice.

total

number

Total amount of the invoice.

shipping_address

object

The shipping address of the payment owner.

billing_address

object

The billing address of the payment owner

items

object[]

All items associated with this purchase.

address

Property
Type
Description

first_name

string

First name of the payment owner.

last_name

string

Last name of the payment owner.

full_name

string

Full name of the payment owner.

address_1

string

Number and Street, concatenated.

address_2

string

Address complement (apt #, office #, floor level, etc.).

street_number

string

Standalone street number of the address

street_name

string

Standalone street name of the address

city

string

City name

region

string

The administrative region (depending on country, this can be a state, province, department, etc.).

sub_locality

string

The sub locality of the address (neighborhood, county, etc.).

country

string

ISO 3166 2-letters ISO country code. Ref: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes

postal_code

string

Postal code.

phone

string

Phone number associated with the address

items

Property
Type
Description

type

string

Can be "PHYSICAL", "DIGITAL", "TAX", "SHIPPING", or "DISCOUNT".

name

string

Name of the invoice line item.

unit_price

number

Price per unit of the invoice line item.

quantity

number

Quantity of the invoice line item.

discover_amount

number

Amount discounted from the original price of the invoice line item.

total

number

Total for the invoice line item.

Get Payment Session

Get Payment Session

GET https://api.duda.co/api/sites/multiscreen/{site_name}/ecommerce/payment-sessions/{session_id}

Path Parameters

Name
Type
Description

site_name*

string

The unique identifier of the target site.

session_id*

string

The unique identifier for the payment session

curl --request GET \
     --url https://api.duda.co/api/sites/multiscreen/site_name/ecommerce/payment-sessions/session_id \
     --header 'accept: application/json'

Confirm Payment

Confirm Payment

POST https://api.duda.co/api/sites/multiscreen/{site_name}/ecommerce/payment-sessions/{session_id}/confirm

Note that properties can differ based on the state of the payment.

Path Parameters

Name
Type
Description

site_name*

string

The unique identifier for the target site

session_id*

string

The unique identifier for the payment

Request Body

Name
Type
Description

session_id*

string

ID returned by the payment session retrieval

state*

string

PROCESSED or FAILED

links

object

refunds: URL that our servers will POST to when a refund is issued from the merchant dashboard

transaction_id

string

Required only if state is PROCESSED . Unique identifier from your payment gateway to assign to the order

instructions

string

Optionally define if state is PROCESSED. Information text diplayed in the checkout confirmation screen

icon

string

Optionally define if state is PROCESSED. Image url to display in the checkout confirmation screen

curl --request POST \
     --url https://api.duda.co/api/sites/multiscreen/site_name/ecommerce/payment-sessions/session_id/confirm \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "session_id": "123abc",
  "state": "FAILED"
}
'

Last updated

Was this helpful?