@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Adyen Stored Value API
@base https://pal-test.adyen.com/pal/servlet/StoredValue/v46
@version 46
@auth ApiKey X-API-Key in header | Bearer basic
@common_fields {merchantAccount: str, reference: str, store: str}
@endpoints 6
@toc changeStatus(1), checkBalance(1), issue(1), load(1), mergeBalance(1), voidTransaction(1)

@group changeStatus
@endpoint POST /changeStatus
@required {paymentMethod: map, status: str(active/inactive)}
@optional {amount: map{currency!: str, value!: int(int64)}, recurringDetailReference: str, shopperInteraction: str(Ecommerce/ContAuth/Moto/POS), shopperReference: str}
@returns(200) {authCode: str, currentBalance: map{currency: str, value: int(int64)}, pspReference: str, refusalReason: str, resultCode: str, thirdPartyRefusalReason: str}
@errors {400, 401, 403, 500}

@endgroup

@group checkBalance
@endpoint POST /checkBalance
@required {paymentMethod: map}
@optional {amount: map{currency!: str, value!: int(int64)}, recurringDetailReference: str, shopperInteraction: str(Ecommerce/ContAuth/Moto/POS), shopperReference: str}
@returns(200) {currentBalance: map{currency: str, value: int(int64)}, pspReference: str, refusalReason: str, resultCode: str, thirdPartyRefusalReason: str}
@errors {400, 401, 403, 500}

@endgroup

@group issue
@endpoint POST /issue
@required {paymentMethod: map}
@optional {amount: map{currency!: str, value!: int(int64)}, recurringDetailReference: str, shopperInteraction: str(Ecommerce/ContAuth/Moto/POS), shopperReference: str}
@returns(200) {authCode: str, currentBalance: map{currency: str, value: int(int64)}, paymentMethod: map, pspReference: str, refusalReason: str, resultCode: str, thirdPartyRefusalReason: str}
@errors {400, 401, 403, 500}

@endgroup

@group load
@endpoint POST /load
@required {amount: map{currency!: str, value!: int(int64)}, paymentMethod: map}
@optional {loadType: str(merchandiseReturn/load), recurringDetailReference: str, shopperInteraction: str(Ecommerce/ContAuth/Moto/POS), shopperReference: str}
@returns(200) {authCode: str, currentBalance: map{currency: str, value: int(int64)}, pspReference: str, refusalReason: str, resultCode: str, thirdPartyRefusalReason: str}
@errors {400, 401, 403, 500}

@endgroup

@group mergeBalance
@endpoint POST /mergeBalance
@required {paymentMethod: map, sourcePaymentMethod: map}
@optional {amount: map{currency!: str, value!: int(int64)}, recurringDetailReference: str, shopperInteraction: str(Ecommerce/ContAuth/Moto/POS), shopperReference: str}
@returns(200) {authCode: str, currentBalance: map{currency: str, value: int(int64)}, pspReference: str, refusalReason: str, resultCode: str, thirdPartyRefusalReason: str}
@errors {400, 401, 403, 500}

@endgroup

@group voidTransaction
@endpoint POST /voidTransaction
@required {originalReference: str}
@optional {tenderReference: str, uniqueTerminalId: str}
@returns(200) {currentBalance: map{currency: str, value: int(int64)}, pspReference: str, refusalReason: str, resultCode: str, thirdPartyRefusalReason: str}
@errors {400, 401, 403, 500}

@endgroup

@end
