Payment Examples

This page contains a few example requests and responses for the transmission of payment methods

Request

Create Payment Method

In this request:

  • The URI shows a reference to the member id in uuid format

    • POST /members/96b6a19b-c6c1-4d4c-ba61-e67453afa29b/payment_method

  • The member must exist before a payment_method is created for their enrollment

Card

POST /members/{id}/payment_method
{
 "payment_method": {
   "payment_type": "card",
   "card_number": "999943434343433",
   "security_code": "999",
   "expiration_date": "2026-07-01",
   "first_name": "Joe",
   "last_name": "Doe",
   "billing_address": {
    "address_line_1": "123 Main Ave",
    "address_line_2": "Suite 1",
    "city": "Anytown",
    "zip": "12345",
    "fips_county_code": "34567"
 }
}

Bank Account

{
 "payment_method": {
   "payment_type": "bank_account",
   "account_number": "123456789012",
   "routing_number": "987654321",
   "account_type": "checking",
   "account_use": "personal",
   "first_name": "Joe",
   "last_name": "Doe",
   "billing_address": {
    "address_line_1": "123 Main Ave",
    "address_line_2": "Suite 1",
    "city": "Anytown",
    "zip": "12345",
    "fips_county_code": "34567"
   }
 }
}

Response

Validate Creation of Payment Method

  • 201 response code - shows the Payment Method was created successfully

  • Store and confirm presence of id

  • Store and refer to payment_expiration_date

Card

{
 "payment_method": {
   "id": "701282c7-de41-48c6-8614-3e169c1756aa",
   "payment_type": "card",
   "card_number": "tok_sandbox_vgksazUYx7cnYaP1twXbf6",
   "security_code": "tok_sandbox_7yFftdYXXcJWvB5koDZHHk",
   "expiration_date": "tok_sandbox_cqysqkcEdDccSaQYdkyS9b",
   "first_name": "Joe",
   "last_name": "Doe",
   "billing_address": {
    "address_line_1": "123 Main Ave",
    "address_line_2": "Suite 1",
    "city": "Anytown",
    "zip": "12345",
    "fips_county_code": "34567"
   },
   "payment_expiration_date": "2027-01-01"
 }
}

Bank Account

{
 "payment_method": {
   "id": "701282c7-de41-48c6-8614-3e169c1756aa",
   "payment_type": "bank_account",
   "account_number": "tok_sandbox_vgksazUYx7cnYaP1twXbf6",
   "routing_number": "tok_sandbox_7yFftdYXXcJWvB5koDZHHk",
   "account_type": "checking",
   "account_use": "personal",
   "first_name": "Joe",
   "last_name": "Doe",
   "billing_address": {
    "address_line_1": "123 Main Ave",
    "address_line_2": "Suite 1",
    "city": "Anytown",
    "zip": "12345",
    "fips_county_code": "34567"
   },
   "payment_expiration_date": "2027-01-01"
 }
}

Last updated

Was this helpful?