Trendsic Platform Service

<back to all web services

CustomerPaymentsRequest

Requires Authentication
Requires any of the roles:Agent, Administrator, Agent, Administrator, Agent, Administrator
The following routes are available for this service:
GET/v1/CustomerPayments/{OrderID}
POST,PUT,OPTIONS/v1/CustomerPayments

export class CustomerPayment
{
    public ID: number;
    public CustomerID: number;
    public OrderHeaderID: number;
    public Amount: string;
    public Approved: boolean;
    public AuthCode: string;
    public CardNumber: string;
    public Message: string;
    public ResponseCode: number;
    public TransactionId: string;
    public TransactionDate: string;
    public FullResponse: string;
    public PaymentStatus: number;
    public PaymentType: number;

    public constructor(init?: Partial<CustomerPayment>) { (Object as any).assign(this, init); }
}

export class CustomerPaymentsResponse
{
    public ResponseStatus: ResponseStatus;
    public PaymentIntentSuccess: boolean;
    public PaymentSuccess: boolean;
    public SubscriptionSuccess: boolean;
    public Message: string;
    public ReceiptUrl: string;
    public AgentNumber: string;
    public ClientSecret: string;
    public CustomerPayment: CustomerPayment;
    public PublicOrderID: string;

    public constructor(init?: Partial<CustomerPaymentsResponse>) { (Object as any).assign(this, init); }
}

export class Customer
{
    public ID: number;
    public CustomerCode: string;
    public BusinessName: string;
    public FirstName: string;
    public LastName: string;
    public Email: string;
    public UID: string;
    public AgentId: number;

    public constructor(init?: Partial<Customer>) { (Object as any).assign(this, init); }
}

export class PaymentInfo
{
    public PaymentType: string;
    public CardNumber: string;
    public ExpDate: string;
    public CCV: string;
    public StripeToken: string;
    public AgentId: number;

    public constructor(init?: Partial<PaymentInfo>) { (Object as any).assign(this, init); }
}

export class CustomerPaymentsRequest
{
    public Customer: Customer;
    public OrderID: string;
    public PaymentInfo: PaymentInfo;

    public constructor(init?: Partial<CustomerPaymentsRequest>) { (Object as any).assign(this, init); }
}

TypeScript CustomerPaymentsRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/CustomerPayments HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Customer: 
	{
		ID: 0,
		CustomerCode: String,
		BusinessName: String,
		FirstName: String,
		LastName: String,
		Email: String,
		UID: 00000000000000000000000000000000,
		AgentId: 0
	},
	OrderID: 00000000000000000000000000000000,
	PaymentInfo: 
	{
		PaymentType: String,
		CardNumber: String,
		ExpDate: String,
		CCV: String,
		StripeToken: String,
		AgentId: 0
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	PaymentIntentSuccess: False,
	PaymentSuccess: False,
	SubscriptionSuccess: False,
	Message: String,
	ReceiptUrl: String,
	AgentNumber: String,
	ClientSecret: String,
	CustomerPayment: 
	{
		ID: 0,
		CustomerID: 0,
		OrderHeaderID: 0,
		Amount: String,
		Approved: False,
		AuthCode: String,
		CardNumber: String,
		Message: String,
		ResponseCode: 0,
		TransactionId: String,
		TransactionDate: 0001-01-01,
		FullResponse: String,
		PaymentStatus: 0,
		PaymentType: 0
	},
	PublicOrderID: String
}