Skip to navigation

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.

cashAppPay.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 CashAppPayAction object, or a list of actions.

Like createCustomerRequest, it makes a blocking network call, so call it from a background thread.

fun updateCustomerRequest(
requestId: String,
action: CashAppPayAction,
referenceId: String? = null,
)
fun updateCustomerRequest(
requestId: String,
actions: List<CashAppPayAction>,
referenceId: String? = null,
)

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