OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"merchant\":{\"use_vcn\":false,\"public_api_key\":\"HZGB4I0OSVD31C07\",\"user_cancel_url\":\"coachbethcaldwell.com\",\"user_confirmation_url\":\"coachbethcaldwell.com\",\"name\":\"Beth Caldwell Communications\"},\"billing\":{\"name\":{\"full\":\"Beth Customer\",\"first\":\"Beth\",\"last\":\"Customer\"},\"address\":{\"line1\":\"test street\",\"city\":\"pittsburgh\",\"state\":\"pa\"},\"email\":\"beth.caldwell@gmail.com\"},\"shipping\":{\"name\":{\"full\":\"Beth Customer\"}},\"items\":[\"Monthly Coaching\"],\"total\":100}"); Request request = new Request.Builder() .url("https://api.affirm.com/api/v2/checkout/store") .post(body) .addHeader("Accept", "application/json") .addHeader("Content-Type", "application/json") .build(); Response response = client.newCall(request).execute();
top of page

Payment Program

Apply 
Now

Apply to affirm for a flexible payment program that works for you

Let’s Work Together

500 Terry Francois Street 

San Francisco, CA 94158

Tel: 123-456-7890

  • Facebook
  • Twitter
  • LinkedIn
  • Instagram
Thanks for submitting!
bottom of page