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
"use strict";
export class CustomerPayment {
    /** @param {{ID?:number,CustomerID?:number,OrderHeaderID?:number,Amount?:string,Approved?:boolean,AuthCode?:string,CardNumber?:string,Message?:string,ResponseCode?:number,TransactionId?:string,TransactionDate?:string,FullResponse?:string,PaymentStatus?:number,PaymentType?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    ID;
    /** @type {number} */
    CustomerID;
    /** @type {number} */
    OrderHeaderID;
    /** @type {string} */
    Amount;
    /** @type {boolean} */
    Approved;
    /** @type {string} */
    AuthCode;
    /** @type {string} */
    CardNumber;
    /** @type {string} */
    Message;
    /** @type {number} */
    ResponseCode;
    /** @type {string} */
    TransactionId;
    /** @type {string} */
    TransactionDate;
    /** @type {string} */
    FullResponse;
    /** @type {number} */
    PaymentStatus;
    /** @type {number} */
    PaymentType;
}
export class CustomerPaymentsResponse {
    /** @param {{ResponseStatus?:ResponseStatus,PaymentIntentSuccess?:boolean,PaymentSuccess?:boolean,SubscriptionSuccess?:boolean,Message?:string,ReceiptUrl?:string,AgentNumber?:string,ClientSecret?:string,CustomerPayment?:CustomerPayment,PublicOrderID?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {ResponseStatus} */
    ResponseStatus;
    /** @type {boolean} */
    PaymentIntentSuccess;
    /** @type {boolean} */
    PaymentSuccess;
    /** @type {boolean} */
    SubscriptionSuccess;
    /** @type {string} */
    Message;
    /** @type {string} */
    ReceiptUrl;
    /** @type {string} */
    AgentNumber;
    /** @type {string} */
    ClientSecret;
    /** @type {CustomerPayment} */
    CustomerPayment;
    /** @type {string} */
    PublicOrderID;
}
export class Customer {
    /** @param {{ID?:number,CustomerCode?:string,BusinessName?:string,FirstName?:string,LastName?:string,Email?:string,UID?:string,AgentId?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    ID;
    /** @type {string} */
    CustomerCode;
    /** @type {string} */
    BusinessName;
    /** @type {string} */
    FirstName;
    /** @type {string} */
    LastName;
    /** @type {string} */
    Email;
    /** @type {string} */
    UID;
    /** @type {number} */
    AgentId;
}
export class PaymentInfo {
    /** @param {{PaymentType?:string,CardNumber?:string,ExpDate?:string,CCV?:string,StripeToken?:string,AgentId?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    PaymentType;
    /** @type {string} */
    CardNumber;
    /** @type {string} */
    ExpDate;
    /** @type {string} */
    CCV;
    /** @type {string} */
    StripeToken;
    /** @type {number} */
    AgentId;
}
export class CustomerPaymentsRequest {
    /** @param {{Customer?:Customer,OrderID?:string,PaymentInfo?:PaymentInfo}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {Customer} */
    Customer;
    /** @type {string} */
    OrderID;
    /** @type {PaymentInfo} */
    PaymentInfo;
}

JavaScript CustomerPaymentsRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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: application/json
Content-Type: application/json
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: application/json
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-01T00:00:00.0000000","FullResponse":"String","PaymentStatus":0,"PaymentType":0},"PublicOrderID":"String"}