API Route - Payment

API endpoints

[POST] Make a payment

Details

This API endpoint makes a payment.

API endpoint :

/api/v1/customers/{customerNumber}/payment?customerType={customerType}

Parameter request :

{
  "PaidAmount": 0,
  "PaidAmountCurrency": "string",
  "PaymentType": "string",
  "PaymentTypeParameter": {
    "CheckNumber": "string"
  },
  "PolicyList": {}
}

JSon response :

{
  "ListOfBillAmountReturn": [
    {
      "BillReference": "string",
      "DueAmount": "string",
      "PaidAmount": "string"
    }
  ]
}

[GET] Get the amount of the first bill for a quote

Details

By calling this API endpoint, you will obtain the amount of the first bill for a quote.

API endpoint :

/api/v1/Quotes/{contractNumber}/{contractQuoteNumber}/FirstBillAmount

Json response :

{
  "FirstBillAmount": "string"
}

[POST] Set Default Payment Information for a Customer and his/her policies

Details

This API endpoint sets default payment information for a customer and his/her policies

API endpoint :

/api/v1/customers/{customerNumber}/defaultpaymentinformation

Parameter request :

{
  "PaymentInformationJSON": {
    "PaymentType": "1",
    "Name": "string",
    "PaymentInformationExternalIdentifier": "string"
  }
}

Json response :

{
  "PaymentInformationJSON": {
    "PaymentType": "1",
    "Name": "string",
    "PaymentInformationExternalIdentifier": "string"
  }
}

[POST] Create a setup Intent (for Stripe)

Details

This API endpoint allows you to create a setup intent.

API endpoint :

/api/v1/thirdPartyPaymentProvider/{thirdPartyPaymentProviderCustomerId}/CreateSetupIntent

Parameter request :

 ThirdPartyPaymentProviderCustomerId as string

Json response :

The setup Intent

[GET] Get Stripe API public key

Details

This API endpoint gets public API Key for Third Party Payment Provider

API endpoint :

/api/v1/thirdPartyPaymentProvider/ApiPublicKey

Json response :

Get public API Key for Third Party Payment Provider

[POST] Declare a customer in the third party payment provider (for example stripe)

Details

This API endpoint creates a Third Party Payment Provider Customer.

API endpoint :

/api/v1/thirdPartyPaymentProvider/CreateCustomer

Parameter request :

{
  "Name": "string",
  "Email": "string",
  "Phone": "string",
  "AddressLine1": "string",
  "AddressLine2": "string",
  "City": "string",
  "PostalCode": "string",
  "County": "string",
  "Country": "string"
}

Json response :

The Third Party Payment Provider Customer

[POST] Create a payment (for Stripe)

Details

This API endpoint initiates a credit card payment using a credit card saved with the configured third party payment provider. The status of the payment is returned in the response object which will indicate success or failure of the payment.

API endpoint :

/api/v1/thirdPartyPaymentProvider/Payment

Parameter request :

 {
  "ThirdPartyPaymentProviderCustomerId": "string",
  "CreditCardId": "string",
  "Amount": "string",
  "Currency": "string",
  "BillNumber": "string",
  "CustomerEmail": "string"
}

Json response :

{
  "PaymentId": "string",
  "ReceiptNumber": "string",
  "Message": "string"
}