Set up checkout
DOCS
Last updated: Aug 15th, 6:08am
For every checkout session, your client workflow should follow these steps:
- Get an order ID
- Call one of the two
payWithmethods (for the appropriate payment method type) with anorderID. - 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;45 private void fetchOrderId() {6 httpClient.createOrderId(new Callback<String>() {7 @Override8 public void onResponse(Call<String> call, Response<String> response) {9 if (response.isSuccessful()) {10 // obtain the order ID11 orderID = response.body();12 } else {13 // handle errors14 }15 }16 });17 }18}
Next step
Set up different ways to pay: