Skip to main content

Billing Method Object

A billing method is how a partner will pay for services rendered. This section goes over the parts of the Billing Method object. These fields and values make up the JSON response that gets returned when a request is successful.

Billing Method Object Attributes

AttributeData TypeDescription
address1

string

The customer address.

address2

string

The customer address second field.

cc_cid

string

The credit card CID. This field is hidden in the serialized copy of the Billing Method objects received in responses to the requests for the security reasons.

cc_expiration

string

The credit card expiration date in the mmyyyy format.

cc_number

string

The credit card number.

city

string

The customer city.

country_code

string

The partner country code.

ec_account_number

string

The electronic check account number.

ec_routing_number

string

The electronic check routing number.

first_name

string

The partner first name.

last_name

string

The partner last name.

phone

string

The partner phone number.

state

string

The customer state in a two-letter abbreviation format.

type

string

The type of the billing method. Values accepted in this field are:

  • american_express
  • check
  • diners_club
  • discover_card
  • electronic_check
  • international_maestro
  • jcb
  • master_card
  • visa
  • wire
state

string

The customer state in a two-letter abbreviation format.

zip

string

The customer zip code.

Sample Billing Method Object

{
"address1":"4300 E Pacific Coast Hwy",
"address2":"Suite 1",
"cc_expiration":"022019",
"cc_number":"8888",
"city":"Long Beach",
"country_code":"USA",
"first_name":"John",
"last_name":"Smith",
"phone":"15162065574",
"state":"CA",
"type":"visa",
"zip": "90804"
}

Register Billing Method

This request registers a billing method to a specific partner.

post /partners/{partner_sid}/billing_method

Sample

A sample POST request to register a billing method for the partner:

curl -X POST \
'https://api.carrierx.com/core/v2/partners/ed437757-002d-4ecc-aa5a-efdf5e50dba0/billing_method' \
-H 'Content-Type: application/json' \
--data-binary '{"type":"visa", "cc_number":"4012888818888", "cc_expiration":"022019", "cc_cid":"318", "first_name":"John", "last_name":"Smith", "address1":"4300 E Pacific Coast Hwy", "address2":"Suite 1", "city":"Los Angeles", "state":"CA", "zip":"90804", "country_code":"USA", "phone":"15162065574"}' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'

Response

200 status code with a serialized copy of the Billing Method object:

{
"address1":"4300 E Pacific Coast Hwy",
"address2":"Suite 1",
"cc_expiration":"022019",
"cc_number":"8888",
"city":"Long Beach",
"country_code":"USA",
"first_name":"John",
"last_name":"Smith",
"phone":"15162065574",
"state":"CA",
"type":"visa",
"zip": "90804"
}
note

Note that the cc_number value will be redacted as the last four integers in the response.

Required Scopes

To register a billing method the partner must have one of the following scopes enabled:

  • partners.billing_method.manage
  • partners.billing_method.create

Path Arguments

ParameterData TypeDescription
partner_sid requiredstringThe partner secure ID.

Body Arguments

JSON representation of the fields and values of the Billing Method object to be created.

Required fields to create a billing method are:

  • address1 (for check, electronic_check, and wire billing methods)
  • cc_cid (for credit card billing methods)
  • cc_expiration (for credit card billing methods)
  • cc_number (for credit card billing methods)
  • city (for check, electronic_check, and wire billing methods)
  • country_code
  • first_name
  • last_name
  • phone
  • type
  • zip

Refer to this table to view all fields that appear in the Billing Method object.

Get Billing Method by Partner SID

This request returns a billing method registered for the selected partner.

get /partners/{partner_sid}/billing_method

Sample

A sample GET request to get a billing method for the partner:

curl -X GET \
'https://api.carrierx.com/core/v2/partners/ed437757-002d-4ecc-aa5a-efdf5e50dba0/billing_method' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'

Response

200 status code with a serialized copy of the Billing Method object:

{
"address1": "4300 E Pacific Coast Hwy",
"address2": "Suite 1",
"cc_expiration": "022020",
"cc_number": "8888",
"city": "Long Beach",
"country_code": "USA",
"first_name": "John",
"last_name": "Smith",
"phone": "15162065574",
"state": "CA",
"type": "visa",
"zip": "90804"
}

This request is enabled for Field Filtering.

Required Scopes

To get information about a Billing Method object, the partner must have one of the following scopes enabled:

  • partners.billing_method.manage
  • partners.billing_method.read

Path Arguments

ParameterData TypeDescription
partner_sid requiredstringThe partner secure ID.

Delete Billing Method

This request deletes a billing method of the partner, targeted by secure ID.

delete /partners/{partner_sid}/billing_method

Sample

A sample DELETE request to delete a billing method:

curl -X DELETE \
'https://api.carrierx.com/core/v2/partners/ed437757-002d-4ecc-aa5a-efdf5e50dba0/billing_method' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'

Response

204 status code with an empty body.

When completed, no billing method will be registered for the specified partner.

Required Scopes

To delete a Billing Method object, the partner must have one of the following scopes enabled:

  • partners.billing_method.manage
  • partners.billing_method.delete

Path Arguments

ParameterData TypeDescription
partner_sid requiredstringThe partner secure ID.