Skip to content

Search the Omeda Knowledge Base

Print

Update Billing Info

Summary

This API provides the ability to update the Billing Information for a Single Customer and a Single Paid Product. This service will look up all the active, pending, and graced Paid Subscription records for the given customer and product. For each one, it will update the Billing Info associated.

Base Resource URI

For Production, use: https://ows.omeda.com/webservices/rest/brand/{brandAbbreviation}/updatebillinginfo/*
For Testing, use: https://ows.omedastaging.com/webservices/rest/brand/{brandAbbreviation}/updatebillinginfo/*

brandAbbreviation

the abbreviation for the brand to which the data is being posted.

Technical Requirements

The HTTP header must contain the following elements:

x-omeda-appid: a unique id provided to you by Omeda to access your data. The request will fail without a valid id.

x-omeda-inputid: a unique id with which to process your request. If absent, the x-omeda-appid’s default inputid will be used. Contact your Omeda Customer Services Representative to obtain an inputid.

content-type: The default content type is application/json.

JSON is the preferred data exchange format, because it is lightweight and, in most cases, faster to process and utilizes less bandwidth. There are many available open-source JSON libraries available. See [http://www.json.orgjson.org] for details.

Supported HTTP Methods

There is one HTTP method supported:

POST: See W3C’s POST specs for details.

Field Definition

The following tables describe the data elements that can be included in the POST method to store data in the database.

Customer Elements

Attribute NameRequired?Description
OmedaCustomerIDRequiredThe internal ID of the customer.
CustomerStatusIDOptionalThe status of the submitted customer. 0 = Inactive, 1 = Active, 3 = Test
OmedaProductIDRequiredThe product ID for the Paid Subscription that should be updated.
BillingInformationRequiredJSON element containing the “Billing Information” Elements


BillingInformation Elements

Attribute NameRequired?Description
CreditCardNumberOptionalNew Credit Card Number that will replace the Credit Card Number on file that is related to all Paid Subscriptions for the Customer Id and Product Id.
CreditCardTypeOptionalRequired field if CreditCardNumber is submitted. The code associated with the Credit Card Type Valid Values.
ExpirationDateOptionalRequired field if CreditCardNumber is submitted. The Expiration Date for the Credit Card Number passed in on the request
CardSecurityCodeOptionalRequired field if CreditCardNumber is submitted. The Card Security Code for the Credit Card Number passed in on the request.
Comment1OptionalThe fist line of a Comment that can be used on the Credit Card processing transactions.
Comment2OptionalThe second line of a Comment that can be used on the Credit Card processing transactions.
NameOnCardOptionalRequired field if CreditCardNumber is submitted. The Full Name associated with the Credit Card Number passed in on the request.
BillingCompanyOptionalBilling Address company name, if any, that needs to be updated. Up to 255 characters long.
BillingStreetOptionalFirst line of billing street address that needs to be updated. Up to 255 characters long
BillingApartmentMailStopOptionalBilling apartment, mail stop or suite number that needs to be updated. Up to 255 characters long
BillingCityOptionalBilling city name that needs to be updated. Up to 100 characters long
BillingRegionOptionalName of billing region (Country) that needs to be updated. Up to 100 characters long.
BillingPostalCodeOptionalBilling ZIP code or billing postal code.
BillingCountryCodeOptionalBilling 3-character country code.
RenewalCodeOptionalValid values: 0 – None, 5 – auto-charge, 6 – auto invoice.
DoChargeOptional“True” (DEFAULT if not provided) if credit card should be charged immediately, “False” if the customer will be invoiced later or if a 3rd party payment has already been made.


Request Examples

JSON Example

{
    "OmedaCustomerId":123456,
    "OmedaProductId":1,
    "BillingInformation":{
       "CreditCardNumber":"5555555555554444",
       "CreditCardType":2,
       "ExpirationDate":"1215",
       "CardSecurityCode":"123",
       "Comment1":"Acme Company Sales",
       "Comment2":"(555) 555-5555",
       "NameOnCard":"John Smith",
       "BillingCompany":"Acme Corp.",
       "BillingStreet":"123 Example St.",
       "BillingApartmentMailStop":"Ste. 3",
       "BillingCity":"Anywhere",
       "BillingRegion":"IL",
       "BillingPostalCode":"60062",
       "BillingCountryCode":"USA",
       "RenewalCode":5
    }
 }

Response Examples

Two responses are possible: a successful POST (200 OK Status) or a failed POST (400 Bad Request/403 Forbidden/404 Not Found/405 Method Not Allowed Statuses). See W3C’s Status Codes.

Successful Submission

A successful POST submission will create a Transaction in the data queue. The response has a ”’ResponseInfo”’ element with sub-elements, a TransactionId element, the Id for the transaction, a Url element, the URL that allows you to check the status of your transaction (See Transaction Lookup Service for more details), a CustomerId, the customer that was updated, a CustomerURL, the URL that allows you to lookup the customer and EncryptedCustomerId, the encrypted Customer Id for the customer that was updated (See Customer Lookup Service for more details).

JSON Example

{
    "ResponseInfo":[
       {
          "CustomerUrl":"https://ows.omedastaging.com/webservices/rest/brand/CGM/customer/1234/",
          "TransactionId":11111,
          "EncryptedCustomerId":"1111C8015245A7E",
          "Url":"https://ows.omedastaging.com/webservices/rest/brand/CGM/transaction/54097/",
          "CustomerId":1234
       },
       {
          "CustomerUrl":"https://ows.omedastaging.com/webservices/rest/brand/CGM/customer/1234/",
          "TransactionId":11112,
          "EncryptedCustomerId":"1111C8015245A7E",
          "Url":"https://ows.omedastaging.com/webservices/rest/brand/CGM/transaction/54098/",
          "CustomerId":1234
       }
    ],
    "SubmissionId":"a70b396c-32d1-6e54-98f7-1234567gh890"
 }

Failed Submission

A failed POST submission may be due to several factors:

StatusDescription
400 Bad RequestTypically, this error occurs when the request does not follow the specifications.
403 ForbiddenTypically, this error occurs when the credentials are erroneous. Potentially, an incorrect x-omeda-appid.
404 Not FoundTypically, this error occurs with a malformed URL or the resource that is searched for is not found.
405 Method Not AllowedTypically, this error occurs when the resource accessed is not allowed by the HTTP Method utilized. Make sure you employ the correct HTTP Method (POST) for this request.

This is not an exhaustive list of errors, but common ones. If an error occurs repeatedly, please contact your Omeda representative.

JSON Example

{
    "SubmissionId":"d31234ab-1a1a-123a-1ab3-aca4a0a8ddb3",
    "Errors":[
       {
          "Error":"Your card could not be authorized."
       }
    ]
 }
Table of Contents
Knowledge Base Feedback