Method: unenroll
Stay organized with collections
Save and categorize content based on your preferences.
Informs the integrator that an enrollment is over. This means that the given enrollmentRequestId
is no longer valid and will not be used again to retrieve a virtual card number.
Calls to unenroll
with an enrollmentRequestId
that has been seen previously should always return success to respect idempotency.
In the event a future retrieveVirtualCardNumber
uses this unenrolled enrollmentRequestId
it should be declined.
An example request looks like:
{
"requestHeader": {
"protocolVersion": {
"major": 1
},
"requestId": "DWSW4Q689HT93PJ",
"requestTimestamp": {
"epochMillis": "1481899949854"
},
"paymentIntegratorAccountId": "abcdef123456"
},
"enrollmentRequestId": "G1MQ0YERJ0Q7LPM"
}
An example success response looks like:
{
"responseHeader": {
"responseTimestamp": {
"epochMillis": "1481899949868"
}
},
"result": {
"success" :{}
}
}
HTTP request
POST https://www.integratorhost.example.com/integrator-base-path/virtual-cards-v1/unenroll
Request body
The request body contains data with the following structure:
JSON representation |
{
"requestHeader": {
object (RequestHeader )
},
"enrollmentRequestId": string
} |
Fields |
requestHeader |
object (RequestHeader )
REQUIRED: Common header for all requests.
|
enrollmentRequestId |
string
REQUIRED: A reference to an earlier enrollment request. Specifically, the identifier set in the requestId of the requestHeader sent in the enrollRequest that registered a card for Virtual Cards. This is a string that has a maximum length of 100 characters.
|
Response body
This method supports multiple return types. For additional information about what 4XX or 5XX HTTP status code to return with an ErrorResponse
, consult the ErrorResponse
object and HTTP status codes documentation.
Possible response messages |
HTTP 200 Status |
object (UnenrollResponse )
|
HTTP 4XX / 5XX Status |
object (ErrorResponse )
|
UnenrollResponse
Response object for the unenroll
method.
Fields |
result |
object (UnenrollResult )
REQUIRED: Contains the result of the request.
|
UnenrollResult
Details corresponding to the result.
JSON representation |
{
// Union field result can be only one of the following:
"success": {
object (UnenrollSuccessResult )
}
// End of list of possible types for union field result .
} |
Fields |
Union field result . REQUIRED: Contains the possible result types. Exactly one must be set. result can be only one of the following: |
success |
object (UnenrollSuccessResult )
The request to unenroll was successful.
|
UnenrollSuccessResult
This type has no fields.
Details about the success result.
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-29 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-29 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eunenroll\u003c/code\u003e API informs the integrator that an enrollment is over, invalidating the \u003ccode\u003eenrollmentRequestId\u003c/code\u003e for future virtual card retrievals.\u003c/p\u003e\n"],["\u003cp\u003eCalls to \u003ccode\u003eunenroll\u003c/code\u003e with a previously used \u003ccode\u003eenrollmentRequestId\u003c/code\u003e should always return success to maintain idempotency.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires a \u003ccode\u003erequestHeader\u003c/code\u003e for authentication and an \u003ccode\u003eenrollmentRequestId\u003c/code\u003e to identify the enrollment to be ended.\u003c/p\u003e\n"],["\u003cp\u003eA successful response will include a \u003ccode\u003eresponseHeader\u003c/code\u003e with a timestamp and a \u003ccode\u003eresult\u003c/code\u003e object indicating a successful unenrollment.\u003c/p\u003e\n"],["\u003cp\u003eFuture \u003ccode\u003eretrieveVirtualCardNumber\u003c/code\u003e calls using an unenrolled \u003ccode\u003eenrollmentRequestId\u003c/code\u003e will be declined.\u003c/p\u003e\n"]]],["The `unenroll` method informs that an enrollment is over, invalidating the `enrollmentRequestId`. To respect idempotency, repeated calls with the same ID should return success. Future `retrieveVirtualCardNumber` requests using an unenrolled ID must be declined. The HTTP request is a POST to a specific URL, requiring a JSON request body containing `requestHeader` and `enrollmentRequestId`. A successful response includes a `responseHeader` and a `result` with a success object, while errors return an `ErrorResponse`.\n"],null,["# Method: unenroll\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [UnenrollResponse](#UnenrollResponse)\n - [JSON representation](#UnenrollResponse.SCHEMA_REPRESENTATION)\n- [UnenrollResult](#UnenrollResult)\n - [JSON representation](#UnenrollResult.SCHEMA_REPRESENTATION)\n- [UnenrollSuccessResult](#UnenrollSuccessResult)\n\nInforms the integrator that an enrollment is over. This means that the given `enrollmentRequestId` is no longer valid and will not be used again to retrieve a virtual card number.\n\nCalls to `unenroll` with an `enrollmentRequestId` that has been seen previously should always return success to respect idempotency.\n\nIn the event a future `retrieveVirtualCardNumber` uses this unenrolled `enrollmentRequestId` it should be declined.\n\nAn example request looks like: \n\n\n {\n \"requestHeader\": {\n \"protocolVersion\": {\n \"major\": 1\n },\n \"requestId\": \"DWSW4Q689HT93PJ\",\n \"requestTimestamp\": {\n \"epochMillis\": \"1481899949854\"\n },\n \"paymentIntegratorAccountId\": \"abcdef123456\"\n },\n \"enrollmentRequestId\": \"G1MQ0YERJ0Q7LPM\"\n }\n\nAn example success response looks like: \n\n\n {\n \"responseHeader\": {\n \"responseTimestamp\": {\n \"epochMillis\": \"1481899949868\"\n }\n },\n \"result\": {\n \"success\" :{}\n }\n }\n\n### HTTP request\n\n`POST https://www.integratorhost.example.com/integrator-base-path/virtual-cards-v1/unenroll`\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"requestHeader\": { object (/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/RequestHeader) }, \"enrollmentRequestId\": string } ``` |\n\n| Fields ||\n|-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requestHeader` | `object (`[RequestHeader](/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/RequestHeader)`)` **REQUIRED**: Common header for all requests. |\n| `enrollmentRequestId` | `string` **REQUIRED** : A reference to an earlier enrollment request. Specifically, the identifier set in the `requestId` of the `requestHeader` sent in the `enrollRequest` that registered a card for Virtual Cards. This is a string that has a maximum length of 100 characters. |\n\n### Response body\n\nThis method supports multiple return types. For additional information about what 4XX or 5XX HTTP status code to return with an `ErrorResponse`, consult the `ErrorResponse` object and [HTTP status codes documentation](/pay/virtual-cards-v1/guides/connectivity/protocol-standards#http_status_codes).\n\n| Possible response messages ||\n|-----------------------|-----------------------------------------------------------------------------------------------------------------------|\n| HTTP 200 Status | `object (`[UnenrollResponse](/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/unenroll#UnenrollResponse)`)` |\n| HTTP 4XX / 5XX Status | `object (`[ErrorResponse](/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/ErrorResponse)`)` |\n\nUnenrollResponse\n----------------\n\nResponse object for the `unenroll` method.\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"responseHeader\": { object (/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/ResponseHeader) }, \"result\": { object (/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/unenroll#UnenrollResult) } } ``` |\n\n| Fields ||\n|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `responseHeader` | `object (`[ResponseHeader](/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/ResponseHeader)`)` **REQUIRED**: Common header for all responses. |\n| `result` | `object (`[UnenrollResult](/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/unenroll#UnenrollResult)`)` **REQUIRED**: Contains the result of the request. |\n\nUnenrollResult\n--------------\n\nDetails corresponding to the result.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { // Union field `result` can be only one of the following: \"success\": { object (/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/unenroll#UnenrollSuccessResult) } // End of list of possible types for union field `result`. } ``` |\n\n| Fields ||\n|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Union field `result`. **REQUIRED** : Contains the possible result types. Exactly one must be set. `result` can be only one of the following: ||\n| `success` | `object (`[UnenrollSuccessResult](/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/unenroll#UnenrollSuccessResult)`)` The request to `unenroll` was successful. |\n\nUnenrollSuccessResult\n---------------------\n\nThis type has no fields.\nDetails about the success result."]]