Set up checkout

DOCS

Last updated: Aug 15th, 6:08am

For every checkout session, your client workflow should follow these steps:

  1. Get an order ID
  2. Call one of the two payWith methods (for the appropriate payment method type) with an orderID.
  3. After a successful checkout result, capture the payment or authorize then capture the payment.

Get an Order ID

Capure an orderID that was generated on your server using an HttpClient.

    1public class MyActivity extends Activity {
    2 ...
    3 private String orderID;
    4
    5 private void fetchOrderId() {
    6 httpClient.createOrderId(new Callback<String>() {
    7 @Override
    8 public void onResponse(Call<String> call, Response<String> response) {
    9 if (response.isSuccessful()) {
    10 // obtain the order ID
    11 orderID = response.body();
    12 } else {
    13 // handle errors
    14 }
    15 }
    16 });
    17 }
    18}

    Next step

    Set up different ways to pay: