Pay Kit Android: Advanced Operations

Existing customer requests

When you use createCustomerRequest, the system returns a CustomerResponseData object. This object contains the Request ID.

If required, you can save this ID to retrieve the request at a later time.

For existing customer requests, start the SDK by calling startWithExistingCustomerRequest and pass the Request ID.

1cashAppPay.startWithExistingCustomerRequest(customerRequestID)
  • You must call this function only when you start on a new SDK instance.
  • You must register for state updates before calling this function.

Update an existing customer request

Update an existing customer request by calling updateCustomerRequest and passing in the Request ID and a new CashAppPayPaymentAction object.

1fun updateCustomerRequest(
2 requestId: String,
3 paymentAction: CashAppPayPaymentAction,
4)

Use this function only after you’ve already started the SDK with a customer request.